merge
commit
769a743f5d
|
|
@ -42,6 +42,18 @@
|
|||
|
||||
#include "llpathinglib.h"
|
||||
|
||||
#define XUI_RENDER_OVERLAY_ON_FIXED_PHYSICS_GEOMETRY 1
|
||||
#define XUI_RENDER_OVERLAY_ON_ALL_RENDERABLE_GEOMETRY 2
|
||||
|
||||
#define XUI_PATH_SELECT_NONE 0
|
||||
#define XUI_PATH_SELECT_START_POINT 1
|
||||
#define XUI_PATH_SELECT_END_POINT 2
|
||||
|
||||
#define XUI_CHARACTER_TYPE_A 1
|
||||
#define XUI_CHARACTER_TYPE_B 2
|
||||
#define XUI_CHARACTER_TYPE_C 3
|
||||
#define XUI_CHARACTER_TYPE_D 4
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// LLFloaterPathfindingConsole
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
@ -107,6 +119,191 @@ BOOL LLFloaterPathfindingConsole::postBuild()
|
|||
return LLFloater::postBuild();
|
||||
}
|
||||
|
||||
LLFloaterPathfindingConsole::ERegionOverlayDisplay LLFloaterPathfindingConsole::getRegionOverlayDisplay() const
|
||||
{
|
||||
ERegionOverlayDisplay regionOverlayDisplay;
|
||||
switch (mRegionOverlayDisplayRadioGroup->getValue().asInteger())
|
||||
{
|
||||
case XUI_RENDER_OVERLAY_ON_FIXED_PHYSICS_GEOMETRY :
|
||||
regionOverlayDisplay = kRenderOverlayOnFixedPhysicsGeometry;
|
||||
break;
|
||||
case XUI_RENDER_OVERLAY_ON_ALL_RENDERABLE_GEOMETRY :
|
||||
regionOverlayDisplay = kRenderOverlayOnAllRenderableGeometry;
|
||||
break;
|
||||
default :
|
||||
regionOverlayDisplay = kRenderOverlayOnFixedPhysicsGeometry;
|
||||
llassert(0);
|
||||
break;
|
||||
}
|
||||
|
||||
return regionOverlayDisplay;
|
||||
}
|
||||
|
||||
void LLFloaterPathfindingConsole::setRegionOverlayDisplay(ERegionOverlayDisplay pRegionOverlayDisplay)
|
||||
{
|
||||
LLSD radioGroupValue;
|
||||
|
||||
switch (pRegionOverlayDisplay)
|
||||
{
|
||||
case kRenderOverlayOnFixedPhysicsGeometry :
|
||||
radioGroupValue = XUI_RENDER_OVERLAY_ON_FIXED_PHYSICS_GEOMETRY;
|
||||
break;
|
||||
case kRenderOverlayOnAllRenderableGeometry :
|
||||
radioGroupValue = XUI_RENDER_OVERLAY_ON_ALL_RENDERABLE_GEOMETRY;
|
||||
break;
|
||||
default :
|
||||
radioGroupValue = XUI_RENDER_OVERLAY_ON_FIXED_PHYSICS_GEOMETRY;
|
||||
llassert(0);
|
||||
break;
|
||||
}
|
||||
|
||||
mRegionOverlayDisplayRadioGroup->setValue(radioGroupValue);
|
||||
}
|
||||
|
||||
LLFloaterPathfindingConsole::EPathSelectionState LLFloaterPathfindingConsole::getPathSelectionState() const
|
||||
{
|
||||
EPathSelectionState pathSelectionState;
|
||||
|
||||
switch (mPathSelectionRadioGroup->getValue().asInteger())
|
||||
{
|
||||
case XUI_PATH_SELECT_START_POINT :
|
||||
pathSelectionState = kPathSelectStartPoint;
|
||||
break;
|
||||
case XUI_PATH_SELECT_END_POINT :
|
||||
pathSelectionState = kPathSelectEndPoint;
|
||||
break;
|
||||
default :
|
||||
pathSelectionState = kPathSelectNone;
|
||||
break;
|
||||
}
|
||||
|
||||
return pathSelectionState;
|
||||
}
|
||||
|
||||
void LLFloaterPathfindingConsole::setPathSelectionState(EPathSelectionState pPathSelectionState)
|
||||
{
|
||||
LLSD radioGroupValue;
|
||||
|
||||
switch (pPathSelectionState)
|
||||
{
|
||||
case kPathSelectStartPoint :
|
||||
radioGroupValue = XUI_PATH_SELECT_START_POINT;
|
||||
break;
|
||||
case kPathSelectEndPoint :
|
||||
radioGroupValue = XUI_PATH_SELECT_END_POINT;
|
||||
break;
|
||||
default :
|
||||
radioGroupValue = XUI_PATH_SELECT_NONE;
|
||||
break;
|
||||
}
|
||||
|
||||
mPathSelectionRadioGroup->setValue(radioGroupValue);
|
||||
}
|
||||
|
||||
F32 LLFloaterPathfindingConsole::getCharacterWidth() const
|
||||
{
|
||||
return mCharacterWidthSlider->getValueF32();
|
||||
}
|
||||
|
||||
void LLFloaterPathfindingConsole::setCharacterWidth(F32 pCharacterWidth)
|
||||
{
|
||||
mCharacterWidthSlider->setValue(LLSD(pCharacterWidth));
|
||||
}
|
||||
|
||||
LLFloaterPathfindingConsole::ECharacterType LLFloaterPathfindingConsole::getCharacterType() const
|
||||
{
|
||||
ECharacterType characterType;
|
||||
|
||||
switch (mCharacterTypeRadioGroup->getValue().asInteger())
|
||||
{
|
||||
case XUI_CHARACTER_TYPE_A :
|
||||
characterType = kCharacterTypeA;
|
||||
break;
|
||||
case XUI_CHARACTER_TYPE_B :
|
||||
characterType = kCharacterTypeB;
|
||||
break;
|
||||
case XUI_CHARACTER_TYPE_C :
|
||||
characterType = kCharacterTypeC;
|
||||
break;
|
||||
case XUI_CHARACTER_TYPE_D :
|
||||
characterType = kCharacterTypeD;
|
||||
break;
|
||||
default :
|
||||
characterType = kCharacterTypeA;
|
||||
llassert(0);
|
||||
break;
|
||||
}
|
||||
|
||||
return characterType;
|
||||
}
|
||||
|
||||
void LLFloaterPathfindingConsole::setCharacterType(ECharacterType pCharacterType)
|
||||
{
|
||||
LLSD radioGroupValue;
|
||||
|
||||
switch (pCharacterType)
|
||||
{
|
||||
case kCharacterTypeA :
|
||||
radioGroupValue = XUI_CHARACTER_TYPE_A;
|
||||
break;
|
||||
case kCharacterTypeB :
|
||||
radioGroupValue = XUI_CHARACTER_TYPE_B;
|
||||
break;
|
||||
case kCharacterTypeC :
|
||||
radioGroupValue = XUI_CHARACTER_TYPE_C;
|
||||
break;
|
||||
case kCharacterTypeD :
|
||||
radioGroupValue = XUI_CHARACTER_TYPE_D;
|
||||
break;
|
||||
default :
|
||||
radioGroupValue = XUI_CHARACTER_TYPE_A;
|
||||
llassert(0);
|
||||
break;
|
||||
}
|
||||
|
||||
mCharacterTypeRadioGroup->setValue(radioGroupValue);
|
||||
}
|
||||
|
||||
F32 LLFloaterPathfindingConsole::getTerrainMaterialA() const
|
||||
{
|
||||
return mTerrainMaterialA->getValue().asReal();
|
||||
}
|
||||
|
||||
void LLFloaterPathfindingConsole::setTerrainMaterialA(F32 pTerrainMaterial)
|
||||
{
|
||||
mTerrainMaterialA->setValue(LLSD(pTerrainMaterial));
|
||||
}
|
||||
|
||||
F32 LLFloaterPathfindingConsole::getTerrainMaterialB() const
|
||||
{
|
||||
return mTerrainMaterialB->getValue().asReal();
|
||||
}
|
||||
|
||||
void LLFloaterPathfindingConsole::setTerrainMaterialB(F32 pTerrainMaterial)
|
||||
{
|
||||
mTerrainMaterialB->setValue(LLSD(pTerrainMaterial));
|
||||
}
|
||||
|
||||
F32 LLFloaterPathfindingConsole::getTerrainMaterialC() const
|
||||
{
|
||||
return mTerrainMaterialC->getValue().asReal();
|
||||
}
|
||||
|
||||
void LLFloaterPathfindingConsole::setTerrainMaterialC(F32 pTerrainMaterial)
|
||||
{
|
||||
mTerrainMaterialC->setValue(LLSD(pTerrainMaterial));
|
||||
}
|
||||
|
||||
F32 LLFloaterPathfindingConsole::getTerrainMaterialD() const
|
||||
{
|
||||
return mTerrainMaterialD->getValue().asReal();
|
||||
}
|
||||
|
||||
void LLFloaterPathfindingConsole::setTerrainMaterialD(F32 pTerrainMaterial)
|
||||
{
|
||||
mTerrainMaterialD->setValue(LLSD(pTerrainMaterial));
|
||||
}
|
||||
|
||||
LLFloaterPathfindingConsole::LLFloaterPathfindingConsole(const LLSD& pSeed)
|
||||
: LLFloater(pSeed),
|
||||
mShowNavmeshCheckBox(NULL),
|
||||
|
|
@ -339,97 +536,6 @@ void LLFloaterPathfindingConsole::onTerrainMaterialDSet()
|
|||
<< "' to value (" << terrainMaterial << ")" << llendl;
|
||||
}
|
||||
|
||||
LLFloaterPathfindingConsole::ERegionOverlayDisplay LLFloaterPathfindingConsole::getRegionOverlayDisplay() const
|
||||
{
|
||||
ERegionOverlayDisplay regionOverlayDisplay;
|
||||
switch (mRegionOverlayDisplayRadioGroup->getValue().asInteger())
|
||||
{
|
||||
case 1 :
|
||||
regionOverlayDisplay = kRenderOverlayOnFixedPhysicsGeometry;
|
||||
break;
|
||||
case 2:
|
||||
regionOverlayDisplay = kRenderOverlayOnAllRenderableGeometry;
|
||||
break;
|
||||
default :
|
||||
regionOverlayDisplay = kRenderOverlayOnFixedPhysicsGeometry;
|
||||
llassert(0);
|
||||
break;
|
||||
}
|
||||
|
||||
return regionOverlayDisplay;
|
||||
}
|
||||
|
||||
LLFloaterPathfindingConsole::EPathSelectionState LLFloaterPathfindingConsole::getPathSelectionState() const
|
||||
{
|
||||
EPathSelectionState pathSelectionState;
|
||||
|
||||
switch (mPathSelectionRadioGroup->getValue().asInteger())
|
||||
{
|
||||
case 1 :
|
||||
pathSelectionState = kPathSelectStartPoint;
|
||||
break;
|
||||
case 2:
|
||||
pathSelectionState = kPathSelectEndPoint;
|
||||
break;
|
||||
default :
|
||||
pathSelectionState = kPathSelectNone;
|
||||
break;
|
||||
}
|
||||
|
||||
return pathSelectionState;
|
||||
}
|
||||
|
||||
F32 LLFloaterPathfindingConsole::getCharacterWidth() const
|
||||
{
|
||||
return mCharacterWidthSlider->getValueF32();
|
||||
}
|
||||
|
||||
LLFloaterPathfindingConsole::ECharacterType LLFloaterPathfindingConsole::getCharacterType() const
|
||||
{
|
||||
ECharacterType characterType;
|
||||
|
||||
switch (mCharacterTypeRadioGroup->getValue().asInteger())
|
||||
{
|
||||
case 1 :
|
||||
characterType = kCharacterTypeA;
|
||||
break;
|
||||
case 2 :
|
||||
characterType = kCharacterTypeB;
|
||||
break;
|
||||
case 3 :
|
||||
characterType = kCharacterTypeC;
|
||||
break;
|
||||
case 4 :
|
||||
characterType = kCharacterTypeD;
|
||||
break;
|
||||
default :
|
||||
characterType = kCharacterTypeA;
|
||||
llassert(0);
|
||||
break;
|
||||
}
|
||||
|
||||
return characterType;
|
||||
}
|
||||
|
||||
F32 LLFloaterPathfindingConsole::getTerrainMaterialA() const
|
||||
{
|
||||
return mTerrainMaterialA->getValue().asReal();
|
||||
}
|
||||
|
||||
F32 LLFloaterPathfindingConsole::getTerrainMaterialB() const
|
||||
{
|
||||
return mTerrainMaterialB->getValue().asReal();
|
||||
}
|
||||
|
||||
F32 LLFloaterPathfindingConsole::getTerrainMaterialC() const
|
||||
{
|
||||
return mTerrainMaterialC->getValue().asReal();
|
||||
}
|
||||
|
||||
F32 LLFloaterPathfindingConsole::getTerrainMaterialD() const
|
||||
{
|
||||
return mTerrainMaterialD->getValue().asReal();
|
||||
}
|
||||
|
||||
BOOL LLFloaterPathfindingConsole::allowAllRenderables() const
|
||||
{
|
||||
|
|
@ -462,4 +568,4 @@ void LLFloaterPathfindingConsole::providePathingData( const LLVector3& point1, c
|
|||
llassert(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ class LLFloaterPathfindingConsole
|
|||
{
|
||||
friend class LLFloaterReg;
|
||||
|
||||
public:
|
||||
typedef enum
|
||||
{
|
||||
kRenderOverlayOnFixedPhysicsGeometry = 0,
|
||||
|
|
@ -64,12 +65,33 @@ class LLFloaterPathfindingConsole
|
|||
kCharacterTypeD = 3
|
||||
} ECharacterType;
|
||||
|
||||
public:
|
||||
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 );
|
||||
|
||||
EPathSelectionState getPathSelectionState() const;
|
||||
void setPathSelectionState(EPathSelectionState pPathSelectionState);
|
||||
|
||||
F32 getCharacterWidth() const;
|
||||
void setCharacterWidth(F32 pCharacterWidth);
|
||||
|
||||
ECharacterType getCharacterType() const;
|
||||
void setCharacterType(ECharacterType pCharacterType);
|
||||
|
||||
F32 getTerrainMaterialA() const;
|
||||
void setTerrainMaterialA(F32 pTerrainMaterial);
|
||||
|
||||
F32 getTerrainMaterialB() const;
|
||||
void setTerrainMaterialB(F32 pTerrainMaterial);
|
||||
|
||||
F32 getTerrainMaterialC() const;
|
||||
void setTerrainMaterialC(F32 pTerrainMaterial);
|
||||
|
||||
F32 getTerrainMaterialD() const;
|
||||
void setTerrainMaterialD(F32 pTerrainMaterial);
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
|
@ -96,15 +118,6 @@ private:
|
|||
void onTerrainMaterialCSet();
|
||||
void onTerrainMaterialDSet();
|
||||
|
||||
ERegionOverlayDisplay getRegionOverlayDisplay() const;
|
||||
EPathSelectionState getPathSelectionState() const;
|
||||
F32 getCharacterWidth() const;
|
||||
ECharacterType getCharacterType() const;
|
||||
F32 getTerrainMaterialA() const;
|
||||
F32 getTerrainMaterialB() const;
|
||||
F32 getTerrainMaterialC() const;
|
||||
F32 getTerrainMaterialD() const;
|
||||
|
||||
LLCheckBoxCtrl *mShowNavmeshCheckBox;
|
||||
LLCheckBoxCtrl *mShowExcludeVolumesCheckBox;
|
||||
LLCheckBoxCtrl *mShowPathCheckBox;
|
||||
|
|
|
|||
Loading…
Reference in New Issue