7 #include "Transformation.h"
9 #include "glutils/color.h"
104 void Validate()
const;
111 MultiBody* GetMultiBody() const noexcept;
114 void SetMultiBody(
MultiBody* const _owner) noexcept;
117 size_t GetIndex() const noexcept;
120 double GetWeight() const;
127 const std::
string& Label() const noexcept;
130 bool IsBase() const noexcept;
133 void SetBodyType(const
Body::
Type _type) noexcept;
136 Body::
Type GetBodyType() const noexcept;
139 void SetMovementType(const
MovementType _type) noexcept;
149 double GetMass() const;
152 const Matrix3x3& GetMoment() const;
182 void Configure(const Transformation& _transformation);
186 const Transformation& GetWorldTransformation() const;
193 size_t ForwardConnectionCount() const noexcept;
196 size_t BackwardConnectionCount() const noexcept;
199 size_t AdjacencyConnectionCount() const noexcept;
203 Connection& GetForwardConnection(const
size_t _index) const noexcept;
207 Connection& GetBackwardConnection(const
size_t _index) const noexcept;
211 Connection& GetAdjacencyConnection(const
size_t _index) const noexcept;
217 Connection* GetConnectionTo(const
Body* const _other) const noexcept;
222 bool IsAdjacent(const
Body* const _otherBody) const;
227 bool SameParent(const
Body* const _otherBody) const;
250 static std::
string m_modelDataDir;
253 const std::
string& GetFileName() const;
256 std::
string GetFilePath() const;
260 void ReadGeometryFile(const std::
string& _filename);
264 void ReadGeometryFile(
281 const
glutils::color& GetColor() const;
284 void SetColor(const
glutils::color& _c);
287 bool IsTextureLoaded() const;
290 const std::
string& GetTexture() const;
304 void ComputeMomentOfInertia() const;
307 void ComputeBoundingBox() const;
309 const Transformation& FetchBaseTransform() const noexcept;
311 const Transformation& FetchLinkTransform() const noexcept;
317 const Transformation& ComputeWorldTransformation(std::set<
size_t>& _visited)
327 std::string m_filename;
330 MovementType m_movementType;
335 Transformation m_transform;
336 mutable bool m_transformCached{
false};
339 mutable bool m_worldPolyhedronCached{
false};
342 double m_weight{0.0};
347 std::vector<Connection*> m_forwardConnections;
348 std::vector<Connection*> m_backwardConnections;
349 std::vector<Connection*> m_adjacencyConnections;
351 const Transformation& (
Body::*m_transformFetcher)(
void)
const noexcept =
nullptr;
361 glutils::color m_color{glutils::color::blue};
362 std::string m_textureFile;
std::ostream & operator<<(std::ostream &_os, const Body &_body)
Definition: Body.cpp:962
void Read(GenericStateGraph *_g, const std::string &_filename)
Definition: GenericStateGraph.h:1337
@ Rotational
Rotational motion in S = [-1, 1].
@ Joint
Rotational motion in R = [min, max].
Type
The type of part this body represents within its owning multi body.
Definition: Body.h:49
Body & operator=(Body &&_other)
Move.
MovementType
The type of movement this body can perform.
Definition: Body.h:57
Definition: CollisionDetectionMethod.h:19
Definition: Connection.h:35
Definition: CountingStreamBuffer.h:20
Definition: GMSPolyhedron.h:42
COMAdjust
Definition: GMSPolyhedron.h:65
Definition: MultiBody.h:65
Definition: GMSPolyhedron.h:27