llpathfindingcharacter.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /**
  2. * @file llpathfindingcharacter.h
  3. * @brief Definition of a pathfinding character that contains various properties required for havok pathfinding.
  4. *
  5. * $LicenseInfo:firstyear=2012&license=viewerlgpl$
  6. * Second Life Viewer Source Code
  7. * Copyright (C) 2012, Linden Research, Inc.
  8. *
  9. * This library is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU Lesser General Public
  11. * License as published by the Free Software Foundation;
  12. * version 2.1 of the License only.
  13. *
  14. * This library is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * Lesser General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Lesser General Public
  20. * License along with this library; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  22. *
  23. * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
  24. * $/LicenseInfo$
  25. */
  26. #ifndef LL_LLPATHFINDINGCHARACTER_H
  27. #define LL_LLPATHFINDINGCHARACTER_H
  28. #include <string>
  29. #include "llpathfindingobject.h"
  30. class LLSD;
  31. class LLPathfindingCharacter : public LLPathfindingObject
  32. {
  33. protected:
  34. LOG_CLASS(LLPathfindingCharacter);
  35. public:
  36. LLPathfindingCharacter(const LLUUID& id, const LLSD& char_data);
  37. LLPathfindingCharacter(const LLPathfindingCharacter& obj);
  38. LLPathfindingCharacter& operator=(const LLPathfindingCharacter& obj);
  39. LL_INLINE LLPathfindingCharacter* asCharacter() override
  40. {
  41. return this;
  42. }
  43. LL_INLINE const LLPathfindingCharacter* asCharacter() const override
  44. {
  45. return this;
  46. }
  47. LL_INLINE F32 getCPUTime() const { return mCPUTime; }
  48. LL_INLINE bool isHorizontal() const { return mIsHorizontal; }
  49. LL_INLINE F32 getLength() const { return mLength; }
  50. LL_INLINE F32 getRadius() const { return mRadius; }
  51. private:
  52. void parseCharacterData(const LLSD& char_data);
  53. private:
  54. F32 mCPUTime;
  55. F32 mLength;
  56. F32 mRadius;
  57. bool mIsHorizontal;
  58. };
  59. #endif // LL_LLPATHFINDINGCHARACTER_H