diff options
author | prep <prep@lindenlab.com> | 2012-03-28 13:11:45 -0400 |
---|---|---|
committer | prep <prep@lindenlab.com> | 2012-03-28 13:11:45 -0400 |
commit | 901ed57e6bc1fae1c3c0a6f6790c0361298c5744 (patch) | |
tree | 811a2a45af52a410a142262ddff58cf84e95d0e7 /indra/newview/llfloaterpathfindingconsole.cpp | |
parent | 473da43c1bbc20245b3a74c1adc7c92f91d25807 (diff) |
Added support for customizing the colors used in the navmesh visualizer.
Diffstat (limited to 'indra/newview/llfloaterpathfindingconsole.cpp')
-rw-r--r-- | indra/newview/llfloaterpathfindingconsole.cpp | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp index c83153a15d..0af16052d0 100644 --- a/indra/newview/llfloaterpathfindingconsole.cpp +++ b/indra/newview/llfloaterpathfindingconsole.cpp @@ -170,6 +170,7 @@ void LLFloaterPathfindingConsole::onOpen(const LLSD& pKey) }
else
{
+ fillInColorsForNavMeshVisualization();
if (!mNavMeshZoneSlot.connected())
{
mNavMeshZoneSlot = mNavMeshZone.registerNavMeshZoneListener(boost::bind(&LLFloaterPathfindingConsole::onNavMeshZoneCB, this, _1));
@@ -1008,3 +1009,53 @@ void LLFloaterPathfindingConsole::regionCrossingOccured() statusText = getString("navmesh_update_needed");
mPathfindingViewerStatus->setText((LLStringExplicit)statusText, styleParams);
}
+
+void LLFloaterPathfindingConsole::fillInColorsForNavMeshVisualization()
+{
+ LLPathingLib::NavMeshColors colors;
+
+ LLVector3 in = gSavedSettings.getVector3("WalkableRGB");
+ F32 a = gSavedSettings.getF32("WalkableA");
+ colors.mWalkable= LLColor4U( in[0],in[1],in[2],a );
+
+ in = gSavedSettings.getVector3("ObstacleRGB");
+ a = gSavedSettings.getF32("ObstacleA");
+ colors.mObstacle= LLColor4U( in[0],in[1],in[2],a );
+
+ in = gSavedSettings.getVector3("MaterialRGB");
+ a = gSavedSettings.getF32("MaterialA");
+ colors.mMaterial= LLColor4U( in[0],in[1],in[2],a );
+
+ in = gSavedSettings.getVector3("ExclusionRGB");
+ a = gSavedSettings.getF32("ExclusionA");
+ colors.mExclusion= LLColor4U( in[0],in[1],in[2],a );
+
+ in = gSavedSettings.getVector3("ConnectedEdgeRGB");
+ a = gSavedSettings.getF32("ConnectedEdgeA");
+ colors.mConnectedEdge= LLColor4U( in[0],in[1],in[2],a );
+
+ in = gSavedSettings.getVector3("BoundaryEdgeRGB");
+ a = gSavedSettings.getF32("BoundaryEdgeA");
+ colors.mBoundaryEdge= LLColor4U( in[0],in[1],in[2],a );
+
+ in = gSavedSettings.getVector3("HeatColorBase");
+ a = gSavedSettings.getF32("HeatColorBaseA");
+ colors.mHeatColorBase= LLColor4U( in[0],in[1],in[2],a );
+
+ in = gSavedSettings.getVector3("HeatColorMax");
+ a = gSavedSettings.getF32("HeatColorMaxA");
+ colors.mHeatColorMax= LLColor4U( in[0],in[1],in[2],a );
+
+ in = gSavedSettings.getVector3("FaceColorRGB");
+ a = gSavedSettings.getF32("FaceColorA");
+ colors.mFaceColor= LLColor4U( in[0],in[1],in[2],a );
+
+ in = gSavedSettings.getVector3("NavMeshClearRGB");
+ colors.mNavMeshClear= LLColor4U( in[0],in[1],in[2],0 );
+
+ mNavMeshColors = colors;
+
+ LLPathingLib::getInstance()->setNavMeshColors( colors );
+}
+
+
|