30#include "trax/Configuration.h"
31#include "trax/Units.h"
33#include "spat/Frame.h"
34#include "spat/Matrix.h"
36#include "spat/Sphere.h"
52 virtual void SetName(
const char* name )
noexcept = 0;
56 virtual const char*
GetName() const noexcept = 0;
82 virtual
void SetSleepDelay(
Time threshold ) = 0;
84 virtual
Time GetSleepDelay() const noexcept = 0;
86 virtual
void SetSleepThreshold( decltype(
Velocity{}*
Velocity{}) threshold ) = 0;
88 virtual decltype(
Velocity{}*
Velocity{}) GetSleepThreshold() const noexcept = 0;
168 virtual ~
Body() = default;
Square matrix with nColumns == nRows.
Definition Matrix.h:278
Value< Dimension< 2, 0, 0 > > Area
Area.
Definition DimensionedValues.h:325
Value< Dimension< 0, 0, -1 > > AngularVelocity
Angular velocity.
Definition DimensionedValues.h:323
Value< Dimension< 1, 0, -1 > > Velocity
Velocity.
Definition DimensionedValues.h:331
Value< Dimension< 0, 0, 0 > > One
Dimensionless value.
Definition DimensionedValues.h:319
Value< Dimension< 1, 0, 0 > > Length
Length.
Definition DimensionedValues.h:324
Value< Dimension< 0, 1, 0 > > Mass
Mass.
Definition DimensionedValues.h:327
Value< Dimension< 0, 0, 1 > > Time
Time.
Definition DimensionedValues.h:329
The namespace provides classes and methods for spatial computations.
Definition Box.h:32
Namespace of all the trax track libraries classes and methods.
Definition Collection.h:17
dclspc spat::SquareMatrix< Area, 3 > SpecificInertiaTensorFor(const spat::Box< Length > &box)
Calculates the specific inertia tensor for a special shape.
dclspc spat::SquareMatrix< Area, 3 > SpecificInertiaTensorForCylinder(Length radius, Length length)
Calculates the specific inertia tensor for a special shape.
Axis aligned box.
Definition Box.h:41
A Frame ("TNBFrame") describes a location in 3d space and an orientation using a right handed coordin...
Definition Frame.h:52
Implements a 3D - position in cartesian coordinates.
Definition Position.h:46
Sphere with center and radius.
Definition Sphere.h:39
Implements a 3D - vector in cartesian coordinates.
Definition Vector.h:48
A dynamic object in physical space.
Definition Body.h:44
virtual void SetMass(Mass mass)=0
Sets the mass of the Body.
virtual void SetLinearVelocity(const spat::Vector< Velocity > &v)=0
Sets the velocity of the barycenter of this Body.
virtual void SetName(const char *name) noexcept=0
Sets the name of the Body.
virtual bool IsSleeping() const noexcept=0
Is the body deactivated?
virtual void CenterOfMass(const spat::Position< Length > &pos) noexcept=0
Sets the center of mass in Body space.
virtual Mass GetMass() const noexcept=0
virtual void SetAngularVelocity(const spat::Vector< AngularVelocity > &w)=0
Sets the rotational velocity around 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 InertiaTensor(const spat::SquareMatrix< Area, 3 > &specificInertiaTensor)=0
Sets the specific inertia tensor of the Body.
virtual void GetAngularVelocity(spat::Vector< AngularVelocity > &w) const =0
Sets the rotational velocity around the barycenter of this Body.
virtual void SetFrame(const spat::Frame< Length, One > &frame) noexcept=0
Sets position and orientation (pose) in global coordinates.
virtual void WakeUp()=0
Wakes the Body if it was deactivated due to not being in move.
virtual void GetFrame(spat::Frame< Length, One > &frame) const noexcept=0
Gets the pose in global coordinates.
virtual const char * GetName() const noexcept=0