summaryrefslogtreecommitdiff
path: root/indra/newview/llpathfindingmanager.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpathfindingmanager.h')
-rw-r--r--indra/newview/llpathfindingmanager.h80
1 files changed, 40 insertions, 40 deletions
diff --git a/indra/newview/llpathfindingmanager.h b/indra/newview/llpathfindingmanager.h
index 3c9af91e7b..1de9fd6525 100644
--- a/indra/newview/llpathfindingmanager.h
+++ b/indra/newview/llpathfindingmanager.h
@@ -39,6 +39,8 @@
#include "llpathfindingnavmesh.h"
#include "llsingleton.h"
#include "lluuid.h"
+#include "llpanel.h"
+#include "llmoveview.h"
class LLViewerRegion;
class LLPathfindingNavMeshStatus;
@@ -46,25 +48,11 @@ class LLPathfindingNavMeshStatus;
class LLPathfindingManager : public LLSingleton<LLPathfindingManager>
{
friend class LLNavMeshSimStateChangeNode;
- friend class LLAgentStateChangeNode;
friend class NavMeshStatusResponder;
- friend class AgentStateResponder;
public:
typedef std::map<LLUUID, LLPathfindingNavMeshPtr> NavMeshMap;
typedef enum {
- kAgentStateUnknown,
- kAgentStateFrozen,
- kAgentStateUnfrozen,
- kAgentStateNotEnabled,
- kAgentStateError
- } EAgentState;
-
- typedef boost::function<void (EAgentState)> agent_state_callback_t;
- typedef boost::signals2::signal<void (EAgentState)> agent_state_signal_t;
- typedef boost::signals2::connection agent_state_slot_t;
-
- typedef enum {
kRequestStarted,
kRequestCompleted,
kRequestNotEnabled,
@@ -74,23 +62,18 @@ public:
LLPathfindingManager();
virtual ~LLPathfindingManager();
+ void initSystem();
+
bool isPathfindingEnabledForCurrentRegion() const;
bool isPathfindingEnabledForRegion(LLViewerRegion *pRegion) const;
-#ifdef DEPRECATED_UNVERSIONED_NAVMESH
- bool isPathfindingNavMeshVersioningEnabledForCurrentRegionXXX() const;
-#endif // DEPRECATED_UNVERSIONED_NAVMESH
- bool isAllowAlterPermanent();
+ bool isPathfindingDebugEnabled() const;
+
bool isAllowViewTerrainProperties() const;
LLPathfindingNavMesh::navmesh_slot_t registerNavMeshListenerForRegion(LLViewerRegion *pRegion, LLPathfindingNavMesh::navmesh_callback_t pNavMeshCallback);
void requestGetNavMeshForRegion(LLViewerRegion *pRegion);
- agent_state_slot_t registerAgentStateListener(agent_state_callback_t pAgentStateCallback);
- EAgentState getAgentState();
- EAgentState getLastKnownNonErrorAgentState() const;
- void requestSetAgentState(EAgentState pAgentState);
-
typedef U32 request_id_t;
typedef boost::function<void (request_id_t, ERequestStatus, LLPathfindingObjectListPtr)> object_request_callback_t;
@@ -99,6 +82,24 @@ public:
void requestGetCharacters(request_id_t pRequestId, object_request_callback_t pCharactersCallback) const;
+ friend class LLAgentStateChangeNode;
+ friend class AgentStateResponder;
+
+ typedef boost::function< void () > agent_state_callback_t;
+ typedef boost::signals2::signal< void () > agent_state_signal_t;
+ typedef boost::signals2::connection agent_state_slot_t;
+
+ agent_state_slot_t mCrossingSlot;
+ agent_state_signal_t mAgentStateSignal;
+
+ agent_state_slot_t registerAgentStateListener(agent_state_callback_t pAgentStateCallback);
+
+ void handleNavMeshRebakeResult( const LLSD &pContent );
+ void handleNavMeshRebakeError( U32 pStatus, const std::string &pReason, const std::string &pURL );
+ void triggerNavMeshRebuild();
+ void onRegionBoundaryCrossed();
+ void requestGetAgentState();
+
protected:
private:
@@ -111,34 +112,33 @@ private:
void handleNavMeshStatusRequest(const LLPathfindingNavMeshStatus &pNavMeshStatus, LLViewerRegion *pRegion);
void handleNavMeshStatusUpdate(const LLPathfindingNavMeshStatus &pNavMeshStatus);
+ void handleAgentStateUpdate();
+
LLPathfindingNavMeshPtr getNavMeshForRegion(const LLUUID &pRegionUUID);
LLPathfindingNavMeshPtr getNavMeshForRegion(LLViewerRegion *pRegion);
- static bool isValidAgentState(EAgentState pAgentState);
-
- void requestGetAgentState();
- void setAgentState(EAgentState pAgentState);
- void handleAgentStateResult(const LLSD &pContent, EAgentState pRequestedAgentState);
- void handleAgentStateError(U32 pStatus, const std::string &pReason, const std::string &pURL);
- void handleAgentStateUpdate(const LLSD &pContent);
- void handleAgentStateUserNotification(const LLSD &pNotification, const LLSD &pResponse);
-
std::string getNavMeshStatusURLForRegion(LLViewerRegion *pRegion) const;
std::string getRetrieveNavMeshURLForRegion(LLViewerRegion *pRegion) const;
- std::string getAgentStateURLForCurrentRegion() const;
std::string getObjectLinksetsURLForCurrentRegion() const;
std::string getTerrainLinksetsURLForCurrentRegion() const;
std::string getCharactersURLForCurrentRegion() const;
-
- std::string getCapabilityURLForCurrentRegion(const std::string &pCapabilityName) const;
- std::string getCapabilityURLForRegion(LLViewerRegion *pRegion, const std::string &pCapabilityName) const;
+ std::string getAgentStateURLForCurrentRegion(LLViewerRegion *pRegion) const;
+ std::string getCapabilityURLForCurrentRegion(const std::string &pCapabilityName) const;
+ std::string getCapabilityURLForRegion(LLViewerRegion *pRegion, const std::string &pCapabilityName) const;
LLViewerRegion *getCurrentRegion() const;
- NavMeshMap mNavMeshMap;
+
+ void displayNavMeshRebakePanel();
+ void hideNavMeshRebakePanel();
+ void handleAgentStateResult(const LLSD &pContent );
+ void handleAgentStateError(U32 pStatus, const std::string &pReason, const std::string &pURL);
+
+
+ NavMeshMap mNavMeshMap;
- agent_state_signal_t mAgentStateSignal;
- EAgentState mAgentState;
- EAgentState mLastKnownNonErrorAgentState;
+ //prep#stinson# set this flag instead of directly showing/hiding the rebake panel
+ BOOL mShowNavMeshRebake;
};
+
#endif // LL_LLPATHFINDINGMANAGER_H