Trax3 3.1.0
trax track library
Loading...
Searching...
No Matches
trax::Gestalt Struct Referenceabstract

A Gestalt is a Body with a Shape. More...

#include <C:/Trend/Development/Trax3/Code/trax/rigid/Gestalt.h>

Inheritance diagram for trax::Gestalt:

Public Member Functions

virtual void SetName (const char *name) noexcept=0
 Sets the name of the Gestalt.
virtual const char * GetName () const noexcept=0
virtual void SetFrame (const spat::Frame< Length, One > &frame) noexcept=0
 Sets position and orientation (pose) in global coordinates.
virtual void GetFrame (spat::Frame< Length, One > &frame) const noexcept=0
 Gets the pose in global coordinates.
virtual int Attach (std::unique_ptr< Geom > pGeom, Mass mass)=0
 Attach a Geom with a dedicated mass to the Gestalt.
virtual Mass GeomMass (int idx=0) const =0
virtual int Attach (std::unique_ptr< Geom > pGeom)=0
 Attach a Geom to the Shape.
virtual int Attach (std::vector< std::unique_ptr< Geom > > &geoms)=0
Public Member Functions inherited from trax::Body
virtual void WakeUp ()=0
 Wakes the Body if it was deactivated due to not being in move.
virtual bool IsSleeping () const noexcept=0
 Is the body deactivated?
virtual void SetSleepDelay (Time threshold)=0
virtual Time GetSleepDelay () const noexcept=0
virtual void SetSleepThreshold (decltype(Velocity{} *Velocity{}) threshold)=0
virtual decltype(Velocity{} *Velocity{}) GetSleepThreshold () const noexcept=0
virtual void SetMass (Mass mass)=0
 Sets the mass of the Body.
virtual Mass GetMass () const noexcept=0
virtual void CenterOfMass (const spat::Position< Length > &pos) noexcept=0
 Sets the center of mass in Body space.
virtual spat::Position< LengthCenterOfMass () const noexcept=0
virtual void InertiaTensor (const spat::SquareMatrix< Area, 3 > &specificInertiaTensor)=0
 Sets the specific inertia tensor of the Body.
virtual spat::SquareMatrix< Area, 3 > InertiaTensor () const =0
virtual void SetLinearVelocity (const spat::Vector< Velocity > &v)=0
 Sets the velocity of the barycenter of this Body.
virtual void GetLinearVelocity (spat::Vector< Velocity > &v) const =0
 Gets the velocity of the barycenter of this Body.
virtual void SetAngularVelocity (const spat::Vector< AngularVelocity > &w)=0
 Sets the rotational velocity around the barycenter of this Body.
virtual void GetAngularVelocity (spat::Vector< AngularVelocity > &w) const =0
 Sets the rotational velocity around the barycenter of this Body.
Public Member Functions inherited from trax::Shape
virtual spat::Box< LengthGetExtent () const noexcept=0
 Gets the minimum axis aligned box that includes the the Geoms completely.
virtual std::unique_ptr< GeomRemove (int idx)=0
 Removes the Geom with index idx from the Shape.
virtual void Clear () noexcept=0
 Remove all Geoms from the Shape.
virtual int Count () const =0
virtual GeomGet (int idx=0) const =0

Detailed Description

A Gestalt is a Body with a Shape.

A Gestalt combines the physical properties of a Body with the geometric properties of a Shape. The latter combines multiple Geoms into a single collision shape.

See also
Geom

Member Function Documentation

◆ Attach() [1/3]

virtual int trax::Shape::Attach ( std::unique_ptr< Geom > pGeom)
virtual

Attach a Geom to the Shape.

This will be used for collision testing. The Geom carries a frame of reference to specify it's pose relative to the Shape's pose.

Parameters
pGeomA Geom to be attached to the Shape.
Returns
The zero based index of the first Geom attached; the consecutive geoms will be assigned indexes from that in increasing order.

Implements trax::Shape.

◆ Attach() [2/3]

virtual int trax::Gestalt::Attach ( std::unique_ptr< Geom > pGeom,
Mass mass )
pure virtual

Attach a Geom with a dedicated mass to the Gestalt.

This will be used for collision testing. The Geom carries a frame of reference to specify it's pose relative to the Body's pose.

Parameters
pGeomA Geom to be attached to the Body.
massA mass to be used when calculating the mass properties for the Body by CalculateMassPropertiesFromShapes().
Returns
The zero based index of the Geom.

◆ Attach() [3/3]

virtual int trax::Shape::Attach ( std::vector< std::unique_ptr< Geom > > & geoms)
virtual
Parameters
geomsA list of Geoms to be attached to the Shape.
Returns
The zero based index of the first Geom attached; the consecutive geoms will be assigned indexes from that in increasing order.

Implements trax::Shape.

◆ GeomMass()

virtual Mass trax::Gestalt::GeomMass ( int idx = 0) const
pure virtual
Parameters
idxzero based index of the Geom.
Returns
a pointer to the Geom at index idx.

◆ GetFrame()

virtual void trax::Gestalt::GetFrame ( spat::Frame< Length, One > & frame) const
pure virtualnoexcept

Gets the pose in global coordinates.

Implements trax::Body.

◆ GetName()

virtual const char * trax::Gestalt::GetName ( ) const
pure virtualnoexcept
Returns
The name of the Gestalt.

Implements trax::Body.

◆ SetFrame()

virtual void trax::Gestalt::SetFrame ( const spat::Frame< Length, One > & frame)
pure virtualnoexcept

Sets position and orientation (pose) in global coordinates.

This will set the position and orientation of the Gestalt in global simulation space.

Parameters
frameFrame of reference. Must be orthonormal.

Implements trax::Body.

◆ SetName()

virtual void trax::Gestalt::SetName ( const char * name)
pure virtualnoexcept

Sets the name of the Gestalt.

This is for debug purposes; the string is not copied, only the pointer is stored.

Implements trax::Body.


The documentation for this struct was generated from the following file:
  • C:/Trend/Development/Trax3/Code/trax/rigid/Gestalt.h