PATH-243: Refactoring the implementation for the render mode buttons on the console. Removing the warning messages for methods that now have implementations.
parent
9e1479d610
commit
a376d6314d
|
|
@ -1110,9 +1110,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>eb012d9239baaedb4e9d693f96c41c24</string>
|
||||
<string>3e743d07fabd82a6c8fdfed2c52aa9b1</string>
|
||||
<key>url</key>
|
||||
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/248704/arch/Linux/installer/llphysicsextensions-0.1-linux-20120131.tar.bz2</string>
|
||||
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/248734/arch/Linux/installer/llphysicsextensions-0.1-linux-20120131.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>linux</string>
|
||||
|
|
@ -1122,9 +1122,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>ea4011dd6f0736b3d50d9bf012c753d8</string>
|
||||
<string>d03a4b2abb8d883a29f21d0fdb9ecacd</string>
|
||||
<key>url</key>
|
||||
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/248704/arch/CYGWIN/installer/llphysicsextensions-0.1-windows-20120130.tar.bz2</string>
|
||||
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/248734/arch/CYGWIN/installer/llphysicsextensions-0.1-windows-20120131.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows</string>
|
||||
|
|
|
|||
|
|
@ -445,7 +445,7 @@ void LLFloaterPathfindingConsole::onShowExcludeVolumesToggle()
|
|||
LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance();
|
||||
if (llPathingLibInstance != NULL)
|
||||
{
|
||||
llPathingLibInstance->setRenderNavMeshandShapes(checkBoxValue);
|
||||
llPathingLibInstance->setRenderShapes(checkBoxValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -458,15 +458,33 @@ void LLFloaterPathfindingConsole::onShowPathToggle()
|
|||
{
|
||||
BOOL checkBoxValue = mShowPathCheckBox->get();
|
||||
|
||||
llwarns << "functionality has not yet been implemented to toggle '"
|
||||
<< mShowPathCheckBox->getLabel() << "' to "
|
||||
<< (checkBoxValue ? "ON" : "OFF") << llendl;
|
||||
LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance();
|
||||
if (llPathingLibInstance != NULL)
|
||||
{
|
||||
llPathingLibInstance->setRenderPath(checkBoxValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
mShowPathCheckBox->set(FALSE);
|
||||
llwarns << "cannot find LLPathingLib instance" << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterPathfindingConsole::onShowWaterPlaneToggle()
|
||||
{
|
||||
BOOL checkBoxValue = mShowWaterPlaneCheckBox->get();
|
||||
|
||||
LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance();
|
||||
if (llPathingLibInstance != NULL)
|
||||
{
|
||||
llPathingLibInstance->setRenderWaterPlane(checkBoxValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
mShowWaterPlaneCheckBox->set(FALSE);
|
||||
llwarns << "cannot find LLPathingLib instance" << llendl;
|
||||
}
|
||||
|
||||
llwarns << "functionality has not yet been implemented to toggle '"
|
||||
<< mShowWaterPlaneCheckBox->getLabel() << "' to "
|
||||
<< (checkBoxValue ? "ON" : "OFF") << llendl;
|
||||
|
|
@ -474,21 +492,27 @@ void LLFloaterPathfindingConsole::onShowWaterPlaneToggle()
|
|||
|
||||
void LLFloaterPathfindingConsole::onRegionOverlayDisplaySwitch()
|
||||
{
|
||||
switch (getRegionOverlayDisplay())
|
||||
LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance();
|
||||
if (llPathingLibInstance != NULL)
|
||||
{
|
||||
case kRenderOverlayOnFixedPhysicsGeometry :
|
||||
llwarns << "functionality has not yet been implemented to toggle '"
|
||||
<< mRegionOverlayDisplayRadioGroup->getName() << "' to RenderOverlayOnFixedPhysicsGeometry"
|
||||
<< llendl;
|
||||
break;
|
||||
case kRenderOverlayOnAllRenderableGeometry :
|
||||
llwarns << "functionality has not yet been implemented to toggle '"
|
||||
<< mRegionOverlayDisplayRadioGroup->getName() << "' to RenderOverlayOnAllRenderableGeometry"
|
||||
<< llendl;
|
||||
break;
|
||||
default :
|
||||
llassert(0);
|
||||
break;
|
||||
switch (getRegionOverlayDisplay())
|
||||
{
|
||||
case kRenderOverlayOnFixedPhysicsGeometry :
|
||||
llPathingLibInstance->setRenderOverlayMode(false);
|
||||
break;
|
||||
case kRenderOverlayOnAllRenderableGeometry :
|
||||
llPathingLibInstance->setRenderOverlayMode(true);
|
||||
break;
|
||||
default :
|
||||
llPathingLibInstance->setRenderOverlayMode(false);
|
||||
llassert(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this->setRegionOverlayDisplay(kRenderOverlayOnFixedPhysicsGeometry);
|
||||
llwarns << "cannot find LLPathingLib instance" << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -599,11 +623,6 @@ void LLFloaterPathfindingConsole::onTerrainMaterialDSet()
|
|||
}
|
||||
|
||||
|
||||
BOOL LLFloaterPathfindingConsole::allowAllRenderables() const
|
||||
{
|
||||
return getRegionOverlayDisplay() == kRenderOverlayOnAllRenderableGeometry ? true : false;
|
||||
}
|
||||
|
||||
void LLFloaterPathfindingConsole::providePathingData( const LLVector3& point1, const LLVector3& point2 )
|
||||
{
|
||||
switch (getPathSelectionState())
|
||||
|
|
|
|||
|
|
@ -31,13 +31,13 @@
|
|||
#include "llfloater.h"
|
||||
#include "llnavmeshstation.h"
|
||||
#include "LLPathingLib.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
|
||||
class LLSD;
|
||||
class LLRadioGroup;
|
||||
class LLSliderCtrl;
|
||||
class LLLineEditor;
|
||||
class LLTextBase;
|
||||
class LLCheckBoxCtrl;
|
||||
|
||||
class LLFloaterPathfindingConsole
|
||||
: public LLFloater
|
||||
|
|
@ -67,8 +67,6 @@ public:
|
|||
} ECharacterType;
|
||||
|
||||
virtual BOOL postBuild();
|
||||
//Accessor to determine whether renderables are allowed
|
||||
BOOL allowAllRenderables() const;
|
||||
//Populates a data packet that is forwarded onto the LLPathingSystem
|
||||
void providePathingData( const LLVector3& point1, const LLVector3& point2 );
|
||||
|
||||
|
|
@ -96,8 +94,6 @@ public:
|
|||
F32 getTerrainMaterialD() const;
|
||||
void setTerrainMaterialD(F32 pTerrainMaterial);
|
||||
|
||||
BOOL getShowPathToggle() const {return mShowPathCheckBox->get(); }
|
||||
|
||||
void setHasNavMeshReceived();
|
||||
void setHasNoNavMesh();
|
||||
|
||||
|
|
|
|||
|
|
@ -885,7 +885,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
|
|||
LLAppViewer::instance()->pingMainloopTimeout("Display:RenderGeom");
|
||||
bool exclusiveDraw = false;
|
||||
BOOL allowRenderables = false;
|
||||
BOOL allowPathToBeDrawn = false;
|
||||
if (!(LLAppViewer::instance()->logoutRequestSent() && LLAppViewer::instance()->hasSavedFinalSnapshot())
|
||||
&& !gRestoreGL)
|
||||
{
|
||||
|
|
@ -899,38 +898,31 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
|
|||
else
|
||||
{
|
||||
//Render any navmesh geometry
|
||||
if ( LLPathingLib::getInstance() )
|
||||
LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance();
|
||||
if ( llPathingLibInstance != NULL )
|
||||
{
|
||||
//Determine if we can should overlay the navmesh ontop of the scenes typical renderables
|
||||
LLFloaterPathfindingConsole* pFloater = LLFloaterReg::getTypedInstance<LLFloaterPathfindingConsole>("pathfinding_console");
|
||||
if ( pFloater && pFloater->allowAllRenderables() )
|
||||
{
|
||||
allowRenderables = true;
|
||||
}
|
||||
//Determine if we should also draw a user supplied path on top of the scene
|
||||
if ( pFloater && pFloater->getShowPathToggle() )
|
||||
{
|
||||
allowPathToBeDrawn = true;
|
||||
}
|
||||
allowRenderables = llPathingLibInstance->getRenderOverlayMode();
|
||||
|
||||
//NavMesh
|
||||
if ( LLPathingLib::getInstance()->getRenderNavMeshState() )
|
||||
if ( llPathingLibInstance->getRenderNavMeshState() )
|
||||
{
|
||||
glClearColor(0.0f, 0.0f, 0.0f, 0.5f);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
gGL.setAmbientLightColor( LLColor4::white );
|
||||
LLPathingLib::getInstance()->renderNavMesh( allowRenderables );
|
||||
llPathingLibInstance->renderNavMesh();
|
||||
exclusiveDraw = true;
|
||||
}
|
||||
//physics/exclusion shapes
|
||||
if ( LLPathingLib::getInstance()->getRenderShapeState() )
|
||||
if ( llPathingLibInstance->getRenderShapesState() )
|
||||
{
|
||||
LLPathingLib::getInstance()->renderNavMeshShapesVBO();
|
||||
llPathingLibInstance->renderNavMeshShapesVBO();
|
||||
exclusiveDraw = true;
|
||||
}
|
||||
//User designated path
|
||||
if ( allowPathToBeDrawn )
|
||||
if ( llPathingLibInstance->getRenderPathState() )
|
||||
{
|
||||
LLPathingLib::getInstance()->renderPath();
|
||||
llPathingLibInstance->renderPath();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue