summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpathfindingcharacters.cpp
diff options
context:
space:
mode:
authorprep <prep@lindenlab.com>2012-06-07 11:00:58 -0400
committerprep <prep@lindenlab.com>2012-06-07 11:00:58 -0400
commit18509683267385212c6f8652a8da0ab5bf88eb8a (patch)
treebeb5fa197a944769b8301e2cb840b4cdd04d6dfa /indra/newview/llfloaterpathfindingcharacters.cpp
parent208d73f52497c7e4c15f21843428ffa6a3db7aaa (diff)
Physics capsules now inherit the rotations of their parent vo when rendered. API update.
Diffstat (limited to 'indra/newview/llfloaterpathfindingcharacters.cpp')
-rw-r--r--indra/newview/llfloaterpathfindingcharacters.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/indra/newview/llfloaterpathfindingcharacters.cpp b/indra/newview/llfloaterpathfindingcharacters.cpp
index 098881544f..b4a1394b06 100644
--- a/indra/newview/llfloaterpathfindingcharacters.cpp
+++ b/indra/newview/llfloaterpathfindingcharacters.cpp
@@ -74,12 +74,12 @@ void LLFloaterPathfindingCharacters::setShowPhysicsCapsule(BOOL pIsShowPhysicsCa
#endif // SERVER_SIDE_CHARACTER_SHAPE_ROLLOUT_COMPLETE
}
-BOOL LLFloaterPathfindingCharacters::isPhysicsCapsuleEnabled(LLUUID& id, LLVector3& pos) const
+BOOL LLFloaterPathfindingCharacters::isPhysicsCapsuleEnabled(LLUUID& id, LLVector3& pos, LLQuaternion& rot) const
{
id = mSelectedCharacterId;
- // Physics capsule is enable if the checkbox is enabled and if we can get a position
- // for any selected object
- return (isShowPhysicsCapsule() && getCapsulePosition(pos));
+ // Physics capsule is enable if the checkbox is enabled and if we can get the required render
+ // parameters for any selected object
+ return (isShowPhysicsCapsule() && getCapsuleRenderData(pos, rot ));
}
void LLFloaterPathfindingCharacters::openCharactersViewer()
@@ -286,7 +286,7 @@ void LLFloaterPathfindingCharacters::hideCapsule() const
}
}
-bool LLFloaterPathfindingCharacters::getCapsulePosition(LLVector3 &pPosition) const
+bool LLFloaterPathfindingCharacters::getCapsuleRenderData(LLVector3& pPosition, LLQuaternion& rot) const
{
bool result = false;
@@ -298,8 +298,9 @@ bool LLFloaterPathfindingCharacters::getCapsulePosition(LLVector3 &pPosition) co
LLViewerObject *viewerObject = gObjectList.findObject(mSelectedCharacterId);
if ( viewerObject != NULL )
{
- pPosition = viewerObject->getRenderPosition();
- result = true;
+ rot = viewerObject->getRotation() ;
+ pPosition = viewerObject->getRenderPosition();
+ result = true;
}
}