Path.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. // Copyright (C) 2009-2016, Panagiotis Christopoulos Charitos.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #pragma once
  6. #include <anki/scene/Common.h>
  7. #include <anki/scene/SceneNode.h>
  8. #include <anki/scene/MoveComponent.h>
  9. namespace anki
  10. {
  11. #if 0
  12. /// XXX
  13. class PathPoint
  14. {
  15. friend class Path;
  16. public:
  17. /// @name Accessors
  18. /// @{
  19. const Vec3& getPosition() const
  20. {
  21. return pos;
  22. }
  23. const Quat& getRotation() const
  24. {
  25. return rot;
  26. }
  27. F32 getDistance() const
  28. {
  29. return dist;
  30. }
  31. F32 getDistanceFromFirst() const
  32. {
  33. return distStart;
  34. }
  35. /// @}
  36. private:
  37. Vec3 pos;
  38. Quat rot;
  39. F32 distStart; ///< Distance from the first PathPoint of the path
  40. F32 dist; ///< Distance from the previous PathPoint in the path list
  41. };
  42. /// XXX
  43. class Path: public SceneNode, public MoveComponent
  44. {
  45. public:
  46. Path(
  47. const char* name, SceneGraph* scene, // SceneNode
  48. const char* filename); // Self
  49. const SceneVector<PathPoint>& getPoints() const
  50. {
  51. return points;
  52. }
  53. F32 getDistance() const
  54. {
  55. return distance;
  56. }
  57. private:
  58. SceneVector<PathPoint> points;
  59. F32 distance;
  60. };
  61. #endif
  62. } // end namespace anki