diff options
author | Todd Stinson <stinson@lindenlab.com> | 2012-04-18 18:22:06 -0700 |
---|---|---|
committer | Todd Stinson <stinson@lindenlab.com> | 2012-04-18 18:22:06 -0700 |
commit | d2850572a452d74625a9b736563c479bc5f1e4cc (patch) | |
tree | aa9a804ba0973230d11cead43e6171e3680d5f9d | |
parent | 1cdef4903daea1622923550b1328b659a594b029 (diff) |
Updating llpathinglibrary method calls to cleaned-up version of the library interface.
-rw-r--r-- | autobuild.xml | 12 | ||||
-rw-r--r-- | indra/newview/llfloaterpathfindingconsole.cpp | 90 | ||||
-rw-r--r-- | indra/newview/llfloaterpathfindingconsole.h | 15 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 20 |
4 files changed, 31 insertions, 106 deletions
diff --git a/autobuild.xml b/autobuild.xml index 0072ff9eb1..525135432c 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -1110,9 +1110,9 @@ <key>archive</key> <map> <key>hash</key> - <string>ed3d2ad74df0fd03d4971fe7b2334e29</string> + <string>76e903ef69eb5f11036f9e1641145cef</string> <key>url</key> - <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/254001/arch/Darwin/installer/llphysicsextensions-0.1-darwin-20120416.tar.bz2</string> + <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/254134/arch/Darwin/installer/llphysicsextensions-0.1-darwin-20120418.tar.bz2</string> </map> <key>name</key> <string>darwin</string> @@ -1122,9 +1122,9 @@ <key>archive</key> <map> <key>hash</key> - <string>06446d6e1afa0f796473e75ba92190f3</string> + <string>d41feceb29918e9ba9bc30efbc6398f3</string> <key>url</key> - <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/254110/arch/Linux/installer/llphysicsextensions-0.1-linux-20120418.tar.bz2</string> + <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/254134/arch/Linux/installer/llphysicsextensions-0.1-linux-20120419.tar.bz2</string> </map> <key>name</key> <string>linux</string> @@ -1134,9 +1134,9 @@ <key>archive</key> <map> <key>hash</key> - <string>f187c07e492ee0e011d1efe64dc766ef</string> + <string>1be964c5bad53e992657fca73330de9f</string> <key>url</key> - <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/254110/arch/CYGWIN/installer/llphysicsextensions-0.1-windows-20120418.tar.bz2</string> + <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/254134/arch/CYGWIN/installer/llphysicsextensions-0.1-windows-20120418.tar.bz2</string> </map> <key>name</key> <string>windows</string> diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp index 59f72edc61..92011a9524 100644 --- a/indra/newview/llfloaterpathfindingconsole.cpp +++ b/indra/newview/llfloaterpathfindingconsole.cpp @@ -333,85 +333,55 @@ void LLFloaterPathfindingConsole::setRenderXRay(BOOL pIsRenderXRay) mShowXRayCheckBox->set(pIsRenderXRay);
}
-LLFloaterPathfindingConsole::ERenderHeatmapType LLFloaterPathfindingConsole::getRenderHeatmapType() const
+LLPathingLib::LLPLCharacterType LLFloaterPathfindingConsole::getRenderHeatmapType() const
{
- ERenderHeatmapType renderHeatmapType;
+ LLPathingLib::LLPLCharacterType renderHeatmapType;
switch (mShowNavMeshWalkabilityComboBox->getValue().asInteger())
{
case XUI_RENDER_HEATMAP_NONE :
- renderHeatmapType = kRenderHeatmapNone;
+ renderHeatmapType = LLPathingLib::LLPL_CHARACTER_TYPE_NONE;
break;
case XUI_RENDER_HEATMAP_A :
- renderHeatmapType = kRenderHeatmapA;
+ renderHeatmapType = LLPathingLib::LLPL_CHARACTER_TYPE_A;
break;
case XUI_RENDER_HEATMAP_B :
- renderHeatmapType = kRenderHeatmapB;
+ renderHeatmapType = LLPathingLib::LLPL_CHARACTER_TYPE_B;
break;
case XUI_RENDER_HEATMAP_C :
- renderHeatmapType = kRenderHeatmapC;
+ renderHeatmapType = LLPathingLib::LLPL_CHARACTER_TYPE_C;
break;
case XUI_RENDER_HEATMAP_D :
- renderHeatmapType = kRenderHeatmapD;
+ renderHeatmapType = LLPathingLib::LLPL_CHARACTER_TYPE_D;
break;
default :
- renderHeatmapType = kRenderHeatmapNone;
+ renderHeatmapType = LLPathingLib::LLPL_CHARACTER_TYPE_NONE;
llassert(0);
break;
}
- LLPathingLib::getInstance()->rebuildNavMesh( getHeatMapType() );
return renderHeatmapType;
}
-int LLFloaterPathfindingConsole::getHeatMapType() const
-{
- //converts the pathfinding console values to the navmesh filter values
-
- int renderHeatmapType = 4; //none
-
- switch ( mShowNavMeshWalkabilityComboBox->getValue().asInteger() )
- {
- case XUI_RENDER_HEATMAP_A :
- renderHeatmapType = 0;
- break;
- case XUI_RENDER_HEATMAP_B :
- renderHeatmapType = 1;
- break;
- case XUI_RENDER_HEATMAP_C :
- renderHeatmapType = 2;
- break;
- case XUI_RENDER_HEATMAP_D :
- renderHeatmapType = 3;
- break;
- default :
- renderHeatmapType = 4;
- break;
- }
-
- return renderHeatmapType;
-}
-
-
-void LLFloaterPathfindingConsole::setRenderHeatmapType(ERenderHeatmapType pRenderHeatmapType)
+void LLFloaterPathfindingConsole::setRenderHeatmapType(LLPathingLib::LLPLCharacterType pRenderHeatmapType)
{
LLSD comboBoxValue;
switch (pRenderHeatmapType)
{
- case kRenderHeatmapNone :
+ case LLPathingLib::LLPL_CHARACTER_TYPE_NONE :
comboBoxValue = XUI_RENDER_HEATMAP_NONE;
break;
- case kRenderHeatmapA :
+ case LLPathingLib::LLPL_CHARACTER_TYPE_A :
comboBoxValue = XUI_RENDER_HEATMAP_A;
break;
- case kRenderHeatmapB :
+ case LLPathingLib::LLPL_CHARACTER_TYPE_B :
comboBoxValue = XUI_RENDER_HEATMAP_B;
break;
- case kRenderHeatmapC :
+ case LLPathingLib::LLPL_CHARACTER_TYPE_C :
comboBoxValue = XUI_RENDER_HEATMAP_C;
break;
- case kRenderHeatmapD :
+ case LLPathingLib::LLPL_CHARACTER_TYPE_D :
comboBoxValue = XUI_RENDER_HEATMAP_D;
break;
default :
@@ -470,37 +440,7 @@ LLFloaterPathfindingConsole::~LLFloaterPathfindingConsole() void LLFloaterPathfindingConsole::onShowWalkabilitySet()
{
- switch (getRenderHeatmapType())
- {
- case kRenderHeatmapNone :
- llwarns << "functionality has not yet been implemented to toggle '"
- << mShowNavMeshWalkabilityComboBox->getName() << "' to RenderHeatmapNone"
- << llendl;
- break;
- case kRenderHeatmapA :
- llwarns << "functionality has not yet been implemented to toggle '"
- << mShowNavMeshWalkabilityComboBox->getName() << "' to RenderHeatmapA"
- << llendl;
- break;
- case kRenderHeatmapB :
- llwarns << "functionality has not yet been implemented to toggle '"
- << mShowNavMeshWalkabilityComboBox->getName() << "' to RenderHeatmapB"
- << llendl;
- break;
- case kRenderHeatmapC :
- llwarns << "functionality has not yet been implemented to toggle '"
- << mShowNavMeshWalkabilityComboBox->getName() << "' to RenderHeatmapC"
- << llendl;
- break;
- case kRenderHeatmapD :
- llwarns << "functionality has not yet been implemented to toggle '"
- << mShowNavMeshWalkabilityComboBox->getName() << "' to RenderHeatmapD"
- << llendl;
- break;
- default :
- llassert(0);
- break;
- }
+ LLPathingLib::getInstance()->setNavMeshMaterialType(getRenderHeatmapType());
}
void LLFloaterPathfindingConsole::onViewCharactersClicked()
diff --git a/indra/newview/llfloaterpathfindingconsole.h b/indra/newview/llfloaterpathfindingconsole.h index ff8a1d5517..174ceb91ea 100644 --- a/indra/newview/llfloaterpathfindingconsole.h +++ b/indra/newview/llfloaterpathfindingconsole.h @@ -54,15 +54,6 @@ class LLFloaterPathfindingConsole friend class LLFloaterReg;
public:
- typedef enum
- {
- kRenderHeatmapNone,
- kRenderHeatmapA,
- kRenderHeatmapB,
- kRenderHeatmapC,
- kRenderHeatmapD
- } ERenderHeatmapType;
-
virtual BOOL postBuild();
virtual void onOpen(const LLSD& pKey);
virtual void onClose(bool pIsAppQuitting);
@@ -93,10 +84,8 @@ public: BOOL isRenderAnyShapes() const;
U32 getRenderShapeFlags();
- ERenderHeatmapType getRenderHeatmapType() const;
- void setRenderHeatmapType(ERenderHeatmapType pRenderHeatmapType);
-
- int getHeatMapType() const;
+ LLPathingLib::LLPLCharacterType getRenderHeatmapType() const;
+ void setRenderHeatmapType(LLPathingLib::LLPLCharacterType pRenderHeatmapType);
protected:
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 9120d0efa2..d79812aa1b 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -4369,17 +4369,15 @@ void LLPipeline::renderDebug() LLGLEnable cull(GL_CULL_FACE);
LLGLDisable blend(GL_BLEND);
- int materialIndex = pathfindingConsole->getHeatMapType();
-
if ( pathfindingConsole->isRenderWorld() )
{
LLGLEnable blend(GL_BLEND);
gPathfindingProgram.uniform1f("alpha_scale", 0.66f);
- llPathingLibInstance->renderNavMesh( materialIndex );
+ llPathingLibInstance->renderNavMesh();
}
else
{
- llPathingLibInstance->renderNavMesh( materialIndex );
+ llPathingLibInstance->renderNavMesh();
}
//render edges
@@ -4388,12 +4386,12 @@ void LLPipeline::renderDebug() gPathfindingNoNormalsProgram.bind();
gPathfindingNoNormalsProgram.uniform1f("tint", 1.f);
gPathfindingNoNormalsProgram.uniform1f("alpha_scale", 1.f);
- llPathingLibInstance->renderNavMeshEdges( materialIndex );
+ llPathingLibInstance->renderNavMeshEdges();
gPathfindingProgram.bind();
}
else
{
- llPathingLibInstance->renderNavMeshEdges( materialIndex );
+ llPathingLibInstance->renderNavMeshEdges();
}
gGL.flush();
@@ -4550,8 +4548,6 @@ void LLPipeline::renderDebug() glLineWidth(2.0f);
LLGLEnable cull(GL_CULL_FACE);
- int materialIndex = pathfindingConsole->getHeatMapType();
-
gPathfindingProgram.uniform1f("tint", gSavedSettings.getF32("PathfindingXRayTint"));
gPathfindingProgram.uniform1f("alpha_scale", gSavedSettings.getF32("PathfindingXRayOpacity"));
@@ -4559,13 +4555,13 @@ void LLPipeline::renderDebug() { //draw hidden wireframe as darker and less opaque
glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
gPathfindingProgram.uniform1f("ambiance", 1.f);
- llPathingLibInstance->renderNavMesh( materialIndex );
+ llPathingLibInstance->renderNavMesh();
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
}
else
{
gPathfindingProgram.uniform1f("ambiance", ambiance);
- llPathingLibInstance->renderNavMesh( materialIndex );
+ llPathingLibInstance->renderNavMesh();
}
//render edges
@@ -4574,12 +4570,12 @@ void LLPipeline::renderDebug() gPathfindingNoNormalsProgram.bind();
gPathfindingNoNormalsProgram.uniform1f("tint", gSavedSettings.getF32("PathfindingXRayTint"));
gPathfindingNoNormalsProgram.uniform1f("alpha_scale", gSavedSettings.getF32("PathfindingXRayOpacity"));
- llPathingLibInstance->renderNavMeshEdges( materialIndex );
+ llPathingLibInstance->renderNavMeshEdges();
gPathfindingProgram.bind();
}
else
{
- llPathingLibInstance->renderNavMeshEdges( materialIndex );
+ llPathingLibInstance->renderNavMeshEdges();
}
gGL.flush();
|