From 6da6870e7df0b72ba3a67a0e87ee19a52d1c1547 Mon Sep 17 00:00:00 2001 From: prep Date: Wed, 21 Dec 2011 14:58:09 -0500 Subject: Support for generating a viewer side path from mouse input. --- indra/newview/llfloaterpathfindingconsole.cpp | 31 ++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloaterpathfindingconsole.cpp') diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp index 46017ccdfc..5a30da355e 100644 --- a/indra/newview/llfloaterpathfindingconsole.cpp +++ b/indra/newview/llfloaterpathfindingconsole.cpp @@ -430,7 +430,36 @@ F32 LLFloaterPathfindingConsole::getTerrainMaterialD() const { return mTerrainMaterialD->getValue().asReal(); } -BOOL LLFloaterPathfindingConsole::allowAllRenderables() + +BOOL LLFloaterPathfindingConsole::allowAllRenderables() const { return getRegionOverlayDisplay() == kRenderOverlayOnAllRenderableGeometry ? true : false; +} + +void LLFloaterPathfindingConsole::providePathingData( const LLVector3& point1, const LLVector3& point2 ) +{ + switch (getPathSelectionState()) + { + case kPathSelectNone : + llwarns << "not yet been implemented to toggle '" + << mPathSelectionRadioGroup->getName() << "' to PathSelectNone" + << llendl; + break; + + case kPathSelectStartPoint : + mPathData.mStartPointA = point1; + mPathData.mEndPointA = point2; + break; + + case kPathSelectEndPoint : + mPathData.mStartPointB = point1; + mPathData.mEndPointB = point2; + //prep#TODO# possibly consider an alternate behavior - perhaps add a "path" button to submit the data. + LLPathingLib::getInstance()->generatePath( mPathData ); + break; + + default : + llassert(0); + break; + } } \ No newline at end of file -- cgit v1.2.3