summaryrefslogtreecommitdiff
path: root/indra/newview/llpathfindinglinksetlist.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-05-15 11:16:27 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2024-05-15 11:16:27 +0300
commitbccc10db9a90d365c353baebf443fde2030ce970 (patch)
tree2c2e1fd94b29667a809f8d7285d049f5ff5d424d /indra/newview/llpathfindinglinksetlist.cpp
parent531cd34f670170ade57f8813fe48012b61a1d3c2 (diff)
parentbb3c36f5cbc0c3b542045fd27255eee24e03da22 (diff)
Merge branch 'main' into marchcat/x-b-merge
# Conflicts: # autobuild.xml # indra/cmake/ConfigurePkgConfig.cmake # indra/cmake/ICU4C.cmake # indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms.cpp # indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms.h # indra/media_plugins/gstreamer010/llmediaimplgstreamertriviallogging.h # indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.cpp # indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.h # indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp # indra/newview/llappviewerlinux_api.h # indra/newview/llappviewerlinux_api_dbus.cpp # indra/newview/llappviewerlinux_api_dbus.h # indra/newview/llfloateremojipicker.cpp # indra/newview/lloutfitslist.cpp
Diffstat (limited to 'indra/newview/llpathfindinglinksetlist.cpp')
-rw-r--r--indra/newview/llpathfindinglinksetlist.cpp250
1 files changed, 125 insertions, 125 deletions
diff --git a/indra/newview/llpathfindinglinksetlist.cpp b/indra/newview/llpathfindinglinksetlist.cpp
index eb7b95552e..ee68db759d 100644
--- a/indra/newview/llpathfindinglinksetlist.cpp
+++ b/indra/newview/llpathfindinglinksetlist.cpp
@@ -1,4 +1,4 @@
-/**
+/**
* @file llpathfindinglinksetlist.cpp
* @brief Implementation of llpathfindinglinksetlist
* @author Stinson@lindenlab.com
@@ -43,14 +43,14 @@
//---------------------------------------------------------------------------
LLPathfindingLinksetList::LLPathfindingLinksetList()
- : LLPathfindingObjectList()
+ : LLPathfindingObjectList()
{
}
LLPathfindingLinksetList::LLPathfindingLinksetList(const LLSD& pLinksetListData)
- : LLPathfindingObjectList()
+ : LLPathfindingObjectList()
{
- parseLinksetListData(pLinksetListData);
+ parseLinksetListData(pLinksetListData);
}
LLPathfindingLinksetList::~LLPathfindingLinksetList()
@@ -59,155 +59,155 @@ LLPathfindingLinksetList::~LLPathfindingLinksetList()
LLSD LLPathfindingLinksetList::encodeObjectFields(LLPathfindingLinkset::ELinksetUse pLinksetUse, S32 pA, S32 pB, S32 pC, S32 pD) const
{
- LLSD listData;
-
- for (const_iterator linksetIter = begin(); linksetIter != end(); ++linksetIter)
- {
- const LLPathfindingObjectPtr objectPtr = linksetIter->second;
- const LLPathfindingLinkset *linkset = dynamic_cast<const LLPathfindingLinkset *>(objectPtr.get());
-
- if (!linkset->isTerrain())
- {
- LLSD linksetData = linkset->encodeAlteredFields(pLinksetUse, pA, pB, pC, pD);
- if (!linksetData.isUndefined())
- {
- const std::string& uuid(linksetIter->first);
- listData[uuid] = linksetData;
- }
- }
- }
-
- return listData;
+ LLSD listData;
+
+ for (const_iterator linksetIter = begin(); linksetIter != end(); ++linksetIter)
+ {
+ const LLPathfindingObjectPtr objectPtr = linksetIter->second;
+ const LLPathfindingLinkset *linkset = dynamic_cast<const LLPathfindingLinkset *>(objectPtr.get());
+
+ if (!linkset->isTerrain())
+ {
+ LLSD linksetData = linkset->encodeAlteredFields(pLinksetUse, pA, pB, pC, pD);
+ if (!linksetData.isUndefined())
+ {
+ const std::string& uuid(linksetIter->first);
+ listData[uuid] = linksetData;
+ }
+ }
+ }
+
+ return listData;
}
LLSD LLPathfindingLinksetList::encodeTerrainFields(LLPathfindingLinkset::ELinksetUse pLinksetUse, S32 pA, S32 pB, S32 pC, S32 pD) const
{
- LLSD terrainData;
-
- for (const_iterator linksetIter = begin(); linksetIter != end(); ++linksetIter)
- {
- const LLPathfindingObjectPtr objectPtr = linksetIter->second;
- const LLPathfindingLinkset *linkset = dynamic_cast<const LLPathfindingLinkset *>(objectPtr.get());
-
- if (linkset->isTerrain())
- {
- terrainData = linkset->encodeAlteredFields(pLinksetUse, pA, pB, pC, pD);
- break;
- }
- }
-
- return terrainData;
+ LLSD terrainData;
+
+ for (const_iterator linksetIter = begin(); linksetIter != end(); ++linksetIter)
+ {
+ const LLPathfindingObjectPtr objectPtr = linksetIter->second;
+ const LLPathfindingLinkset *linkset = dynamic_cast<const LLPathfindingLinkset *>(objectPtr.get());
+
+ if (linkset->isTerrain())
+ {
+ terrainData = linkset->encodeAlteredFields(pLinksetUse, pA, pB, pC, pD);
+ break;
+ }
+ }
+
+ return terrainData;
}
bool LLPathfindingLinksetList::isShowUnmodifiablePhantomWarning(LLPathfindingLinkset::ELinksetUse pLinksetUse) const
{
- bool isShowWarning = false;
+ bool isShowWarning = false;
- for (const_iterator objectIter = begin(); !isShowWarning && (objectIter != end()); ++objectIter)
- {
- const LLPathfindingObjectPtr objectPtr = objectIter->second;
- const LLPathfindingLinkset *linkset = dynamic_cast<const LLPathfindingLinkset *>(objectPtr.get());
- isShowWarning = linkset->isShowUnmodifiablePhantomWarning(pLinksetUse);
- }
+ for (const_iterator objectIter = begin(); !isShowWarning && (objectIter != end()); ++objectIter)
+ {
+ const LLPathfindingObjectPtr objectPtr = objectIter->second;
+ const LLPathfindingLinkset *linkset = dynamic_cast<const LLPathfindingLinkset *>(objectPtr.get());
+ isShowWarning = linkset->isShowUnmodifiablePhantomWarning(pLinksetUse);
+ }
- return isShowWarning;
+ return isShowWarning;
}
bool LLPathfindingLinksetList::isShowPhantomToggleWarning(LLPathfindingLinkset::ELinksetUse pLinksetUse) const
{
- bool isShowWarning = false;
+ bool isShowWarning = false;
- for (const_iterator objectIter = begin(); !isShowWarning && (objectIter != end()); ++objectIter)
- {
- const LLPathfindingObjectPtr objectPtr = objectIter->second;
- const LLPathfindingLinkset *linkset = dynamic_cast<const LLPathfindingLinkset *>(objectPtr.get());
- isShowWarning = linkset->isShowPhantomToggleWarning(pLinksetUse);
- }
+ for (const_iterator objectIter = begin(); !isShowWarning && (objectIter != end()); ++objectIter)
+ {
+ const LLPathfindingObjectPtr objectPtr = objectIter->second;
+ const LLPathfindingLinkset *linkset = dynamic_cast<const LLPathfindingLinkset *>(objectPtr.get());
+ isShowWarning = linkset->isShowPhantomToggleWarning(pLinksetUse);
+ }
- return isShowWarning;
+ return isShowWarning;
}
bool LLPathfindingLinksetList::isShowCannotBeVolumeWarning(LLPathfindingLinkset::ELinksetUse pLinksetUse) const
{
- bool isShowWarning = false;
+ bool isShowWarning = false;
- for (const_iterator objectIter = begin(); !isShowWarning && (objectIter != end()); ++objectIter)
- {
- const LLPathfindingObjectPtr objectPtr = objectIter->second;
- const LLPathfindingLinkset *linkset = dynamic_cast<const LLPathfindingLinkset *>(objectPtr.get());
- isShowWarning = linkset->isShowCannotBeVolumeWarning(pLinksetUse);
- }
+ for (const_iterator objectIter = begin(); !isShowWarning && (objectIter != end()); ++objectIter)
+ {
+ const LLPathfindingObjectPtr objectPtr = objectIter->second;
+ const LLPathfindingLinkset *linkset = dynamic_cast<const LLPathfindingLinkset *>(objectPtr.get());
+ isShowWarning = linkset->isShowCannotBeVolumeWarning(pLinksetUse);
+ }
- return isShowWarning;
+ return isShowWarning;
}
void LLPathfindingLinksetList::determinePossibleStates(BOOL &pCanBeWalkable, BOOL &pCanBeStaticObstacle, BOOL &pCanBeDynamicObstacle,
- BOOL &pCanBeMaterialVolume, BOOL &pCanBeExclusionVolume, BOOL &pCanBeDynamicPhantom) const
+ BOOL &pCanBeMaterialVolume, BOOL &pCanBeExclusionVolume, BOOL &pCanBeDynamicPhantom) const
{
- pCanBeWalkable = FALSE;
- pCanBeStaticObstacle = FALSE;
- pCanBeDynamicObstacle = FALSE;
- pCanBeMaterialVolume = FALSE;
- pCanBeExclusionVolume = FALSE;
- pCanBeDynamicPhantom = FALSE;
-
- for (const_iterator objectIter = begin();
- !(pCanBeWalkable && pCanBeStaticObstacle && pCanBeDynamicObstacle && pCanBeMaterialVolume && pCanBeExclusionVolume && pCanBeDynamicPhantom) && (objectIter != end());
- ++objectIter)
- {
- const LLPathfindingObjectPtr objectPtr = objectIter->second;
- const LLPathfindingLinkset *linkset = dynamic_cast<const LLPathfindingLinkset *>(objectPtr.get());
-
- if (linkset->isTerrain())
- {
- pCanBeWalkable = TRUE;
- }
- else
- {
- if (linkset->isModifiable())
- {
- pCanBeWalkable = TRUE;
- pCanBeStaticObstacle = TRUE;
- pCanBeDynamicObstacle = TRUE;
- pCanBeDynamicPhantom = TRUE;
- if (linkset->canBeVolume())
- {
- pCanBeMaterialVolume = TRUE;
- pCanBeExclusionVolume = TRUE;
- }
- }
- else if (linkset->isPhantom())
- {
- pCanBeDynamicPhantom = TRUE;
- if (linkset->canBeVolume())
- {
- pCanBeMaterialVolume = TRUE;
- pCanBeExclusionVolume = TRUE;
- }
- }
- else
- {
- pCanBeWalkable = TRUE;
- pCanBeStaticObstacle = TRUE;
- pCanBeDynamicObstacle = TRUE;
- }
- }
- }
+ pCanBeWalkable = FALSE;
+ pCanBeStaticObstacle = FALSE;
+ pCanBeDynamicObstacle = FALSE;
+ pCanBeMaterialVolume = FALSE;
+ pCanBeExclusionVolume = FALSE;
+ pCanBeDynamicPhantom = FALSE;
+
+ for (const_iterator objectIter = begin();
+ !(pCanBeWalkable && pCanBeStaticObstacle && pCanBeDynamicObstacle && pCanBeMaterialVolume && pCanBeExclusionVolume && pCanBeDynamicPhantom) && (objectIter != end());
+ ++objectIter)
+ {
+ const LLPathfindingObjectPtr objectPtr = objectIter->second;
+ const LLPathfindingLinkset *linkset = dynamic_cast<const LLPathfindingLinkset *>(objectPtr.get());
+
+ if (linkset->isTerrain())
+ {
+ pCanBeWalkable = TRUE;
+ }
+ else
+ {
+ if (linkset->isModifiable())
+ {
+ pCanBeWalkable = TRUE;
+ pCanBeStaticObstacle = TRUE;
+ pCanBeDynamicObstacle = TRUE;
+ pCanBeDynamicPhantom = TRUE;
+ if (linkset->canBeVolume())
+ {
+ pCanBeMaterialVolume = TRUE;
+ pCanBeExclusionVolume = TRUE;
+ }
+ }
+ else if (linkset->isPhantom())
+ {
+ pCanBeDynamicPhantom = TRUE;
+ if (linkset->canBeVolume())
+ {
+ pCanBeMaterialVolume = TRUE;
+ pCanBeExclusionVolume = TRUE;
+ }
+ }
+ else
+ {
+ pCanBeWalkable = TRUE;
+ pCanBeStaticObstacle = TRUE;
+ pCanBeDynamicObstacle = TRUE;
+ }
+ }
+ }
}
void LLPathfindingLinksetList::parseLinksetListData(const LLSD& pLinksetListData)
{
- LLPathfindingObjectMap &objectMap = getObjectMap();
-
- for (LLSD::map_const_iterator linksetDataIter = pLinksetListData.beginMap();
- linksetDataIter != pLinksetListData.endMap(); ++linksetDataIter)
- {
- const std::string& uuid(linksetDataIter->first);
- const LLSD& linksetData = linksetDataIter->second;
- if(linksetData.size() != 0)
- {
- LLPathfindingObjectPtr linksetPtr(new LLPathfindingLinkset(uuid, linksetData));
- objectMap.insert(std::pair<std::string, LLPathfindingObjectPtr>(uuid, linksetPtr));
- }
- }
+ LLPathfindingObjectMap &objectMap = getObjectMap();
+
+ for (LLSD::map_const_iterator linksetDataIter = pLinksetListData.beginMap();
+ linksetDataIter != pLinksetListData.endMap(); ++linksetDataIter)
+ {
+ const std::string& uuid(linksetDataIter->first);
+ const LLSD& linksetData = linksetDataIter->second;
+ if(linksetData.size() != 0)
+ {
+ LLPathfindingObjectPtr linksetPtr(new LLPathfindingLinkset(uuid, linksetData));
+ objectMap.insert(std::pair<std::string, LLPathfindingObjectPtr>(uuid, linksetPtr));
+ }
+ }
}