Moving the bulk of the display settings into the viewer.
parent
9898f55d1a
commit
e5d59b3c2a
|
|
@ -1110,9 +1110,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>ba4f8022af6ef39ed7ec9f64125a24fc</string>
|
||||
<string>a8b7d7071fa2dfd894a3a1fededc4683</string>
|
||||
<key>url</key>
|
||||
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary_lion/rev/249340/arch/Darwin/installer/llphysicsextensions-0.1-darwin-20120213.tar.bz2</string>
|
||||
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary_lion/rev/249502/arch/Darwin/installer/llphysicsextensions-0.1-darwin-20120214.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>darwin</string>
|
||||
|
|
@ -1122,9 +1122,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>dd3511c52085833843dcb6eb03681509</string>
|
||||
<string>ffccb6ea00131f6754b9d6bc4bdc83a1</string>
|
||||
<key>url</key>
|
||||
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/249128/arch/Linux/installer/llphysicsextensions-0.1-linux-20120208.tar.bz2</string>
|
||||
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/249501/arch/Linux/installer/llphysicsextensions-0.1-linux-20120215.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>linux</string>
|
||||
|
|
@ -1134,9 +1134,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>3c68384687fcaafb8b1edc776296c02b</string>
|
||||
<string>a6d14591055cef01a64516d67bd23de2</string>
|
||||
<key>url</key>
|
||||
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/249340/arch/CYGWIN/installer/llphysicsextensions-0.1-windows-20120213.tar.bz2</string>
|
||||
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/249502/arch/CYGWIN/installer/llphysicsextensions-0.1-windows-20120214.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows</string>
|
||||
|
|
|
|||
|
|
@ -68,23 +68,18 @@ BOOL LLFloaterPathfindingConsole::postBuild()
|
|||
|
||||
mShowNavMeshCheckBox = findChild<LLCheckBoxCtrl>("show_navmesh");
|
||||
llassert(mShowNavMeshCheckBox != NULL);
|
||||
mShowNavMeshCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowNavMeshToggle, this));
|
||||
|
||||
mShowWalkablesCheckBox = findChild<LLCheckBoxCtrl>("show_walkables");
|
||||
llassert(mShowWalkablesCheckBox != NULL);
|
||||
mShowWalkablesCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowWalkablesToggle, this));
|
||||
|
||||
mShowStaticObstaclesCheckBox = findChild<LLCheckBoxCtrl>("show_static_obstacles");
|
||||
llassert(mShowStaticObstaclesCheckBox != NULL);
|
||||
mShowStaticObstaclesCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowStaticObstaclesToggle, this));
|
||||
|
||||
mShowMaterialVolumesCheckBox = findChild<LLCheckBoxCtrl>("show_material_volumes");
|
||||
llassert(mShowMaterialVolumesCheckBox != NULL);
|
||||
mShowMaterialVolumesCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowMaterialVolumesToggle, this));
|
||||
|
||||
mShowExclusionVolumesCheckBox = findChild<LLCheckBoxCtrl>("show_exclusion_volumes");
|
||||
llassert(mShowExclusionVolumesCheckBox != NULL);
|
||||
mShowExclusionVolumesCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowExclusionVolumesToggle, this));
|
||||
|
||||
mShowWorldCheckBox = findChild<LLCheckBoxCtrl>("show_world");
|
||||
llassert(mShowWorldCheckBox != NULL);
|
||||
|
|
@ -159,6 +154,71 @@ LLHandle<LLFloaterPathfindingConsole> LLFloaterPathfindingConsole::getInstanceHa
|
|||
return sInstanceHandle;
|
||||
}
|
||||
|
||||
BOOL LLFloaterPathfindingConsole::isRenderPath() const
|
||||
{
|
||||
return (mHasStartPoint && mHasEndPoint);
|
||||
}
|
||||
|
||||
BOOL LLFloaterPathfindingConsole::isRenderNavMesh() const
|
||||
{
|
||||
return mShowNavMeshCheckBox->get();
|
||||
}
|
||||
|
||||
void LLFloaterPathfindingConsole::setRenderNavMesh(BOOL pIsRenderNavMesh)
|
||||
{
|
||||
mShowNavMeshCheckBox->set(pIsRenderNavMesh);
|
||||
}
|
||||
|
||||
BOOL LLFloaterPathfindingConsole::isRenderWalkables() const
|
||||
{
|
||||
return mShowWalkablesCheckBox->get();
|
||||
}
|
||||
|
||||
void LLFloaterPathfindingConsole::setRenderWalkables(BOOL pIsRenderWalkables)
|
||||
{
|
||||
mShowWalkablesCheckBox->set(pIsRenderWalkables);
|
||||
}
|
||||
|
||||
BOOL LLFloaterPathfindingConsole::isRenderStaticObstacles() const
|
||||
{
|
||||
return mShowStaticObstaclesCheckBox->get();
|
||||
}
|
||||
|
||||
void LLFloaterPathfindingConsole::setRenderStaticObstacles(BOOL pIsRenderStaticObstacles)
|
||||
{
|
||||
mShowStaticObstaclesCheckBox->set(pIsRenderStaticObstacles);
|
||||
}
|
||||
|
||||
BOOL LLFloaterPathfindingConsole::isRenderMaterialVolumes() const
|
||||
{
|
||||
return mShowMaterialVolumesCheckBox->get();
|
||||
}
|
||||
|
||||
void LLFloaterPathfindingConsole::setRenderMaterialVolumes(BOOL pIsRenderMaterialVolumes)
|
||||
{
|
||||
mShowMaterialVolumesCheckBox->set(pIsRenderMaterialVolumes);
|
||||
}
|
||||
|
||||
BOOL LLFloaterPathfindingConsole::isRenderExclusionVolumes() const
|
||||
{
|
||||
return mShowExclusionVolumesCheckBox->get();
|
||||
}
|
||||
|
||||
void LLFloaterPathfindingConsole::setRenderExclusionVolumes(BOOL pIsRenderExclusionVolumes)
|
||||
{
|
||||
mShowExclusionVolumesCheckBox->set(pIsRenderExclusionVolumes);
|
||||
}
|
||||
|
||||
BOOL LLFloaterPathfindingConsole::isRenderWorld() const
|
||||
{
|
||||
return mShowWorldCheckBox->get();
|
||||
}
|
||||
|
||||
void LLFloaterPathfindingConsole::setRenderWorld(BOOL pIsRenderWorld)
|
||||
{
|
||||
mShowWorldCheckBox->set(pIsRenderWorld);
|
||||
}
|
||||
|
||||
F32 LLFloaterPathfindingConsole::getCharacterWidth() const
|
||||
{
|
||||
return mCharacterWidthSlider->getValueF32();
|
||||
|
|
@ -337,106 +397,9 @@ void LLFloaterPathfindingConsole::onOpen(const LLSD& pKey)
|
|||
llinfos<<"Region has does not required caps of type ["<<capability<<"]"<<llendl;
|
||||
}
|
||||
}
|
||||
LLPathingLib::getInstance()->setRenderPath(true);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterPathfindingConsole::onClose(bool app_quitting)
|
||||
{
|
||||
//make sure we have a pathing system
|
||||
if ( !LLPathingLib::getInstance() )
|
||||
{
|
||||
LLPathingLib::getInstance()->setRenderPath(false);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterPathfindingConsole::onShowNavMeshToggle()
|
||||
{
|
||||
BOOL checkBoxValue = mShowNavMeshCheckBox->get();
|
||||
|
||||
LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance();
|
||||
if (llPathingLibInstance != NULL)
|
||||
{
|
||||
llPathingLibInstance->setRenderNavMesh(checkBoxValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
mShowNavMeshCheckBox->set(FALSE);
|
||||
llwarns << "cannot find LLPathingLib instance" << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterPathfindingConsole::onShowWalkablesToggle()
|
||||
{
|
||||
BOOL checkBoxValue = mShowWalkablesCheckBox->get();
|
||||
|
||||
LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance();
|
||||
if (llPathingLibInstance != NULL)
|
||||
{
|
||||
//llPathingLibInstance->setRenderNavMesh(checkBoxValue);
|
||||
llwarns << "functionality has not yet been implemented to set walkables to "
|
||||
<< (checkBoxValue ? "TRUE" : "FALSE") << llendl;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
mShowWalkablesCheckBox->set(FALSE);
|
||||
llwarns << "cannot find LLPathingLib instance" << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterPathfindingConsole::onShowStaticObstaclesToggle()
|
||||
{
|
||||
BOOL checkBoxValue = mShowStaticObstaclesCheckBox->get();
|
||||
|
||||
LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance();
|
||||
if (llPathingLibInstance != NULL)
|
||||
{
|
||||
//llPathingLibInstance->setRenderNavMesh(checkBoxValue);
|
||||
llwarns << "functionality has not yet been implemented to set static obstacles to "
|
||||
<< (checkBoxValue ? "TRUE" : "FALSE") << llendl;
|
||||
}
|
||||
else
|
||||
{
|
||||
mShowStaticObstaclesCheckBox->set(FALSE);
|
||||
llwarns << "cannot find LLPathingLib instance" << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterPathfindingConsole::onShowMaterialVolumesToggle()
|
||||
{
|
||||
BOOL checkBoxValue = mShowMaterialVolumesCheckBox->get();
|
||||
|
||||
LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance();
|
||||
if (llPathingLibInstance != NULL)
|
||||
{
|
||||
//llPathingLibInstance->setRenderNavMesh(checkBoxValue);
|
||||
llwarns << "functionality has not yet been implemented to set material volumes to "
|
||||
<< (checkBoxValue ? "TRUE" : "FALSE") << llendl;
|
||||
}
|
||||
else
|
||||
{
|
||||
mShowMaterialVolumesCheckBox->set(FALSE);
|
||||
llwarns << "cannot find LLPathingLib instance" << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterPathfindingConsole::onShowExclusionVolumesToggle()
|
||||
{
|
||||
BOOL checkBoxValue = mShowExclusionVolumesCheckBox->get();
|
||||
|
||||
LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance();
|
||||
if (llPathingLibInstance != NULL)
|
||||
{
|
||||
llPathingLibInstance->setRenderShapes(checkBoxValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
mShowExclusionVolumesCheckBox->set(FALSE);
|
||||
llwarns << "cannot find LLPathingLib instance" << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterPathfindingConsole::onShowWorldToggle()
|
||||
{
|
||||
BOOL checkBoxValue = mShowWorldCheckBox->get();
|
||||
|
|
@ -444,7 +407,7 @@ void LLFloaterPathfindingConsole::onShowWorldToggle()
|
|||
LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance();
|
||||
if (llPathingLibInstance != NULL)
|
||||
{
|
||||
llPathingLibInstance->setRenderOverlayMode(checkBoxValue);
|
||||
llPathingLibInstance->setRenderWorld(checkBoxValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -62,6 +62,26 @@ public:
|
|||
|
||||
static LLHandle<LLFloaterPathfindingConsole> getInstanceHandle();
|
||||
|
||||
BOOL isRenderPath() const;
|
||||
|
||||
BOOL isRenderNavMesh() const;
|
||||
void setRenderNavMesh(BOOL pIsRenderNavMesh);
|
||||
|
||||
BOOL isRenderWalkables() const;
|
||||
void setRenderWalkables(BOOL pIsRenderWalkables);
|
||||
|
||||
BOOL isRenderStaticObstacles() const;
|
||||
void setRenderStaticObstacles(BOOL pIsRenderStaticObstacles);
|
||||
|
||||
BOOL isRenderMaterialVolumes() const;
|
||||
void setRenderMaterialVolumes(BOOL pIsRenderMaterialVolumes);
|
||||
|
||||
BOOL isRenderExclusionVolumes() const;
|
||||
void setRenderExclusionVolumes(BOOL pIsRenderExclusionVolumes);
|
||||
|
||||
BOOL isRenderWorld() const;
|
||||
void setRenderWorld(BOOL pIsRenderWorld);
|
||||
|
||||
F32 getCharacterWidth() const;
|
||||
void setCharacterWidth(F32 pCharacterWidth);
|
||||
|
||||
|
|
@ -80,13 +100,7 @@ private:
|
|||
virtual ~LLFloaterPathfindingConsole();
|
||||
|
||||
virtual void onOpen(const LLSD& pKey);
|
||||
virtual void onClose(bool app_quitting);
|
||||
|
||||
void onShowNavMeshToggle();
|
||||
void onShowWalkablesToggle();
|
||||
void onShowStaticObstaclesToggle();
|
||||
void onShowMaterialVolumesToggle();
|
||||
void onShowExclusionVolumesToggle();
|
||||
void onShowWorldToggle();
|
||||
void onCharacterWidthSet();
|
||||
void onCharacterTypeSwitch();
|
||||
|
|
|
|||
|
|
@ -900,26 +900,31 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
|
|||
//Render any navmesh geometry
|
||||
LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance();
|
||||
if ( llPathingLibInstance != NULL )
|
||||
{
|
||||
//Determine if we can should overlay the navmesh ontop of the scenes typical renderables
|
||||
allowRenderables = llPathingLibInstance->getRenderOverlayMode();
|
||||
{
|
||||
LLHandle<LLFloaterPathfindingConsole> pathfindingConsoleHandle = LLFloaterPathfindingConsole::getInstanceHandle();
|
||||
if (!pathfindingConsoleHandle.isDead())
|
||||
{
|
||||
LLFloaterPathfindingConsole *pathfindingConsole = pathfindingConsoleHandle.get();
|
||||
//Determine if we can should overlay the navmesh ontop of the scenes typical renderables
|
||||
allowRenderables = pathfindingConsole->isRenderWorld();
|
||||
|
||||
//NavMesh
|
||||
if ( llPathingLibInstance->getRenderNavMeshState() )
|
||||
{
|
||||
llPathingLibInstance->renderNavMesh();
|
||||
exclusiveDraw = true;
|
||||
}
|
||||
//physics/exclusion shapes
|
||||
if ( llPathingLibInstance->getRenderShapesState() )
|
||||
{
|
||||
llPathingLibInstance->renderNavMeshShapesVBO();
|
||||
exclusiveDraw = true;
|
||||
}
|
||||
//User designated path
|
||||
if ( llPathingLibInstance->getRenderPathState() )
|
||||
{
|
||||
llPathingLibInstance->renderPath();
|
||||
//NavMesh
|
||||
if (pathfindingConsole->isRenderNavMesh())
|
||||
{
|
||||
llPathingLibInstance->renderNavMesh();
|
||||
exclusiveDraw = true;
|
||||
}
|
||||
//physics/exclusion shapes
|
||||
if (pathfindingConsole->isRenderExclusionVolumes())
|
||||
{
|
||||
llPathingLibInstance->renderNavMeshShapesVBO();
|
||||
exclusiveDraw = true;
|
||||
}
|
||||
//User designated path
|
||||
if (pathfindingConsole->isRenderPath())
|
||||
{
|
||||
llPathingLibInstance->renderPath();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue