summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpathfindingconsole.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterpathfindingconsole.h')
-rw-r--r--indra/newview/llfloaterpathfindingconsole.h84
1 files changed, 51 insertions, 33 deletions
diff --git a/indra/newview/llfloaterpathfindingconsole.h b/indra/newview/llfloaterpathfindingconsole.h
index 34a68ebed1..b1886fb716 100644
--- a/indra/newview/llfloaterpathfindingconsole.h
+++ b/indra/newview/llfloaterpathfindingconsole.h
@@ -30,11 +30,12 @@
#include "llfloater.h"
#include "llhandle.h"
-#include "llnavmeshstation.h"
#include "LLPathingLib.h"
#include "llpathfindingmanager.h"
+#include "llpathfindingnavmeshzone.h"
class LLSD;
+class LLPanel;
class LLRadioGroup;
class LLSliderCtrl;
class LLLineEditor;
@@ -108,22 +109,28 @@ public:
ECharacterType getCharacterType() const;
void setCharacterType(ECharacterType pCharacterType);
- void setHasNavMeshReceived();
- void setHasNoNavMesh();
-
bool getHeartBeat() const { return mHeartBeat;}
void setHeartBeat( bool state ) { mHeartBeat=state; }
protected:
private:
+ typedef enum
+ {
+ kConsoleStateUnknown,
+ kConsoleStateLibraryNotImplemented,
+ kConsoleStateRegionNotEnabled,
+ kConsoleStateDownloading,
+ kConsoleStateHasNavMesh,
+ kConsoleStateHasNavMeshDownloading,
+ kConsoleStateError
+ } EConsoleState;
+
// Does its own instance management, so clients not allowed
// to allocate or destroy.
LLFloaterPathfindingConsole(const LLSD& pSeed);
virtual ~LLFloaterPathfindingConsole();
- std::string getCurrentRegionCapabilityURL() const;
-
void onShowWalkabilitySet();
void onShowWorldToggle();
void onCharacterWidthSet();
@@ -133,8 +140,14 @@ private:
void onFreezeClicked();
void onViewEditLinksetClicked();
void onClearPathClicked();
+ void onNavMeshZoneCB(LLPathfindingNavMeshZone::ENavMeshZoneRequestStatus pNavMeshZoneRequestStatus);
void onAgentStateCB(LLPathfindingManager::EAgentState pAgentState);
+ void setConsoleState(EConsoleState pConsoleState);
+
+ void updateControlsOnConsoleState();
+ void updateStatusOnConsoleState();
+
void setAgentState(LLPathfindingManager::EAgentState pAgentState);
void generatePath();
@@ -142,39 +155,44 @@ private:
void resetShapeRenderFlags() { mShapeRenderFlags = 0; }
void setShapeRenderFlag( LLPathingLib::LLShapeType type ) { mShapeRenderFlags |= (1<<type); }
- LLRootHandle<LLFloaterPathfindingConsole> mSelfHandle;
- LLCheckBoxCtrl *mShowNavMeshCheckBox;
- LLComboBox *mShowNavMeshWalkabilityComboBox;
- LLCheckBoxCtrl *mShowWalkablesCheckBox;
- LLCheckBoxCtrl *mShowStaticObstaclesCheckBox;
- LLCheckBoxCtrl *mShowMaterialVolumesCheckBox;
- LLCheckBoxCtrl *mShowExclusionVolumesCheckBox;
- LLCheckBoxCtrl *mShowWorldCheckBox;
- LLTextBase *mPathfindingStatus;
- LLButton *mViewCharactersButton;
- LLTabContainer *mEditTestTabContainer;
- LLTextBase *mUnfreezeLabel;
- LLButton *mUnfreezeButton;
- LLTextBase *mLinksetsLabel;
- LLButton *mLinksetsButton;
- LLTextBase *mFreezeLabel;
- LLButton *mFreezeButton;
- LLSliderCtrl *mCharacterWidthSlider;
- LLRadioGroup *mCharacterTypeRadioGroup;
- LLTextBase *mPathTestingStatus;
- LLButton *mClearPathButton;
- LLPathfindingManager::agent_state_slot_t mAgentStateSlot;
-
- LLNavMeshDownloadObserver mNavMeshDownloadObserver[10];
- int mCurrentMDO;
- int mNavMeshCnt;
- U32 mNeighboringRegion;
+ LLRootHandle<LLFloaterPathfindingConsole> mSelfHandle;
+ LLCheckBoxCtrl *mShowNavMeshCheckBox;
+ LLComboBox *mShowNavMeshWalkabilityComboBox;
+ LLCheckBoxCtrl *mShowWalkablesCheckBox;
+ LLCheckBoxCtrl *mShowStaticObstaclesCheckBox;
+ LLCheckBoxCtrl *mShowMaterialVolumesCheckBox;
+ LLCheckBoxCtrl *mShowExclusionVolumesCheckBox;
+ LLCheckBoxCtrl *mShowWorldCheckBox;
+ LLTextBase *mPathfindingStatus;
+ LLButton *mViewCharactersButton;
+ LLTabContainer *mEditTestTabContainer;
+ LLPanel *mEditTab;
+ LLPanel *mTestTab;
+ LLTextBase *mUnfreezeLabel;
+ LLButton *mUnfreezeButton;
+ LLTextBase *mLinksetsLabel;
+ LLButton *mLinksetsButton;
+ LLTextBase *mFreezeLabel;
+ LLButton *mFreezeButton;
+ LLSliderCtrl *mCharacterWidthSlider;
+ LLRadioGroup *mCharacterTypeRadioGroup;
+ LLTextBase *mPathTestingStatus;
+ LLButton *mClearPathButton;
+
+
+ LLPathfindingNavMeshZone::navmesh_zone_slot_t mNavMeshZoneSlot;
+ LLPathfindingNavMeshZone mNavMeshZone;
+ LLPathfindingManager::agent_state_slot_t mAgentStateSlot;
+
+ EConsoleState mConsoleState;
+
//Container that is populated and subsequently submitted to the LLPathingSystem for processing
LLPathingLib::PathingPacket mPathData;
bool mHasStartPoint;
bool mHasEndPoint;
U32 mShapeRenderFlags;
bool mHeartBeat;
+
static LLHandle<LLFloaterPathfindingConsole> sInstanceHandle;
};