EntityPoint.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. /*
  2. * Copyright (C) 2022 The V-Gears Team
  3. *
  4. * This file is part of V-Gears
  5. *
  6. * V-Gears is free software: you can redistribute it and/or modify it under
  7. * terms of the GNU General Public License as published by the Free Software
  8. * Foundation, version 3.0 (GPLv3) of the License.
  9. *
  10. * V-Gears is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. */
  15. #pragma once
  16. #include <OgreRoot.h>
  17. /**
  18. * An entity point.
  19. */
  20. class EntityPoint{
  21. public:
  22. /**
  23. * Constructor.
  24. *
  25. * @param name[in] Name of the entity point.
  26. */
  27. EntityPoint(const Ogre::String& name);
  28. /**
  29. * Destructor.
  30. */
  31. virtual ~EntityPoint();
  32. /**
  33. * Updates the point state with debug information.
  34. */
  35. void UpdateDebug();
  36. /**
  37. * Retrieves the entity point name.
  38. *
  39. * @return The name of the entity point.
  40. */
  41. const Ogre::String& GetName() const;
  42. /**
  43. * Sets the point position.
  44. *
  45. * @param point[in] The new point position
  46. */
  47. void SetPosition(const Ogre::Vector3& point);
  48. /**
  49. * Retrieves the point position.
  50. *
  51. * @return The point position.
  52. */
  53. const Ogre::Vector3& GetPosition() const;
  54. /**
  55. * Informs the script manager of the point position.
  56. */
  57. void ScriptGetPosition() const;
  58. /**
  59. * Sets the point orientation.
  60. *
  61. * @param rotation[in] The new orientation (0-360).
  62. */
  63. void SetRotation(const float rotation);
  64. /**
  65. * Retrieves the point orientation.
  66. *
  67. * @return The point orientation.
  68. */
  69. float GetRotation() const;
  70. /**
  71. * Retrieves the point orientation.
  72. *
  73. * @return The point orientation.
  74. */
  75. float ScriptGetRotation() const;
  76. protected:
  77. /**
  78. * The entity point name.
  79. */
  80. Ogre::String name_;
  81. /**
  82. * The entity point's position.
  83. */
  84. Ogre::Vector3 position_;
  85. /**
  86. * The entity point's orientation.
  87. */
  88. float rotation_;
  89. };