From 36d7de33b2cf0fe749e95044dbc8be89c1673555 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Tue, 6 Mar 2012 12:12:35 -0800 Subject: Updating the pathfinding linksets service to reference the new navmesh category field. Also, still supporting the old permanent/walkable field names until fully deprecated from all server builds. --- indra/newview/llpathfindinglinkset.h | 58 +++++++++++++++++++++++------------- 1 file changed, 37 insertions(+), 21 deletions(-) (limited to 'indra/newview/llpathfindinglinkset.h') diff --git a/indra/newview/llpathfindinglinkset.h b/indra/newview/llpathfindinglinkset.h index 81acad7d4d..908b0b6f2d 100644 --- a/indra/newview/llpathfindinglinkset.h +++ b/indra/newview/llpathfindinglinkset.h @@ -38,9 +38,18 @@ class LLPathfindingLinkset; typedef boost::shared_ptr LLPathfindingLinksetPtr; +#define DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS + class LLPathfindingLinkset { public: + typedef enum + { + kNavMeshGenerationIgnore, + kNavMeshGenerationInclude, + kNavMeshGenerationExclude + } ENavMeshGenerationCategory; + typedef enum { kUnknown, @@ -59,25 +68,25 @@ public: LLPathfindingLinkset& operator = (const LLPathfindingLinkset& pOther); - inline bool isTerrain() const {return mIsTerrain;}; - inline const LLUUID& getUUID() const {return mUUID;}; - inline const std::string& getName() const {return mName;}; - inline const std::string& getDescription() const {return mDescription;}; - inline U32 getLandImpact() const {return mLandImpact;}; - inline const LLVector3& getLocation() const {return mLocation;}; - BOOL isModifiable() const {return mIsModifiable;}; - BOOL isPhantom() const; - static BOOL isPhantom(ELinksetUse pLinksetUse); - static ELinksetUse getLinksetUseWithToggledPhantom(ELinksetUse pLinksetUse); + inline bool isTerrain() const {return mIsTerrain;}; + inline const LLUUID& getUUID() const {return mUUID;}; + inline const std::string& getName() const {return mName;}; + inline const std::string& getDescription() const {return mDescription;}; + inline U32 getLandImpact() const {return mLandImpact;}; + inline const LLVector3& getLocation() const {return mLocation;}; + BOOL isModifiable() const {return mIsModifiable;}; + BOOL isPhantom() const; + static BOOL isPhantom(ELinksetUse pLinksetUse); + static ELinksetUse getLinksetUseWithToggledPhantom(ELinksetUse pLinksetUse); - inline ELinksetUse getLinksetUse() const {return mLinksetUse;}; + inline ELinksetUse getLinksetUse() const {return mLinksetUse;}; - inline S32 getWalkabilityCoefficientA() const {return mWalkabilityCoefficientA;}; - inline S32 getWalkabilityCoefficientB() const {return mWalkabilityCoefficientB;}; - inline S32 getWalkabilityCoefficientC() const {return mWalkabilityCoefficientC;}; - inline S32 getWalkabilityCoefficientD() const {return mWalkabilityCoefficientD;}; + inline S32 getWalkabilityCoefficientA() const {return mWalkabilityCoefficientA;}; + inline S32 getWalkabilityCoefficientB() const {return mWalkabilityCoefficientB;}; + inline S32 getWalkabilityCoefficientC() const {return mWalkabilityCoefficientC;}; + inline S32 getWalkabilityCoefficientD() const {return mWalkabilityCoefficientD;}; - LLSD encodeAlteredFields(ELinksetUse pLinksetUse, S32 pA, S32 pB, S32 pC, S32 pD) const; + LLSD encodeAlteredFields(ELinksetUse pLinksetUse, S32 pA, S32 pB, S32 pC, S32 pD) const; static const S32 MIN_WALKABILITY_VALUE; static const S32 MAX_WALKABILITY_VALUE; @@ -85,11 +94,18 @@ public: protected: private: - void parseObjectData(const LLSD &pLinksetItem); - void parsePathfindingData(const LLSD &pLinksetItem); - static ELinksetUse getLinksetUse(bool pIsPhantom, bool pIsPermanent, bool pIsWalkable); - static BOOL isPermanent(ELinksetUse pLinksetUse); - static BOOL isWalkable(ELinksetUse pLinksetUse); + void parseObjectData(const LLSD &pLinksetItem); + void parsePathfindingData(const LLSD &pLinksetItem); + +#ifdef DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS + static ELinksetUse getLinksetUse(bool pIsPhantom, bool pIsPermanent, bool pIsWalkable); + static BOOL isPermanent(ELinksetUse pLinksetUse); + static BOOL isWalkable(ELinksetUse pLinksetUse); +#endif // DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS + static ELinksetUse getLinksetUse(bool pIsPhantom, ENavMeshGenerationCategory pNavMeshGenerationCategory); + static ENavMeshGenerationCategory getNavMeshGenerationCategory(ELinksetUse pLinksetUse); + static LLSD convertCategoryToLLSD(ENavMeshGenerationCategory pNavMeshGenerationCategory); + static ENavMeshGenerationCategory convertCategoryFromLLSD(const LLSD &llsd); LLUUID mUUID; bool mIsTerrain; -- cgit v1.2.3