From 06bfbf61e16ffec0e54f131a7f3b37c475f10cd9 Mon Sep 17 00:00:00 2001 From: prep Date: Wed, 4 Jan 2012 13:12:46 -0500 Subject: Path-177. Updated to newest version of LLPathingLibrary --- indra/newview/llfloaterpathfindingconsole.cpp | 1 - indra/newview/llfloaterpathfindingconsole.h | 4 +++- indra/newview/llviewerdisplay.cpp | 13 ++++++++++++- 3 files changed, 15 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp index f66930da79..efa3a592e0 100644 --- a/indra/newview/llfloaterpathfindingconsole.cpp +++ b/indra/newview/llfloaterpathfindingconsole.cpp @@ -32,7 +32,6 @@ #include "llsd.h" #include "llagent.h" #include "llbutton.h" -#include "llcheckboxctrl.h" #include "llradiogroup.h" #include "llsliderctrl.h" #include "lllineeditor.h" diff --git a/indra/newview/llfloaterpathfindingconsole.h b/indra/newview/llfloaterpathfindingconsole.h index 7a9328da57..9f9774b66b 100644 --- a/indra/newview/llfloaterpathfindingconsole.h +++ b/indra/newview/llfloaterpathfindingconsole.h @@ -31,9 +31,9 @@ #include "llfloater.h" #include "llnavmeshstation.h" #include "llpathinglib.h" +#include "llcheckboxctrl.h" class LLSD; -class LLCheckBoxCtrl; class LLRadioGroup; class LLSliderCtrl; class LLLineEditor; @@ -95,6 +95,8 @@ public: F32 getTerrainMaterialD() const; void setTerrainMaterialD(F32 pTerrainMaterial); + BOOL getShowPathToggle() const {return mShowPathCheckBox->get(); } + protected: private: diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index d710076228..2b2dd5ef7c 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -885,6 +885,7 @@ 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) { @@ -906,6 +907,11 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) { allowRenderables = true; } + //Determine if we should also draw a user supplied path on top of the scene + if ( pFloater && pFloater->getShowPathToggle() ) + { + allowPathToBeDrawn = true; + } //Navmesh if ( LLPathingLib::getInstance()->getRenderNavMeshState() ) { @@ -929,7 +935,12 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); LLPathingLib::getInstance()->renderNavMeshShapesVBO(); exclusiveDraw = true; - } + } + //User designated path + if ( allowPathToBeDrawn ) + { + LLPathingLib::getInstance()->renderPath(); + } } } -- cgit v1.2.3 From 88052ff168fa50ae2828745adda240cfd1c17f30 Mon Sep 17 00:00:00 2001 From: prep Date: Wed, 4 Jan 2012 14:31:23 -0500 Subject: path-150: supply characterwidth to LLPathingLibrary: --- indra/newview/llfloaterpathfindingconsole.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp index efa3a592e0..3bf316fdf6 100644 --- a/indra/newview/llfloaterpathfindingconsole.cpp +++ b/indra/newview/llfloaterpathfindingconsole.cpp @@ -557,8 +557,9 @@ void LLFloaterPathfindingConsole::providePathingData( const LLVector3& point1, c break; case kPathSelectEndPoint : - mPathData.mStartPointB = point1; - mPathData.mEndPointB = point2; + mPathData.mStartPointB = point1; + mPathData.mEndPointB = point2; + mPathData.mCharacterWidth = getCharacterWidth(); //prep#TODO# possibly consider an alternate behavior - perhaps add a "path" button to submit the data. LLPathingLib::getInstance()->generatePath( mPathData ); break; -- cgit v1.2.3