#include <RigidBody.h>
Public Member Functions | |
Destructor | |
virtual | ~RigidBody ()=0 |
Destructor for the RigidBody class. More... | |
Sleep mode functions | |
void | wake () |
Waking the rigid body and ending the sleep mode. More... | |
void | calcMotion () |
Calculating the current motion of a rigid body. More... | |
Get functions | |
bool | hasManager () const |
Returns whether the rigid body currently has a supervising rigid body manager. More... | |
ManagerID | getManager () |
Returns the supervising rigid body manager of the rigid body. More... | |
ConstManagerID | getManager () const |
bool | hasSuperBody () const |
Returns whether the rigid body is contained in a superordinate body. More... | |
BodyID | getSuperBody () |
Returns the superordinate body in which the rigid body is contained. More... | |
ConstBodyID | getSuperBody () const |
BodyID | getTopSuperBody () |
Returns the top level superordinate body in which the rigid body is contained. More... | |
ConstBodyID | getTopSuperBody () const |
virtual bool | hasSubBodies () const |
bool | isFinite () const |
Returns whether the rigid body is finite or not. More... | |
bool | isAwake () const |
Returns whether the rigid body is awake or not. More... | |
bool | isFixed () const |
Returns whether the rigid body's position is fixed or not. More... | |
bool | hasInfiniteMass () const |
Checks if a body is "mobile" e.g. More... | |
bool | isVisible () const |
Returns whether the rigid body is visible or not. More... | |
bool | isMarkedForDeletion () const |
id_t | getSystemID () const |
Returns the unique system-specific ID of the rigid body. More... | |
id_t | getID () const |
Returns the user-specific ID of the rigid body. More... | |
const Vec3 | getRelPosition () const |
Returns the relative position of the rigid body within the superordinate body. More... | |
const Vec3 | getPosition () const |
Returns the global position of the center of mass of the rigid body. More... | |
const Vec3 | getBodyLinearVel () const |
Returns the relative linear velocity of the rigid body. More... | |
const Vec3 | getLinearVel () const |
Returns the global linear velocity of the rigid body. More... | |
const Vec3 | getBodyAngularVel () const |
Returns the relative angular velocity. More... | |
const Vec3 & | getAngularVel () const |
Returns the global angular velocity. More... | |
const Quat | getRelQuaternion () const |
Returns the relative orientation of the rigid body to its superbody. More... | |
const Quat | getQuaternion () const |
Returns the orientation of the rigid body. More... | |
const Mat3 | getRotation () const |
Returns the rotation of the rigid body. More... | |
real_t | getMass () const |
Returns the total mass of the rigid body. More... | |
real_t | getInvMass () const |
Returns the inverse total mass of the rigid body. More... | |
virtual real_t | getVolume () const |
Returns the volume of the rigid body. More... | |
const Mat3 & | getBodyInertia () const |
Returns the moment of inertia in reference to the body frame of the rigid body. More... | |
const Mat3 | getInertia () const |
Returns the moment of inertia in reference to the global world frame. More... | |
const Mat3 & | getInvBodyInertia () const |
Returns the inverse moment of inertia in reference to the body frame of the rigid body. More... | |
const Mat3 | getInvInertia () const |
Returns the inverse moment of inertia in reference to the global world frame. More... | |
const AABB & | getAABB () const |
Returns the axis-aligned bounding box of the rigid body. More... | |
real_t | getAABBSize () const |
Returns the length of the longest side of the AABB of the rigid body. More... | |
real_t | getKineticEnergy () const |
Returns the kinetic energy of the rigid body. More... | |
real_t | getRotationalEnergy () const |
Returns the rotational energy of the rigid body. More... | |
real_t | getEnergy () const |
Returns the energy of the rigid body. More... | |
const Vec3 | vectorFromBFtoWF (real_t vx, real_t vy, real_t vz) const |
Transformation from a relative to a global vector. More... | |
const Vec3 | vectorFromBFtoWF (const Vec3 &v) const |
Transformation from a relative to a global vector. More... | |
const Vec3 | pointFromBFtoWF (real_t px, real_t py, real_t pz) const |
Transformation from a relative to a global coordinate. More... | |
const Vec3 | pointFromBFtoWF (const Vec3 &rpos) const |
Transformation from a relative to a global coordinate. More... | |
virtual Vec3 | velFromBF (real_t px, real_t py, real_t pz) const |
Calculation of the global velocity of a relative point. More... | |
virtual Vec3 | velFromBF (const Vec3 &rpos) const |
Calculation of the global velocity of a relative point. More... | |
const Vec3 | vectorFromWFtoBF (real_t vx, real_t vy, real_t vz) const |
Transformation from a global to a relative vector. More... | |
const Vec3 | vectorFromWFtoBF (const Vec3 &v) const |
Transformation from a global to a relative vector. More... | |
const Vec3 | pointFromWFtoBF (real_t px, real_t py, real_t pz) const |
Transformation from a global to a relative coordinate. More... | |
const Vec3 | pointFromWFtoBF (const Vec3 &gpos) const |
Transformation from a global to a relative coordinate. More... | |
virtual Vec3 | velFromWF (real_t px, real_t py, real_t pz) const |
Calculation of the global velocity of a point in global coordinates. More... | |
virtual Vec3 | velFromWF (const Vec3 &gpos) const |
Calculation of the global velocity of a point in global coordinates. More... | |
const Vec3 | accFromWF (real_t px, real_t py, real_t pz) const |
Calculation of the global acceleration of a point in global coordinates. More... | |
const Vec3 | accFromWF (const Vec3 &gpos) const |
Calculation of the global acceleration of a point in global coordinates. More... | |
id_t | getTypeID () const |
Translation functions | |
void | translate (real_t dx, real_t dy, real_t dz) |
Translation of the center of mass of the rigid body by the displacement vector. More... | |
void | translate (const Vec3 &dp) |
Translation of the center of mass of the rigid body by the displacement vector dp. More... | |
Rotation functions | |
void | rotate (real_t x, real_t y, real_t z, real_t angle) |
Rotation of the rigid body around the global rotation axis (x,y,z) by the rotation angle angle. More... | |
void | rotate (const Vec3 &axis, real_t angle) |
Rotation of the rigid body around the specified global rotation axis by the rotation. More... | |
void | rotate (real_t xangle, real_t yangle, real_t zangle) |
Rotation of the rigid body by the Euler angles xangle, yangle and zangle. More... | |
void | rotate (const Vec3 &euler) |
Rotation of the rigid body by the Euler angles euler. More... | |
void | rotate (const Quat &dq) |
Rotation of the rigid body by the quaternion dq. More... | |
void | rotateAroundOrigin (real_t x, real_t y, real_t z, real_t angle) |
Rotation of the rigid body around the origin of the global world frame. More... | |
void | rotateAroundOrigin (const Vec3 &axis, real_t angle) |
Rotation of the rigid body around the origin of the global world frame. More... | |
void | rotateAroundOrigin (real_t xangle, real_t yangle, real_t zangle) |
Rotation of the rigid body around the origin of the global world frame. More... | |
void | rotateAroundOrigin (const Vec3 &euler) |
Rotation of the rigid body around the origin of the global world frame. More... | |
void | rotateAroundOrigin (const Quat &dq) |
Rotation of the rigid body around the origin of the global world frame. More... | |
void | rotateAroundPoint (const Vec3 &point, const Vec3 &axis, real_t angle) |
Rotation of the rigid body around a specific global coordinate. More... | |
void | rotateAroundPoint (const Vec3 &point, const Vec3 &euler) |
Rotation of the rigid body around a specific global coordinate. More... | |
Utility functions | |
bool | containsRelPoint (real_t px, real_t py, real_t pz) const |
Checks, whether a point in body relative coordinates lies inside the rigid body. More... | |
bool | containsRelPoint (const Vec3 &rpos) const |
Checks, whether a point in body relative coordinates lies inside the rigid body. More... | |
bool | containsPoint (real_t px, real_t py, real_t pz) const |
Checks, whether a point in global coordinates lies inside the rigid body. More... | |
bool | containsPoint (const Vec3 &gpos) const |
Checks, whether a point in global coordinates lies inside the rigid body. More... | |
bool | isSurfaceRelPoint (real_t px, real_t py, real_t pz) const |
Checks, whether a point in relative coordinates lies on the surface of the rigid body. More... | |
bool | isSurfaceRelPoint (const Vec3 &rpos) const |
Checks, whether a point in body relative coordinates lies on the surface of the rigid body. More... | |
bool | isSurfacePoint (real_t px, real_t py, real_t pz) const |
Checks, whether a point in global coordinates lies on the surface of the rigid body. More... | |
bool | isSurfacePoint (const Vec3 &gpos) const |
Checks, whether a point in global coordinates lies on the surface of the rigid body. More... | |
virtual Vec3 | support (const Vec3 &d) const |
Estimates the point which is farthest in direction d. More... | |
virtual Vec3 | supportContactThreshold (const Vec3 &d) const |
Estimates the point which is farthest in direction d. More... | |
virtual void | calcBoundingBox ()=0 |
Force functions | |
bool | hasForce () const |
Returns whether the rigid body has non-zero acting forces or torques. More... | |
const Vec3 & | getForce () const |
Returns the current force acting on the body's center of mass. More... | |
const Vec3 & | getTorque () const |
Returns the current torque acting on the body's center of mass. More... | |
void | setForce (const Vec3 &f) |
Set the force acting at the body's center of mass. More... | |
void | setTorque (const Vec3 &tau) |
Set the torque acting at the body's center of mass. More... | |
void | addRelForce (real_t fx, real_t fy, real_t fz) |
Increases the total force acting in the body's center of mass. More... | |
void | addRelForce (const Vec3 &f) |
Increases the force acting in the body's center of mass. More... | |
void | addForce (real_t fx, real_t fy, real_t fz) |
Increases the force acting in the body's center of mass. More... | |
void | addForce (const Vec3 &f) |
Increases the force acting in the body's center of mass. More... | |
void | addRelForceAtRelPos (real_t fx, real_t fy, real_t fz, real_t px, real_t py, real_t pz) |
Increases the force acting in the body's center of mass. More... | |
void | addRelForceAtRelPos (const Vec3 &f, const Vec3 &rpos) |
Increases the force acting in the body's center of mass. More... | |
void | addRelForceAtPos (real_t fx, real_t fy, real_t fz, real_t px, real_t py, real_t pz) |
Increases the force acting in the body's center of mass. More... | |
void | addRelForceAtPos (const Vec3 &f, const Vec3 &gpos) |
Increases the force acting in the body's center of mass. More... | |
void | addForceAtRelPos (real_t fx, real_t fy, real_t fz, real_t px, real_t py, real_t pz) |
Increases the force acting in the body's center of mass. More... | |
void | addForceAtRelPos (const Vec3 &f, const Vec3 &rpos) |
Increases the force acting in the body's center of mass. More... | |
void | addForceAtPos (real_t fx, real_t fy, real_t fz, real_t px, real_t py, real_t pz) |
Increases the force acting in the body's center of mass. More... | |
void | addForceAtPos (const Vec3 &f, const Vec3 &gpos) |
Increases the force acting in the body's center of mass. More... | |
void | addTorque (real_t tx, real_t ty, real_t tz) |
Increasing the torque acting in the body's center of mass. More... | |
void | addTorque (const Vec3 &t) |
Increasing the torque acting in the body's center of mass. More... | |
virtual void | resetForceAndTorque () |
Resetting all acting forces and torques from the rigid body. More... | |
Impulse functions | |
void | addImpulse (real_t jx, real_t jy, real_t jz) |
Applying an impulse in the body's center of mass. More... | |
void | addImpulse (const Vec3 &j) |
Applying an impulse in the body's center of mass. More... | |
void | addImpulseAtPos (real_t jx, real_t jy, real_t jz, real_t px, real_t py, real_t pz) |
Applying an impulse at the given global coordinate. More... | |
void | addImpulseAtPos (const Vec3 &j, const Vec3 &p) |
Applying an impulse at the given global coordinate. More... | |
MPI functions | |
bool | isRemote () const |
Returns whether the rigid body is remote or not. More... | |
virtual void | setRemote (bool remote) |
Setting the remote flag of the rigid body. More... | |
bool | isGlobal () const |
Returns whether the rigid body is global or not. More... | |
void | setGlobal (const bool global) |
Setting the global flag of the rigid body. More... | |
bool | isCommunicating () const |
Returns whether the rigid body is local or not. More... | |
void | setCommunicating (const bool communicating) |
Setting the local flag of the rigid body. More... | |
Output functions | |
virtual void | print (std::ostream &os, const char *tab) const =0 |
Debugging functions | |
virtual bool | checkInvariants () |
Checks the validity of the state of the rigid body. More... | |
Public Member Functions inherited from walberla::pe::ccd::HashGridsBodyTrait | |
void * | getGrid () const |
Returns the grid the rigid body is currently assigned to. More... | |
size_t | getHash () const |
Returns the current hash value of the rigid body. More... | |
size_t | getCellId () const |
Returns the current body container index within the cell the body is currently assigned to. More... | |
void | setGrid (void *grid) |
Setting the grid the rigid body is associated with. More... | |
void | setHash (size_t hash) |
Setting the hash value of the rigid body. More... | |
void | setCellId (size_t cell) |
Setting the body container index within the cell the body is currently assigned to. More... | |
Protected Member Functions | |
Fixation functions | |
virtual void | fix () |
Setting the global position (the center of mass) of the rigid body fixed. More... | |
Functions for internal changes in compound geometries | |
void | signalModification () |
Signals an internal modification of a contained subordinate body. More... | |
void | signalTranslation () |
Signals a position change of a contained subordinate body. More... | |
void | signalRotation () |
Signals an orientation change of a contained subordinate body. More... | |
void | signalFixation () |
Signals a fixation change of a contained subordinate body. More... | |
virtual void | handleModification () |
Handling an internal modification of a contained subordinate body. More... | |
virtual void | handleTranslation () |
Handling a position change of a contained subordinate body. More... | |
virtual void | handleRotation () |
Handling an orientation change of a contained subordinate body. More... | |
virtual void | handleFixation () |
Handling a fixation change of a contained subordinate body. More... | |
Protected Member Functions inherited from walberla::pe::ccd::HashGridsBodyTrait | |
HashGridsBodyTrait () | |
Constructor for the BodyTrait<HashGrids> specialization. More... | |
Friends | |
template<typename... BodyTypes> | |
class | Union |
Constructor | |
MPIRigidBodyTrait | MPITrait |
RigidBody (id_t const typeID, id_t sid, id_t uid) | |
Constructor for the RigidBody class. More... | |
Set functions | |
virtual void | setPositionImpl (real_t px, real_t py, real_t pz) |
virtual void | setOrientationImpl (real_t r, real_t i, real_t j, real_t k) |
Setting the global orientation of the rigid body. More... | |
virtual void | translateImpl (real_t dx, real_t dy, real_t dz) |
Translation of the center of mass of the rigid body by the displacement vector. More... | |
virtual void | rotateImpl (const Quat &dq) |
Implements the rotation of a rigid body. More... | |
virtual void | rotateAroundOriginImpl (const Quat &dq) |
Implements the rotation of a rigid body. More... | |
virtual void | rotateAroundPointImpl (const Vec3 &point, const Quat &dq) |
Rotation of the rigid body around a specific global coordinate. More... | |
virtual bool | containsRelPointImpl (real_t px, real_t py, real_t pz) const |
Checks, whether a point in body relative coordinates lies inside the rigid body. More... | |
virtual bool | isSurfaceRelPointImpl (real_t px, real_t py, real_t pz) const |
Checks, whether a point in relative coordinates lies on the surface of the rigid body. More... | |
void | setMassAndInertia (const real_t mass, const Mat3 &inertia) |
Sets mass and inertia of a rigid body. More... | |
void | setSB (BodyID body) |
Sets the super body for the current body. More... | |
void | resetSB () |
Resets the super body for the current body. More... | |
void | setFinite (const bool finite) |
void | setVisible (bool visible) |
Setting the rigid body visible/invisible. More... | |
void | setPosition (real_t px, real_t py, real_t pz) |
Setting the global position of the rigid body. More... | |
void | setPosition (const Vec3 &gpos) |
Setting the global position of the rigid body. More... | |
void | setRelPosition (const Vec3 &gpos) |
Setting the global position of the rigid body. More... | |
void | setOrientation (real_t r, real_t i, real_t j, real_t k) |
Setting the global orientation of the rigid body. More... | |
void | setOrientation (const Quat &q) |
Setting the global orientation of the rigid body. More... | |
void | setRelOrientation (const Quat &q) |
Setting the relative position of the rigid body. More... | |
void | setMassAndInertiaToInfinity () |
Setting the mass to infinity. This will also make the inertia tensor infinite. More... | |
void | setRelLinearVel (real_t vx, real_t vy, real_t vz) |
Setting the relative linear velocity of the rigid body. More... | |
void | setRelLinearVel (const Vec3 &lvel) |
void | setLinearVel (real_t vx, real_t vy, real_t vz) |
Setting the global linear velocity of the rigid body. More... | |
void | setLinearVel (const Vec3 &lvel) |
/see setLinearVel( real_t vx, real_t vy, real_t vz ) More... | |
void | setRelAngularVel (real_t ax, real_t ay, real_t az) |
Setting the relative angular velocity of the rigid body. More... | |
void | setRelAngularVel (const Vec3 &avel) |
/see setRelAngularVel( real_t ax, real_t ay, real_t az ) More... | |
void | setAngularVel (real_t ax, real_t ay, real_t az) |
Setting the global angular velocity of the rigid body. More... | |
void | setAngularVel (const Vec3 &avel) |
/see setAngularVel( real_t ax, real_t ay, real_t az ) More... | |
void | markForDeletion () |
Marks the rigid body for deletion during the next synchronization. More... | |
Member variables | |
bool | awake_ |
Sleep mode flag. More... | |
real_t | mass_ |
The total mass of the rigid body. More... | |
real_t | invMass_ |
The inverse total mass of the rigid body. More... | |
real_t | motion_ |
The current motion of the rigid body. More... | |
Vec3 | v_ |
The linear velocity of this rigid body. More... | |
Vec3 | w_ |
Angular velocity of this rigid body. More... | |
Vec3 | force_ |
Total force (external+contact) acting in the body's center of mass. More... | |
Vec3 | torque_ |
Total torque (external+contact) acting in the body's center of mass. More... | |
Mat3 | I_ |
The moment of inertia in reference to the body's own body frame. More... | |
Mat3 | Iinv_ |
The inverse moment of inertia within the body frame. More... | |
ManagerID | manager_ |
The rigid body manager responsible for the rigid body. More... | |
BodyID | sb_ |
The superordinate rigid body. More... | |
bool | finite_ |
Finiteness flag. More... | |
bool | visible_ |
Visibility flag. More... | |
bool | remote_ |
Remote flag. More... | |
bool | communicating_ |
Communicating flag. More... | |
bool | global_ |
Global flag. More... | |
bool | toBeDeleted_ |
This flag marks the body for deletion during the next synchronization (only works on local bodies) More... | |
id_t | sid_ |
The unique system-specific body ID. More... | |
id_t | uid_ |
The user-specific body ID. More... | |
AABB | aabb_ |
Axis-aligned bounding box for the rigid body. More... | |
Vec3 | gpos_ |
The position of the center of mass of this rigid body. More... | |
Quat | q_ |
The orientation of the body frame in the global world frame. More... | |
Mat3 | R_ |
The rotation in reference to the global frame of reference. More... | |
id_t | typeID_ |
Additional Inherited Members | |
Public Attributes inherited from walberla::pe::cr::HCSITSBodyTrait | |
size_t | index_ |
Protected Attributes inherited from walberla::pe::ccd::HashGridsBodyTrait | |
void * | grid_ |
Pointer to the hash grid this rigid body is currently assigned to. More... | |
size_t | hash_ |
Current hash value of this rigid body. More... | |
size_t | cellId_ |
The body's index in the body container of the grid cell this rigid body is currently assigned to. More... | |
Private Member Functions inherited from walberla::NonCopyable | |
NonCopyable ()=default | |
~NonCopyable ()=default | |
Constructor for the RigidBody class.
typeID | The geometry type of the rigid body. |
sid | The unique system-specific ID of the rigid body. |
uid | The user-specific ID of the rigid body. |
|
pure virtualdefault |
Destructor for the RigidBody class.
Calculation of the global acceleration of a point in global coordinates.
gpos | The global coordinate. |
The function calculates the global acceleration of a point in global coordinates.
Calculation of the global acceleration of a point in global coordinates.
px | The x-component of the global coordinate. |
py | The y-component of the global coordinate. |
pz | The z-component of the global coordinate. |
The function calculates the global acceleration of a point in global coordinates.
|
inline |
Increases the force acting in the body's center of mass.
f | The acting force. |
The function applies a global force to the rigid body. The given force is acting directly in the body's center of mass and increases the total acting force on the body. If the rigid body is part of a superordinate body, the force is also acting on the superordinate body. Depending on the position of the superordinate body's center of mass, the force can also cause a torque in the superordinate body.
Increases the force acting in the body's center of mass.
fx | The x-component of the force. |
fy | The y-component of the force. |
fz | The z-component of the force. |
The function applies a global force to the rigid body. The given force is acting directly in the body's center of mass and increases the total acting force on the body. If the rigid body is part of a superordinate body, the force is also acting on the superordinate body. Depending on the position of the superordinate body's center of mass, the force can also cause a torque in the superordinate body.
Increases the force acting in the body's center of mass.
f | The acting global force. |
gpos | The global coordinate. |
The given force is acting at the specified coordinate and increases the total acting force on the rigid body. Depending on the position, the force can cause a torque in the body's center of mass. If the body is part of a superordinate body, the force is also acting on the superordinate body.
|
inline |
Increases the force acting in the body's center of mass.
fx | The x-component of the global force. |
fy | The y-component of the global force. |
fz | The z-component of the global force. |
px | The x-component of the global coordinate. |
py | The y-component of the global coordinate. |
pz | The z-component of the global coordinate. |
The given force is acting at the specified coordinate and increases the total acting force on the rigid body. Depending on the position, the force can cause a torque in the body's center of mass. If the body is part of a superordinate body, the force is also acting on the superordinate body.
Increases the force acting in the body's center of mass.
f | The acting global force. |
rpos | The relative coordinate. |
The function applies a global force to the rigid body. The given force is acting at the specified body relative coordinate and increases the total acting force on the rigid body. Depending on the position, the force can cause a torque in the body's center of mass. If the body is part of a superordinate body, the force is also acting on the superordinate body.
|
inline |
Increases the force acting in the body's center of mass.
fx | The x-component of the global force. |
fy | The y-component of the global force. |
fz | The z-component of the global force. |
px | The x-component of the relative coordinate. |
py | The y-component of the relative coordinate. |
pz | The z-component of the relative coordinate. |
The function applies a global force to the rigid body. The given force is acting at the specified body relative coordinate and increases the total acting force on the rigid body. Depending on the position, the force can cause a torque in the body's center of mass. If the body is part of a superordinate body, the force is also acting on the superordinate body.
|
inline |
Applying an impulse in the body's center of mass.
j | The acting impulse. |
The impulse is acting directly in the body's center of mass and instantaneously changes the linear velocity of the rigid body. If the body is part of a superordinate body, the impulse is also acting on the superordinate body. Depending on the position of the superordinate body's center of mass, the impulse can also change the angular velocity of the rigid body (and the superordinate body).
Applying an impulse in the body's center of mass.
jx | The x-component of the impulse. |
jy | The y-component of the impulse. |
jz | The z-component of the impulse. |
The impulse is acting directly in the body's center of mass and instantaneously changes the linear velocity of the rigid body. If the body is part of a superordinate body, the impulse is also acting on the superordinate body. Depending on the position of the superordinate body's center of mass, the impulse can also change the angular velocity of the rigid body (and the superordinate body).
Applying an impulse at the given global coordinate.
j | The acting impulse. |
p | The global coordinate. |
The given impulse is acting at the specified coordinate and instantaneously changes the linear velocity of the rigid body. Depending on the position of the body's center of mass, the impulse can also change the angular velocity. If the rigid body is part of a superordinate body, the impulse is also acting on the superordinate body.
|
inline |
Applying an impulse at the given global coordinate.
jx | The x-component of the impulse. |
jy | The y-component of the impulse. |
jz | The z-component of the impulse. |
px | The x-component of the global coordinate. |
py | The y-component of the global coordinate. |
pz | The z-component of the global coordinate. |
The given impulse is acting at the specified coordinate and instantaneously changes the linear velocity of the rigid body. Depending on the position of the body's center of mass, the impulse can also change the angular velocity. If the rigid body is part of a superordinate body, the impulse is also acting on the superordinate body.
|
inline |
Increases the force acting in the body's center of mass.
f | The acting relative force. |
The function applies a body relative force to the rigid body. The given force is acting directly in the body's center of mass and increases the total force acting on the body. If the body is part of a superordinate body, the force is also acting on the superordinate body. Depending on the position of the superordinate body's center of mass, the force can also cause a torque in the superordinate body.
Increases the total force acting in the body's center of mass.
fx | The x-component of the relative force. |
fy | The y-component of the relative force. |
fz | The z-component of the relative force. |
The function applies a body relative force to the rigid body. The given force is acting directly in the body's center of mass and increases the total force acting on the body. If the body is part of a superordinate body, the force is also acting on the superordinate body. Depending on the position of the superordinate body's center of mass, the force can also cause a torque in the superordinate body.
Increases the force acting in the body's center of mass.
f | The acting relative force. |
gpos | The global coordinate. |
The function applies a body relative force to the rigid body. The given force is acting at the specified global coordinate and increases the total acting force on the rigid body. Depending on the position, the force can cause a torque in the body's center of mass. If the body is part of a superordinate body, the force is also acting on the superordinate body.
|
inline |
Increases the force acting in the body's center of mass.
fx | The x-component of the relative force. |
fy | The y-component of the relative force. |
fz | The z-component of the relative force. |
px | The x-component of the global coordinate. |
py | The y-component of the global coordinate. |
pz | The z-component of the global coordinate. |
The function applies a body relative force to the rigid body. The given force is acting at the specified global coordinate and increases the total acting force on the rigid body. Depending on the position, the force can cause a torque in the body's center of mass. If the body is part of a superordinate body, the force is also acting on the superordinate body.
Increases the force acting in the body's center of mass.
f | The acting relative force. |
rpos | The relative coordinate. |
The function applies a body relative force to the rigid body. The given force is acting at the specified body relative coordinate and increases the total acting force on the rigid body. Depending on the position, the force can cause a torque in the body's center of mass. If the body is part of a superordinate body, the force is also acting on the superordinate body.
|
inline |
Increases the force acting in the body's center of mass.
fx | The x-component of the relative force. |
fy | The y-component of the relative force. |
fz | The z-component of the relative force. |
px | The x-component of the relative coordinate. |
py | The y-component of the relative coordinate. |
pz | The z-component of the relative coordinate. |
The function applies a body relative force to the rigid body. The given force is acting at the specified body relative coordinate and increases the total acting force on the rigid body. Depending on the position, the force can cause a torque in the body's center of mass. If the body is part of a superordinate body, the force is also acting on the superordinate body.
|
inline |
Increasing the torque acting in the body's center of mass.
t | The acting torque. |
The torque is acting directly in the body's center of mass and increases the total acting torque on the body. If the rigid body is part of a superordinate body, the torque is applied to the superordinate body instead. It is not possible to apply a torque on subordinate rigid bodies!
Increasing the torque acting in the body's center of mass.
tx | The x-component of the torque. |
ty | The y-component of the torque. |
tz | The z-component of the torque. |
The torque is acting directly in the body's center of mass and increases the total acting torque on the body. If the rigid body is part of a superordinate body, the torque is applied to the superordinate body instead. It is not possible to apply a torque on subordinate rigid bodies!
|
pure virtual |
|
inline |
Calculating the current motion of a rigid body.
This function calculates the current motion of a rigid body. The motion is a scalar value, consisting of the current linear and angular velocity and is calculated by the following equation:
\[ \Phi = \mbox{bias} \cdot \Phi + (1-\mbox{bias}) \cdot ( \vec{v}^2 + \vec{w}^2 ), \]
where \( \Phi \) is the motion, \( \vec{v} \) is the linear velocity, \( \vec{w} \) is the angular velocity and bias is the weighting factor for the recency-weighted average between the new motion value and the motion value from the last time frame (see pe::sleepBias). If the motion drops below pe::sleepThreshold, the rigid body is put to sleep.
|
virtual |
Checks the validity of the state of the rigid body.
|
inline |
Checks, whether a point in global coordinates lies inside the rigid body.
gpos | The global coordinate. |
Checks, whether a point in global coordinates lies inside the rigid body.
px | The x-component of the global coordinate. |
py | The y-component of the global coordinate. |
pz | The z-component of the global coordinate. |
|
inline |
Checks, whether a point in body relative coordinates lies inside the rigid body.
rpos | The relative coordinate. |
Checks, whether a point in body relative coordinates lies inside the rigid body.
px | The x-component of the relative coordinate. |
py | The y-component of the relative coordinate. |
pz | The z-component of the relative coordinate. |
|
inlineprotectedvirtual |
Checks, whether a point in body relative coordinates lies inside the rigid body.
px | The x-component of the relative coordinate. |
py | The y-component of the relative coordinate. |
pz | The z-component of the relative coordinate. |
Reimplemented in walberla::pe::Box, walberla::pe::Capsule, walberla::pe::Sphere, walberla::pe::Plane, walberla::pe::Ellipsoid, walberla::pe::CylindricalBoundary, and walberla::mesh::pe::ConvexPolyhedron.
|
inlineprotectedvirtual |
Setting the global position (the center of mass) of the rigid body fixed.
This function fixes the global position (the center of mass) of a finite rigid body. If the body is contained in a superordinate body, fixing the contained body will also fix the global position of the superordinate body. In case the body is infinite or contained in an infinite superordinate body (as for instance a plane or an union containing a plane) the function has no effect.
In case of a MPI parallel simulation, changing the settings of a (local) rigid body on one process may invalidate the settings of the rigid body on another process. In order to synchronize all rigid bodies after local changes, the simulation has to be synchronized by the user. Note that any changes on remote rigid bodies are neglected and overwritten by the settings of the rigid body on its local process!
|
inline |
Returns the axis-aligned bounding box of the rigid body.
|
inline |
Returns the length of the longest side of the AABB of the rigid body.
|
inline |
Returns the global angular velocity.
This function returns the angular velocity of the center of mass in reference to the global world frame.
|
inline |
Returns the relative angular velocity.
This function returns the angular velocity of the center of mass in reference to the body's own frame of reference.
|
inline |
Returns the moment of inertia in reference to the body frame of the rigid body.
|
inline |
Returns the relative linear velocity of the rigid body.
This function returns the linear velocity of the center of mass of the rigid body in reference to the body's own frame of reference.
|
inline |
Returns the energy of the rigid body.
|
inline |
Returns the current force acting on the body's center of mass.
This function returns the current force acting on the rigid body. If the body is contained in a union, then this force is part of the total force acting on the union.
|
inline |
Returns the user-specific ID of the rigid body.
|
inline |
Returns the moment of inertia in reference to the global world frame.
|
inline |
Returns the inverse moment of inertia in reference to the body frame of the rigid body.
|
inline |
Returns the inverse moment of inertia in reference to the global world frame.
|
inline |
Returns the inverse total mass of the rigid body.
|
inline |
Returns the kinetic energy of the rigid body.
|
inline |
Returns the global linear velocity of the rigid body.
This function returns the linear velocity of the center of mass of the rigid body in reference to the global world frame.
|
inline |
Returns the supervising rigid body manager of the rigid body.
If the body is currently not supervised by an rigid body manager, the returned ManagerID is 0.
|
inline |
|
inline |
Returns the total mass of the rigid body.
|
inline |
Returns the global position of the center of mass of the rigid body.
|
inline |
Returns the orientation of the rigid body.
This function returns the quaternion of the rigid body, which represents the orientation of the body in reference to the global world frame.
|
inline |
Returns the relative position of the rigid body within the superordinate body.
If this body is not contained in a superbody the zero-vector is returned.
|
inline |
Returns the relative orientation of the rigid body to its superbody.
This function returns the quaternion, which represents the orientation of the body in reference to coordinate system of the superbody. If this body has no superbody the union-quaternion is returned.
|
inline |
Returns the rotation of the rigid body.
This function returns the rotation matrix of the rigid body, which represents the rotation of the body in reference to the global world frame.
|
inline |
Returns the rotational energy of the rigid body.
|
inline |
Returns the superordinate body in which the rigid body is contained.
This function returns the direct superordinate body in which the rigid body is contained. If the rigid body is not contained in another body, the returned BodyID is the body itself.
|
inline |
|
inline |
Returns the unique system-specific ID of the rigid body.
|
inline |
Returns the top level superordinate body in which the rigid body is contained.
This function returns the top level superordinate body in which the rigid body is contained. If the rigid body is not contained in another body, the returned BodyID is the body itself.
This function returns the top level superordinate body in which the rigid body is contained. If the rigid body is not contained in another body, the returned BodyID is the body itself.
|
inline |
|
inline |
Returns the current torque acting on the body's center of mass.
This function returns the current torque acting in the center of mass of the rigid body. If the body is contained in a union, then this torque represents the part of the total torque acting on the union that results from the forces on this body.
|
inline |
|
inlinevirtual |
Returns the volume of the rigid body.
Reimplemented in walberla::pe::Capsule, walberla::pe::Ellipsoid, walberla::pe::Plane, walberla::pe::Sphere, walberla::pe::Box, and walberla::mesh::pe::ConvexPolyhedron.
|
inlineprotectedvirtual |
Handling a fixation change of a contained subordinate body.
This function handles a fixation change of one of the contained subordinate bodies. Derived compound geometries that contain other primitive bodies are required to override this function in order to react to the fixation change. All primitive geometries can use the empty default implementation.
|
inlineprotectedvirtual |
Handling an internal modification of a contained subordinate body.
This function handles an internal modification of one of the contained subordinate bodies. Derived compound geometries that contain other primitive or compound bodies are required to override this function in order to react to the modification. All primitive geometries can use the empty default implementation.
|
inlineprotectedvirtual |
Handling an orientation change of a contained subordinate body.
This function handles a rotation or orientation change of one of the contained subordinate bodies. Derived compound geometries that contain other primitive bodies are required to override this function in order to react to the rotation. All primitive geometries can use the empty default implementation.
|
inlineprotectedvirtual |
Handling a position change of a contained subordinate body.
This function handles a translation or position change of one of the contained subordinate bodies. Derived compound geometries that contain other primitive bodies are required to override this function in order to react to the translation. All primitive geometries can use the empty default implementation.
|
inline |
Returns whether the rigid body has non-zero acting forces or torques.
|
inline |
Checks if a body is "mobile" e.g.
will be integrated by the simulation
|
inline |
Returns whether the rigid body currently has a supervising rigid body manager.
|
inlinevirtual |
|
inline |
Returns whether the rigid body is contained in a superordinate body.
|
inline |
Returns whether the rigid body is awake or not.
|
inline |
Returns whether the rigid body is local or not.
|
inline |
Returns whether the rigid body is finite or not.
|
inline |
Returns whether the rigid body's position is fixed or not.
|
inline |
Returns whether the rigid body is global or not.
|
inline |
|
inline |
Returns whether the rigid body is remote or not.
|
inline |
Checks, whether a point in global coordinates lies on the surface of the rigid body.
gpos | The global coordinate. |
The tolerance level of the check is surfaceThreshold.
Checks, whether a point in global coordinates lies on the surface of the rigid body.
px | The x-component of the global coordinate. |
py | The y-component of the global coordinate. |
pz | The z-component of the global coordinate. |
The tolerance level of the check is surfaceThreshold.
|
inline |
Checks, whether a point in body relative coordinates lies on the surface of the rigid body.
rpos | The relative coordinate. |
The tolerance level of the check is pe::surfaceThreshold.
Checks, whether a point in relative coordinates lies on the surface of the rigid body.
px | The x-component of the relative coordinate. |
py | The y-component of the relative coordinate. |
pz | The z-component of the relative coordinate. |
The tolerance level of the check is surfaceThreshold.
|
inlineprotectedvirtual |
Checks, whether a point in relative coordinates lies on the surface of the rigid body.
px | The x-component of the relative coordinate. |
py | The y-component of the relative coordinate. |
pz | The z-component of the relative coordinate. |
The tolerance level of the check is surfaceThreshold.
Reimplemented in walberla::pe::Box, walberla::pe::Capsule, walberla::pe::Sphere, walberla::pe::Plane, walberla::pe::Ellipsoid, walberla::pe::CylindricalBoundary, and walberla::mesh::pe::ConvexPolyhedron.
|
inline |
Returns whether the rigid body is visible or not.
|
inline |
Marks the rigid body for deletion during the next synchronization.
Transformation from a relative to a global coordinate.
rpos | the relative coordinate. |
The function calculates the transformation of a point relative to the body's center of mass to a point in global coordinates.
|
inline |
Transformation from a relative to a global coordinate.
px | The x-component of the relative coordinate. |
py | The y-component of the relative coordinate. |
pz | The z-component of the relative coordinate. |
The function calculates the transformation of a point relative to the body's center of mass to a point in global coordinates.
Transformation from a global to a relative coordinate.
gpos | The global coordinate. |
The function calculates the transformation of a point in global coordinates to a point relative to the body's center of mass.
|
inline |
Transformation from a global to a relative coordinate.
px | The x-component of the global coordinate. |
py | The y-component of the global coordinate. |
pz | The z-component of the global coordinate. |
The function calculates the transformation of a point in global coordinates to a point relative to the body's center of mass.
|
pure virtual |
|
inlinevirtual |
Resetting all acting forces and torques from the rigid body.
|
inline |
Resets the super body for the current body.
|
inline |
Rotation of the rigid body by the quaternion dq.
dq | The quaternion for the rotation. |
Changing the orientation/rotation of the rigid body. The rigid body is rotated around its center of mass by the quaternion dq.
Note:
Rotation of the rigid body around the specified global rotation axis by the rotation.
angle angle.
axis | The global rotation axis. |
angle | The rotation angle (radian measure). |
Changing the orientation/rotation of the rigid body. The rigid body is rotated around its center of mass around the given axis axis by angle degrees (radian measure).
Note:
|
inline |
Rotation of the rigid body by the Euler angles euler.
euler | 3-dimensional vector of the three rotation angles (radian measure). |
Changing the orientation/rotation of the rigid body. The rigid body is rotated around its center of mass by the Euler angles euler (all components in radian measure). The rotations are applied in the order x, y, and z.
Note:
Rotation of the rigid body around the global rotation axis (x,y,z) by the rotation angle angle.
x | The x-component of the global rotation axis. |
y | The y-component of the global rotation axis. |
z | The z-component of the global rotation axis. |
angle | The rotation angle (radian measure). |
Changing the orientation/rotation of the rigid body. The rigid body is rotated around its center of mass around the given axis (x,y,z) by angle degrees (radian measure).
Note:
Rotation of the rigid body by the Euler angles xangle, yangle and zangle.
xangle | Rotation around the x-axis (radian measure). |
yangle | Rotation around the y-axis (radian measure). |
zangle | Rotation around the z-axis (radian measure). |
Changing the orientation/rotation of the rigid body. The rigid body is rotated around its center of mass by the Euler angles xangle, yangle and zangle (all in radian measure). The rotations are applied in the order x, y, and z.
Note:
|
inline |
Rotation of the rigid body around the origin of the global world frame.
dq | The quaternion for the rotation. |
This function rotates the rigid body around the origin of the global world frame and changes both the global position and the orientation/rotation of the rigid body. The rigid body is rotated by the Euler angles euler (all components in radian measure). The rotations are applied in the order x, y, and z.
Note:
Rotation of the rigid body around the origin of the global world frame.
axis | The global rotation axis. |
angle | The rotation angle (radian measure). |
This function rotates the rigid body around the origin of the global world frame and changes both the global position and the orientation/rotation of the rigid body. The rigid body is rotated around the given axis axis by angle degrees (radian measure).
|
inline |
Rotation of the rigid body around the origin of the global world frame.
euler | 3-dimensional vector of the three rotation angles (radian measure). |
This function rotates the box around the origin of the global world frame and changes both the global position and the orientation/rotation of the rigid body. The rigid body is rotated by the Euler angles euler (all components in radian measure). The rotations are applied in the order x, y, and z.
|
inline |
Rotation of the rigid body around the origin of the global world frame.
x | The x-component of the global rotation axis. |
y | The y-component of the global rotation axis. |
z | The z-component of the global rotation axis. |
angle | The rotation angle (radian measure). |
This function rotates the rigid body around the origin of the global world frame and changes both the global position and the orientation/rotation of the rigid body. The rigid body is rotated around the given axis (x,y,z) by angle degrees (radian measure).
|
inline |
Rotation of the rigid body around the origin of the global world frame.
xangle | Rotation around the x-axis (radian measure). |
yangle | Rotation around the y-axis (radian measure). |
zangle | Rotation around the z-axis (radian measure). |
This function rotates the rigid body around the origin of the global world frame and changes both the global position and the orientation/rotation of the rigid body. The rigid body is rotated by the Euler angles xangle, yangle and zangle (all components in radian measure). The rotations are applied in the order x, y, and z.
|
inlineprotectedvirtual |
Implements the rotation of a rigid body.
May be overwritten in derived classes for performance reasons.
dq | The quaternion for the rotation. |
Reimplemented in walberla::pe::Plane.
|
inline |
Rotation of the rigid body around a specific global coordinate.
point | The global center of the rotation. |
axis | The global rotation axis. |
angle | The rotation angle (radian measure). |
This function rotates the rigid body around the given global coordinate point and changes both the global position and the orientation/rotation of the rigid body. The rigid body is rotated around the given axis axis by angle degrees (radian measure).
Note:
Rotation of the rigid body around a specific global coordinate.
point | The global center of the rotation. |
euler | 3-dimensional vector of the three rotation angles (radian measure). |
This function rotates the rigid body around the given global coordinate point and changes both the global position and the orientation/rotation of the rigid body. The rigid body is rotated by the Euler angles euler (all components in radian measure). The rotations are applied in the order x, y, and z.
Note:
|
inlineprotectedvirtual |
Rotation of the rigid body around a specific global coordinate.
point | The global center of the rotation. |
dq | The quaternion for the rotation. |
This function rotates the rigid body around the given global coordinate point and changes both the global position and the orientation/rotation of the rigid body. The rigid body is rotated by the quaternion dq.
Note:
Reimplemented in walberla::pe::Plane.
|
inlineprotectedvirtual |
Implements the rotation of a rigid body.
May be overwritten in derived classes for performance reasons.
dq | The quaternion for the rotation. |
Reimplemented in walberla::pe::Plane.
|
inline |
Setting the global angular velocity of the rigid body.
ax | The x-component of the global angular velocity. |
ay | The y-component of the global angular velocity. |
az | The z-component of the global angular velocity. |
This function sets the angular velocity of the rigid body. If the body is contained in a superordinate body the function has no effect.
In case of a MPI parallel simulation, changing the settings of a (local) rigid body on one process may invalidate the settings of the rigid body on another process. In order to synchronize all rigid bodies after local changes, the simulation has to be synchronized by the user. Note that any changes on remote rigid bodies are neglected and overwritten by the settings of the rigid body on its local process!
|
inline |
Setting the local flag of the rigid body.
This function declares the rigid body as a local body. Note that this function should not be used explicitly, but is automatically called during the setup of local rigid bodies. Using this function explicitly may lead to simulation errors during a parallel simulation!
|
inline |
|
inline |
|
inline |
Setting the global flag of the rigid body.
This function declares the rigid body as a global body. Note that this function should not be used explicitly, but is automatically called during the setup of local rigid bodies. Using this function explicitly may lead to simulation errors during a parallel simulation!
|
inline |
Setting the global linear velocity of the rigid body.
vx | The x-component of the global linear velocity. |
vy | The y-component of the global linear velocity. |
vz | The z-component of the global linear velocity. |
This function sets the linear velocity of the rigid body. If the body is contained in a superordinate body the function has no effect.
In case of a MPI parallel simulation, changing the settings of a (local) rigid body on one process may invalidate the settings of the rigid body on another process. In order to synchronize all rigid bodies after local changes, the simulation has to be synchronized by the user. Note that any changes on remote rigid bodies are neglected and overwritten by the settings of the rigid body on its local process!
|
inlineprotected |
Sets mass and inertia of a rigid body.
Also calculates inverse values.
mass | mass to be set (may be infinity) |
inertia | inertia to be set (if mass is infinity this one will be ignored) |
|
inline |
Setting the mass to infinity. This will also make the inertia tensor infinite.
|
inline |
Setting the global orientation of the rigid body.
q | The global orientation. |
This function sets the global orientation of the rigid body to the given quaternion q.
Note:
Setting the global orientation of the rigid body.
r | The value for the real_t part. |
i | The value for the first imaginary part. |
j | The value for the second imaginary part. |
k | The value for the third imaginary part. |
This function sets the global orientation of the rigid body to the given quaternion (r,i,j,k).
Note:
|
inlineprotectedvirtual |
Setting the global orientation of the rigid body.
r | The value for the real_t part. |
i | The value for the first imaginary part. |
j | The value for the second imaginary part. |
k | The value for the third imaginary part. |
This function sets the global orientation of the rigid body to the given quaternion (r,i,j,k).
Note:
Reimplemented in walberla::pe::Plane.
|
inline |
Setting the global position of the rigid body.
gpos | The global position. |
This function sets the global position of the rigid body to the given coordinate gpos.
Note:
Setting the global position of the rigid body.
px | The x-component of the global position. |
py | The y-component of the global position. |
pz | The z-component of the global position. |
This function sets the global position of the rigid body to the given coordinate (px,py,pz).
Note:
|
inlineprotectedvirtual |
Reimplemented in walberla::pe::Plane.
|
inline |
Setting the relative angular velocity of the rigid body.
ax | The x-component of the relative angular velocity. |
ay | The y-component of the relative angular velocity. |
az | The z-component of the relative angular velocity. |
This function sets the angular velocity of the rigid body in reference to the body's own frame of reference. The given relative velocity is translated into the global world frame depending on the orientation of the rigid body. If the body is contained in a superordinate body the function has no effect.
In case of a MPI parallel simulation, changing the settings of a (local) rigid body on one process may invalidate the settings of the rigid body on another process. In order to synchronize all rigid bodies after local changes, the simulation has to be synchronized by the user. Note that any changes on remote rigid bodies are neglected and overwritten by the settings of the rigid body on its local process!
|
inline |
Setting the relative linear velocity of the rigid body.
vx | The x-component of the relative linear velocity. |
vy | The y-component of the relative linear velocity. |
vz | The z-component of the relative linear velocity. |
This function sets the linear velocity of the rigid body in reference to the body's own frame of reference. The given relative velocity is translated into the global world frame depending on the orientation of the rigid body. If the body is contained in a superordinate body the function has no effect.
In case of a MPI parallel simulation, changing the settings of a (local) rigid body on one process may invalidate the settings of the rigid body on another process. In order to synchronize all rigid bodies after local changes, the simulation has to be synchronized by the user. Note that any changes on remote rigid bodies are neglected and overwritten by the settings of the rigid body on its local process!
|
inline |
Setting the relative position of the rigid body.
q | The relative orientation. |
This function sets the relative orientation of the rigid body w. r. t. the superbodies position.
Note:
|
inline |
Setting the global position of the rigid body.
gpos | The relative position. |
This function sets the relative position of the rigid body w. r. t. the superbodies position.
Note:
|
inlinevirtual |
Setting the remote flag of the rigid body.
remote | true to declare the rigid body remote, false declare it local. |
This function sets the remote flag of the rigid body. Note that this function should not be used explicitly, but is automatically called during the MPI communication to set the remote status of a rigid body within the simulation world. Using this function explicitly may lead to simulation errors during a parallel simulation!
|
inline |
Sets the super body for the current body.
|
inline |
|
inline |
Setting the rigid body visible/invisible.
visible | true to make the rigid body visible, false to make it invisible. |
|
inlineprotected |
Signals a fixation change of a contained subordinate body.
This function can be used by derived primitive geometries to signal a change of the fixation flag to its superordinate body.
|
inlineprotected |
Signals an internal modification of a contained subordinate body.
This function can be used by derived primitive geometries to signal an internal modification to its superordinate body.
|
inlineprotected |
Signals an orientation change of a contained subordinate body.
This function can be used by derived primitive geometries to signal a rotation or orientation change to its superordinate body.
|
inlineprotected |
Signals a position change of a contained subordinate body.
This function can be used by derived primitive geometries to signal a translation or a position change to its superordinate body.
Estimates the point which is farthest in direction d.
d | The normalized search direction in world-frame coordinates. |
Reimplemented in walberla::pe::Box, walberla::pe::Sphere, walberla::pe::Ellipsoid, walberla::pe::Capsule, and walberla::mesh::pe::ConvexPolyhedron.
Estimates the point which is farthest in direction d.
d | The normalized search direction in world-frame coordinates |
Reimplemented in walberla::pe::Box, and walberla::mesh::pe::ConvexPolyhedron.
|
inline |
Translation of the center of mass of the rigid body by the displacement vector dp.
dp | The displacement vector. |
Note:
Translation of the center of mass of the rigid body by the displacement vector.
(dx,dy,dz).
dx | The x-component of the translation/displacement. |
dy | The y-component of the translation/displacement. |
dz | The z-component of the translation/displacement. |
Note:
|
inlineprotectedvirtual |
Translation of the center of mass of the rigid body by the displacement vector.
(dx,dy,dz).
dx | The x-component of the translation/displacement. |
dy | The y-component of the translation/displacement. |
dz | The z-component of the translation/displacement. |
Note:
Reimplemented in walberla::pe::Plane.
Transformation from a relative to a global vector.
v | the relative vector. |
The function calculates the transformation of a vector in body frame to a vector in global world frame.
|
inline |
Transformation from a relative to a global vector.
vx | The x-component of the relative vector. |
vy | The y-component of the relative vector. |
vz | The z-component of the relative vector. |
The function calculates the transformation of a vector in body frame to a vector in global world frame.
Transformation from a global to a relative vector.
v | The global vector. |
The function calculates the transformation of a vector in global world frame to a vector in body frame.
|
inline |
Transformation from a global to a relative vector.
vx | The x-component of the global vector. |
vy | The y-component of the global vector. |
vz | The z-component of the global vector. |
The function calculates the transformation of a vector in global world frame to a vector in body frame.
Calculation of the global velocity of a relative point.
rpos | The relative coordinate. |
The function calculates the global velocity of a point relative to the body's center of mass.
Reimplemented in walberla::pe::Squirmer.
Calculation of the global velocity of a relative point.
px | The x-component of the relative coordinate. |
py | The y-component of the relative coordinate. |
pz | The z-component of the relative coordinate. |
The function calculates the global velocity of a point relative to the body's center of mass.
Reimplemented in walberla::pe::Squirmer.
Calculation of the global velocity of a point in global coordinates.
gpos | The global coordinate. |
The function calculates the global velocity of a point in global coordinates.
Reimplemented in walberla::pe::Squirmer.
Calculation of the global velocity of a point in global coordinates.
px | The x-component of the global coordinate. |
py | The y-component of the global coordinate. |
pz | The z-component of the global coordinate. |
The function calculates the global velocity of a point in global coordinates.
Reimplemented in walberla::pe::Squirmer.
|
inline |
Waking the rigid body and ending the sleep mode.
This function wakes a rigid body from sleep mode. Note that this function has no effect if it is called on a subordinate rigid body, i.e. a body contained in another rigid body.
|
friend |
|
protected |
Axis-aligned bounding box for the rigid body.
|
protected |
Sleep mode flag.
The flag value indicates if the rigid body is currently awake (true) or in sleep mode (false).
|
protected |
Communicating flag.
The local flag indicates whether the rigid body is local in an MPI parallel simulation. Local bodies are not participating in any communication process.
|
protected |
Finiteness flag.
The flag value indicates if the rigid body is finite (true) or infinite (false).
|
protected |
Total force (external+contact) acting in the body's center of mass.
|
protected |
Global flag.
The global flag indicates whether the rigid body is global in an MPI parallel simulation.
|
private |
The position of the center of mass of this rigid body.
If the body is contained in union this and the other properties are relative to its center / orientation. Use the respective function getPosition() / getRotation() to access the actual global Position in the world frame
|
protected |
The moment of inertia in reference to the body's own body frame.
The moment of inertia quantifies the rotational inertia of a rigid body, i.e. its inertia with respect to rotational motion, in a manner somewhat analogous to how mass quantifies the inertia of a body with respect to translational motion. The naming convention of the tensor elements is
\[\left(\begin{array}{*{3}{c}} I_{xx} & I_{xy} & I_{xz} \\ I_{yx} & I_{yy} & I_{yz} \\ I_{zx} & I_{zy} & I_{zz} \\ \end{array}\right)\]
|
protected |
The inverse moment of inertia within the body frame.
|
protected |
The inverse total mass of the rigid body.
|
protected |
The rigid body manager responsible for the rigid body.
|
protected |
The total mass of the rigid body.
|
protected |
The current motion of the rigid body.
If this value drops under the specified sleep threshold, the rigid body will be put to sleep.
MPIRigidBodyTrait walberla::pe::RigidBody::MPITrait |
|
private |
The orientation of the body frame in the global world frame.
|
private |
The rotation in reference to the global frame of reference.
|
protected |
Remote flag.
This flag indicates whether the rigid body belongs to a remote process (true) or to the local process (false).
|
protected |
The superordinate rigid body.
This data member is the connection to the superordinate body, which is either the enclosing Union or the rigid body itself.
|
protected |
The unique system-specific body ID.
|
protected |
This flag marks the body for deletion during the next synchronization (only works on local bodies)
|
protected |
Total torque (external+contact) acting in the body's center of mass.
|
private |
|
protected |
The user-specific body ID.
|
mutableprotected |
The linear velocity of this rigid body.
|
protected |
Visibility flag.
|
mutableprotected |
Angular velocity of this rigid body.