esp::physics::RigidObject class

An AbstractFeature3D representing an individual rigid object instance attached to a SceneNode, updating its state through simulation. This may be a MotionType::STATIC scene collision geometry or an object of any MotionType which can interact with other members of a physical world. Must have a collision mesh. By default, a RigidObject is MotionType::KINEMATIC without an underlying simulator implementation. Derived classes can be used to introduce specific implementations of dynamics.

Derived classes

class BulletRigidObject
An individual rigid object instance implementing an interface with Bullet physics to enable MotionType::DYNAMIC objects.

Constructors, destructors, conversion operators

RigidObject(scene::SceneNode* rigidBodyNode)
Constructor for a RigidObject.
~RigidObject() virtual
Virtual destructor for a RigidObject.

Public functions

auto node() -> scene::SceneNode&
Get the scene node being attached to.
auto node() const -> const scene::SceneNode&
auto object() -> scene::SceneNode&
auto object() const -> const scene::SceneNode&
auto initializeScene(const assets::ResourceManager& resMgr, const assets::PhysicsSceneAttributes::ptr physicsSceneAttributes, const std::vector<assets::CollisionMeshData>& meshGroup) -> bool
Initializes this RigidObject as static scene geometry. See PhysicsManager::staticSceneObject_. Sets rigidObjectType_ to RigidObjectType::SCENE.
auto initializeObject(const assets::ResourceManager& resMgr, const assets::PhysicsObjectAttributes::ptr physicsObjectAttributes, const std::vector<assets::CollisionMeshData>& meshGroup) -> bool
Initializes this RigidObject as a potentially moveable object. Sets rigidObjectType_ to RigidObjectType::OBJECT.
void finalizeObject() virtual
Finalize this object with any necessary post-creation processes.
auto isActive() -> bool virtual
Check whether object is being actively simulated, or sleeping. Kinematic objects are always active, but derived dynamics implementations may not be.
void setActive() virtual
Set an object as being actively simulated rather than sleeping. Kinematic objects are always active, but derived dynamics implementations may not be.
auto setMotionType(MotionType mt) -> bool virtual
Set the MotionType of the object. If the object is ObjectType::SCENE it can only be MotionType::STATIC. If the object is ObjectType::OBJECT is can also be set to MotionType::KINEMATIC. Only if a dervied PhysicsManager implementing dynamics is in use can the object be set to MotionType::DYNAMIC.
auto getMotionType() -> MotionType
Get the MotionType of the object. See setMotionType.
void shiftOrigin(const Magnum::Vector3& shift) virtual
Shift the object's local origin by translating all children of this object's SceneNode.
void shiftOriginToBBCenter()
Shift the object's local origin to be coincident with the center of it's bounding box, cumulativeBB_. See shiftOrigin.
void applyForce(const Magnum::Vector3& force, const Magnum::Vector3& relPos) virtual
Apply a force to an object through a dervied dynamics implementation. Does nothing for MotionType::STATIC and MotionType::KINEMATIC objects.
void applyImpulse(const Magnum::Vector3& impulse, const Magnum::Vector3& relPos) virtual
Apply an impulse to an object through a dervied dynamics implementation. Directly modifies the object's velocity without requiring integration through simulation. Does nothing for MotionType::STATIC and MotionType::KINEMATIC objects.
void applyTorque(const Magnum::Vector3& torque) virtual
Apply an internal torque to an object through a dervied dynamics implementation. Does nothing for MotionType::STATIC and MotionType::KINEMATIC objects.
void applyImpulseTorque(const Magnum::Vector3& impulse) virtual
Apply an internal impulse torque to an object through a dervied dynamics implementation. Does nothing for MotionType::STATIC and MotionType::KINEMATIC objects.
void setLinearVelocity(CORRADE_UNUSED const Magnum::Vector3& linVel) virtual
Virtual linear velocity setter for an object.
void setAngularVelocity(CORRADE_UNUSED const Magnum::Vector3& angVel) virtual
Virtual angular velocity setter for an object.
auto getLinearVelocity() const -> Magnum::Vector3 virtual
Virtual linear velocity getter for an object.
auto getAngularVelocity() const -> Magnum::Vector3 virtual
Virtual angular velocity getter for an object.
auto getVelocityControl() -> VelocityControl::ptr
Retrieves a reference to the VelocityControl struct for this object.
void setTransformation(const Magnum::Matrix4& transformation) virtual
Set the 4x4 transformation matrix of the object kinematically. Calling this during simulation of a MotionType::DYNAMIC object is not recommended.
void setTranslation(const Magnum::Vector3& vector) virtual
Set the 3D position of the object kinematically. Calling this during simulation of a MotionType::DYNAMIC object is not recommended.
void setRotation(const Magnum::Quaternion& quaternion) virtual
Set the orientation of the object kinematically. Calling this during simulation of a MotionType::DYNAMIC object is not recommended.
void resetTransformation() virtual
Reset the transformation of the object. !!NOT IMPLEMENTED!!
void translate(const Magnum::Vector3& vector) virtual
Modify the 3D position of the object kinematically by translation. Calling this during simulation of a MotionType::DYNAMIC object is not recommended.
void translateLocal(const Magnum::Vector3& vector) virtual
Modify the 3D position of the object kinematically by translation with a vector defined in the object's local coordinate system. Calling this during simulation of a MotionType::DYNAMIC object is not recommended.
void rotate(const Magnum::Rad angleInRad, const Magnum::Vector3& normalizedAxis) virtual
Modify the orientation of the object kinematically by applying an axis-angle rotation to it. Calling this during simulation of a MotionType::DYNAMIC object is not recommended.
void rotateLocal(const Magnum::Rad angleInRad, const Magnum::Vector3& normalizedAxis) virtual
Modify the orientation of the object kinematically by applying an axis-angle rotation to it in the local coordinate system. Calling this during simulation of a MotionType::DYNAMIC object is not recommended.
void rotateX(const Magnum::Rad angleInRad) virtual
Modify the orientation of the object kinematically by applying a rotation to it about the global X axis. Calling this during simulation of a MotionType::DYNAMIC object is not recommended.
void rotateY(const Magnum::Rad angleInRad) virtual
Modify the orientation of the object kinematically by applying a rotation to it about the global Y axis. Calling this during simulation of a MotionType::DYNAMIC object is not recommended.
void rotateZ(const Magnum::Rad angleInRad) virtual
Modify the orientation of the object kinematically by applying a rotation to it about the global Z axis. Calling this during simulation of a MotionType::DYNAMIC object is not recommended.
void rotateXLocal(const Magnum::Rad angleInRad) virtual
Modify the orientation of the object kinematically by applying a rotation to it about the local X axis. Calling this during simulation of a MotionType::DYNAMIC object is not recommended.
void rotateYLocal(const Magnum::Rad angleInRad) virtual
Modify the orientation of the object kinematically by applying a rotation to it about the local Y axis. Calling this during simulation of a MotionType::DYNAMIC object is not recommended.
void rotateZLocal(const Magnum::Rad angleInRad) virtual
Modify the orientation of the object kinematically by applying a rotation to it about the local Z axis. Calling this during simulation of a MotionType::DYNAMIC object is not recommended.
auto getMass() -> double virtual
Get the mass of the object. Only used for dervied dynamic implementations of RigidObject.
auto getScale() -> double virtual
Get the uniform scale of the object.
auto getFrictionCoefficient() -> double virtual
Get the scalar friction coefficient of the object. Only used for dervied dynamic implementations of RigidObject.
auto getRestitutionCoefficient() -> double virtual
Get the scalar coefficient of restitution of the object. Only used for dervied dynamic implementations of RigidObject.
auto getLinearDamping() -> double virtual
Get the scalar linear damping coefficient of the object. Only used for dervied dynamic implementations of RigidObject.
auto getAngularDamping() -> double virtual
Get the scalar angular damping coefficient of the object. Only used for dervied dynamic implementations of RigidObject.
auto getCOM() -> Magnum::Vector3 virtual
Get the center of mass (COM) of the object.
auto getInertiaVector() -> Magnum::Vector3 virtual
Get the diagonal of the inertia matrix for an object. If an object is aligned with its principle axii of inertia, the 3x3 inertia matrix can be reduced to a diagonal. See RigidObject::setInertiaVector.
auto getInertiaMatrix() -> Magnum::Matrix3 virtual
Get the 3x3 inertia matrix for an object.
void setMass(CORRADE_UNUSED const double mass) virtual
Set the mass of the object. Only used for dervied dynamic implementations of RigidObject.
void setCOM(CORRADE_UNUSED const Magnum::Vector3& COM) virtual
Set the center of mass (COM) of the object.
void setInertiaVector(CORRADE_UNUSED const Magnum::Vector3& inertia) virtual
Set the diagonal of the inertia matrix for the object. If an object is aligned with its principle axii of inertia, the 3x3 inertia matrix can be reduced to a diagonal.
void setScale(CORRADE_UNUSED const double scale) virtual
Set the uniform scale of the object.
void setFrictionCoefficient(CORRADE_UNUSED const double frictionCoefficient) virtual
Set the scalar friction coefficient of the object. Only used for dervied dynamic implementations of RigidObject.
void setRestitutionCoefficient(CORRADE_UNUSED const double restitutionCoefficient) virtual
Set the scalar coefficient of restitution of the object. Only used for dervied dynamic implementations of RigidObject.
void setLinearDamping(CORRADE_UNUSED const double linDamping) virtual
Set the scalar linear damping coefficient of the object. Only used for dervied dynamic implementations of RigidObject.
void setAngularDamping(CORRADE_UNUSED const double angDamping) virtual
Set the scalar angular damping coefficient for the object. Only used for dervied dynamic implementations of RigidObject.
auto getInitializationAttributes() const -> const assets::PhysicsObjectAttributes::ptr
Get the template used to initialize this object.

Public variables

esp::core::Configuration attributes_
Store whatever object attributes you want here!
scene::SceneNode* BBNode_
scene::SceneNode* visualNode_
All Drawable components are children of this node.

Protected functions

void syncPose() virtual
Used to synchronize other simulator's notion of the object state after it was changed kinematically. Called automatically on kinematic updates.

Protected variables

VelocityControl::ptr velControl_
Convenience variable: specifies a constant control velocity (linear | angular) applied to the rigid body before each step.
MotionType objectMotionType_
The MotionType of the object. Determines what operations can be performed on this object.
RigidObjectType rigidObjectType_
The RigidObjectType of the object. Identifies what role the object plays in the phyiscal world. A value of RigidObjectType::NONE identifies the object as uninitialized.
assets::PhysicsObjectAttributes::ptr initializationAttributes_
Saved attributes when the object was initialized.

Private functions

auto initializeSceneFinalize(const assets::ResourceManager& resMgr, const assets::PhysicsSceneAttributes::ptr physicsSceneAttributes, const std::vector<assets::CollisionMeshData>& meshGroup) -> bool virtual
Finalize the initialization of this RigidObject as static scene geometry. This is overridden by inheriting objects.
auto initializeObjectFinalize(const assets::ResourceManager& resMgr, const assets::PhysicsObjectAttributes::ptr physicsObjectAttributes, const std::vector<assets::CollisionMeshData>& meshGroup) -> bool virtual
Finalize initialization of this RigidObject as a potentially moveable object. This is overridden by inheriting objects.

Function documentation

esp::physics::RigidObject::RigidObject(scene::SceneNode* rigidBodyNode)

Constructor for a RigidObject.

Parameters
rigidBodyNode The scene::SceneNode this feature will be attached to.

bool esp::physics::RigidObject::initializeScene(const assets::ResourceManager& resMgr, const assets::PhysicsSceneAttributes::ptr physicsSceneAttributes, const std::vector<assets::CollisionMeshData>& meshGroup)

Initializes this RigidObject as static scene geometry. See PhysicsManager::staticSceneObject_. Sets rigidObjectType_ to RigidObjectType::SCENE.

Parameters
resMgr
physicsSceneAttributes The template structure defining relevant phyiscal parameters for the physical scene.
meshGroup The collision mesh data for the scene.
Returns true if initialized successfully, false otherwise.

bool esp::physics::RigidObject::initializeObject(const assets::ResourceManager& resMgr, const assets::PhysicsObjectAttributes::ptr physicsObjectAttributes, const std::vector<assets::CollisionMeshData>& meshGroup)

Initializes this RigidObject as a potentially moveable object. Sets rigidObjectType_ to RigidObjectType::OBJECT.

Parameters
resMgr
physicsObjectAttributes The template structure defining relevant phyiscal parameters for the object. See esp::assets::ResourceManager::physicsObjectLibrary_.
meshGroup The collision mesh data for the object.
Returns true if initialized successfully, false otherwise.

bool esp::physics::RigidObject::isActive() virtual

Check whether object is being actively simulated, or sleeping. Kinematic objects are always active, but derived dynamics implementations may not be.

Returns true if active, false otherwise.

bool esp::physics::RigidObject::setMotionType(MotionType mt) virtual

Set the MotionType of the object. If the object is ObjectType::SCENE it can only be MotionType::STATIC. If the object is ObjectType::OBJECT is can also be set to MotionType::KINEMATIC. Only if a dervied PhysicsManager implementing dynamics is in use can the object be set to MotionType::DYNAMIC.

Parameters
mt The desirved MotionType.
Returns true if successfully set, false otherwise.

MotionType esp::physics::RigidObject::getMotionType()

Get the MotionType of the object. See setMotionType.

Returns The object's current MotionType.

void esp::physics::RigidObject::shiftOrigin(const Magnum::Vector3& shift) virtual

Shift the object's local origin by translating all children of this object's SceneNode.

Parameters
shift The translation to apply to object's children.

void esp::physics::RigidObject::applyForce(const Magnum::Vector3& force, const Magnum::Vector3& relPos) virtual

Apply a force to an object through a dervied dynamics implementation. Does nothing for MotionType::STATIC and MotionType::KINEMATIC objects.

Parameters
force The desired force on the object in the global coordinate system.
relPos The desired location of force application in the global coordinate system relative to the object's center of mass.

void esp::physics::RigidObject::applyImpulse(const Magnum::Vector3& impulse, const Magnum::Vector3& relPos) virtual

Apply an impulse to an object through a dervied dynamics implementation. Directly modifies the object's velocity without requiring integration through simulation. Does nothing for MotionType::STATIC and MotionType::KINEMATIC objects.

Parameters
impulse The desired impulse on the object in the global coordinate system.
relPos The desired location of impulse application in the global coordinate system relative to the object's center of mass.

void esp::physics::RigidObject::applyTorque(const Magnum::Vector3& torque) virtual

Apply an internal torque to an object through a dervied dynamics implementation. Does nothing for MotionType::STATIC and MotionType::KINEMATIC objects.

Parameters
torque The desired torque on the object in the local coordinate system.

void esp::physics::RigidObject::applyImpulseTorque(const Magnum::Vector3& impulse) virtual

Apply an internal impulse torque to an object through a dervied dynamics implementation. Does nothing for MotionType::STATIC and MotionType::KINEMATIC objects.

Parameters
impulse The desired impulse torque on the object in the local coordinate system. Directly modifies the object's angular velocity without requiring integration through simulation.

void esp::physics::RigidObject::setLinearVelocity(CORRADE_UNUSED const Magnum::Vector3& linVel) virtual

Virtual linear velocity setter for an object.

Parameters
linVel Linear velocity to set.

Does nothing for default MotionType::KINEMATIC or MotionType::STATIC objects.

void esp::physics::RigidObject::setAngularVelocity(CORRADE_UNUSED const Magnum::Vector3& angVel) virtual

Virtual angular velocity setter for an object.

Parameters
angVel Angular velocity vector corresponding to world unit axis angles.

Does nothing for default MotionType::KINEMATIC or MotionType::STATIC objects.

Magnum::Vector3 esp::physics::RigidObject::getLinearVelocity() const virtual

Virtual linear velocity getter for an object.

Returns Linear velocity of the object.

Returns zero for default MotionType::KINEMATIC or MotionType::STATIC objects.

Magnum::Vector3 esp::physics::RigidObject::getAngularVelocity() const virtual

Virtual angular velocity getter for an object.

Returns Angular velocity vector corresponding to world unit axis angles.

Returns zero for default MotionType::KINEMATIC or MotionType::STATIC objects.

void esp::physics::RigidObject::setTransformation(const Magnum::Matrix4& transformation) virtual

Set the 4x4 transformation matrix of the object kinematically. Calling this during simulation of a MotionType::DYNAMIC object is not recommended.

Parameters
transformation The desired 4x4 transform of the object.

void esp::physics::RigidObject::setTranslation(const Magnum::Vector3& vector) virtual

Set the 3D position of the object kinematically. Calling this during simulation of a MotionType::DYNAMIC object is not recommended.

Parameters
vector The desired 3D position of the object.

void esp::physics::RigidObject::setRotation(const Magnum::Quaternion& quaternion) virtual

Set the orientation of the object kinematically. Calling this during simulation of a MotionType::DYNAMIC object is not recommended.

Parameters
quaternion The desired orientation of the object.

void esp::physics::RigidObject::translate(const Magnum::Vector3& vector) virtual

Modify the 3D position of the object kinematically by translation. Calling this during simulation of a MotionType::DYNAMIC object is not recommended.

Parameters
vector The desired 3D vector by which to translate the object.

void esp::physics::RigidObject::translateLocal(const Magnum::Vector3& vector) virtual

Modify the 3D position of the object kinematically by translation with a vector defined in the object's local coordinate system. Calling this during simulation of a MotionType::DYNAMIC object is not recommended.

Parameters
vector The desired 3D vector in the object's ocal coordiante system by which to translate the object.

void esp::physics::RigidObject::rotate(const Magnum::Rad angleInRad, const Magnum::Vector3& normalizedAxis) virtual

Modify the orientation of the object kinematically by applying an axis-angle rotation to it. Calling this during simulation of a MotionType::DYNAMIC object is not recommended.

Parameters
angleInRad The angle of rotation in radians.
normalizedAxis The desired unit vector axis of rotation.

void esp::physics::RigidObject::rotateLocal(const Magnum::Rad angleInRad, const Magnum::Vector3& normalizedAxis) virtual

Modify the orientation of the object kinematically by applying an axis-angle rotation to it in the local coordinate system. Calling this during simulation of a MotionType::DYNAMIC object is not recommended.

Parameters
angleInRad The angle of rotation in radians.
normalizedAxis The desired unit vector axis of rotation in the local coordinate system.

void esp::physics::RigidObject::rotateX(const Magnum::Rad angleInRad) virtual

Modify the orientation of the object kinematically by applying a rotation to it about the global X axis. Calling this during simulation of a MotionType::DYNAMIC object is not recommended.

Parameters
angleInRad The angle of rotation in radians.

void esp::physics::RigidObject::rotateY(const Magnum::Rad angleInRad) virtual

Modify the orientation of the object kinematically by applying a rotation to it about the global Y axis. Calling this during simulation of a MotionType::DYNAMIC object is not recommended.

Parameters
angleInRad The angle of rotation in radians.

void esp::physics::RigidObject::rotateZ(const Magnum::Rad angleInRad) virtual

Modify the orientation of the object kinematically by applying a rotation to it about the global Z axis. Calling this during simulation of a MotionType::DYNAMIC object is not recommended.

Parameters
angleInRad The angle of rotation in radians.

void esp::physics::RigidObject::rotateXLocal(const Magnum::Rad angleInRad) virtual

Modify the orientation of the object kinematically by applying a rotation to it about the local X axis. Calling this during simulation of a MotionType::DYNAMIC object is not recommended.

Parameters
angleInRad The angle of rotation in radians.

void esp::physics::RigidObject::rotateYLocal(const Magnum::Rad angleInRad) virtual

Modify the orientation of the object kinematically by applying a rotation to it about the local Y axis. Calling this during simulation of a MotionType::DYNAMIC object is not recommended.

Parameters
angleInRad The angle of rotation in radians.

void esp::physics::RigidObject::rotateZLocal(const Magnum::Rad angleInRad) virtual

Modify the orientation of the object kinematically by applying a rotation to it about the local Z axis. Calling this during simulation of a MotionType::DYNAMIC object is not recommended.

Parameters
angleInRad The angle of rotation in radians.

double esp::physics::RigidObject::getMass() virtual

Get the mass of the object. Only used for dervied dynamic implementations of RigidObject.

Returns The mass of the object.

For kinematic objects they are dummies, for dynamic objects implemented in physics-engine specific ways

double esp::physics::RigidObject::getScale() virtual

Get the uniform scale of the object.

Returns The scalar uniform scale for the object relative to its initially loaded meshes.

double esp::physics::RigidObject::getFrictionCoefficient() virtual

Get the scalar friction coefficient of the object. Only used for dervied dynamic implementations of RigidObject.

Returns The scalar friction coefficient of the object.

double esp::physics::RigidObject::getRestitutionCoefficient() virtual

Get the scalar coefficient of restitution of the object. Only used for dervied dynamic implementations of RigidObject.

Returns The scalar coefficient of restitution of the object.

double esp::physics::RigidObject::getLinearDamping() virtual

Get the scalar linear damping coefficient of the object. Only used for dervied dynamic implementations of RigidObject.

Returns The scalar linear damping coefficient of the object.

double esp::physics::RigidObject::getAngularDamping() virtual

Get the scalar angular damping coefficient of the object. Only used for dervied dynamic implementations of RigidObject.

Returns The scalar angular damping coefficient of the object.

Magnum::Vector3 esp::physics::RigidObject::getCOM() virtual

Get the center of mass (COM) of the object.

Returns Object 3D center of mass in the global coordinate system.

Magnum::Vector3 esp::physics::RigidObject::getInertiaVector() virtual

Get the diagonal of the inertia matrix for an object. If an object is aligned with its principle axii of inertia, the 3x3 inertia matrix can be reduced to a diagonal. See RigidObject::setInertiaVector.

Returns The diagonal of the object's inertia matrix.

Magnum::Matrix3 esp::physics::RigidObject::getInertiaMatrix() virtual

Get the 3x3 inertia matrix for an object.

Returns The object's 3x3 inertia matrix.

void esp::physics::RigidObject::setMass(CORRADE_UNUSED const double mass) virtual

Set the mass of the object. Only used for dervied dynamic implementations of RigidObject.

Parameters
mass The new mass of the object.

void esp::physics::RigidObject::setCOM(CORRADE_UNUSED const Magnum::Vector3& COM) virtual

Set the center of mass (COM) of the object.

Parameters
COM Object 3D center of mass in the local coordinate system.

void esp::physics::RigidObject::setInertiaVector(CORRADE_UNUSED const Magnum::Vector3& inertia) virtual

Set the diagonal of the inertia matrix for the object. If an object is aligned with its principle axii of inertia, the 3x3 inertia matrix can be reduced to a diagonal.

Parameters
inertia The new diagonal for the object's inertia matrix.

void esp::physics::RigidObject::setScale(CORRADE_UNUSED const double scale) virtual

Set the uniform scale of the object.

Parameters
scale The new scalar uniform scale for the object relative to its initially loaded meshes.

void esp::physics::RigidObject::setFrictionCoefficient(CORRADE_UNUSED const double frictionCoefficient) virtual

Set the scalar friction coefficient of the object. Only used for dervied dynamic implementations of RigidObject.

Parameters
frictionCoefficient The new scalar friction coefficient of the object.

void esp::physics::RigidObject::setRestitutionCoefficient(CORRADE_UNUSED const double restitutionCoefficient) virtual

Set the scalar coefficient of restitution of the object. Only used for dervied dynamic implementations of RigidObject.

Parameters
restitutionCoefficient The new scalar coefficient of restitution of the object.

void esp::physics::RigidObject::setLinearDamping(CORRADE_UNUSED const double linDamping) virtual

Set the scalar linear damping coefficient of the object. Only used for dervied dynamic implementations of RigidObject.

Parameters
linDamping The new scalar linear damping coefficient of the object.

void esp::physics::RigidObject::setAngularDamping(CORRADE_UNUSED const double angDamping) virtual

Set the scalar angular damping coefficient for the object. Only used for dervied dynamic implementations of RigidObject.

Parameters
angDamping The new scalar angular damping coefficient for the object.

const assets::PhysicsObjectAttributes::ptr esp::physics::RigidObject::getInitializationAttributes() const

Get the template used to initialize this object.

Returns The initialization settings of this object instance.

PhysicsObjectAttributes templates are expected to be changed between instances of objects.

bool esp::physics::RigidObject::initializeSceneFinalize(const assets::ResourceManager& resMgr, const assets::PhysicsSceneAttributes::ptr physicsSceneAttributes, const std::vector<assets::CollisionMeshData>& meshGroup) virtual private

Finalize the initialization of this RigidObject as static scene geometry. This is overridden by inheriting objects.

Parameters
resMgr Reference to resource manager, to access relevant components pertaining to the scene object
physicsSceneAttributes The template structure defining relevant phyiscal parameters for the physical scene.
meshGroup The collision mesh data for the scene.
Returns true if initialized successfully, false otherwise.

bool esp::physics::RigidObject::initializeObjectFinalize(const assets::ResourceManager& resMgr, const assets::PhysicsObjectAttributes::ptr physicsObjectAttributes, const std::vector<assets::CollisionMeshData>& meshGroup) virtual private

Finalize initialization of this RigidObject as a potentially moveable object. This is overridden by inheriting objects.

Parameters
resMgr Reference to resource manager, to access relevant components pertaining to the scene object
physicsObjectAttributes The template structure defining relevant phyiscal parameters for the object. See esp::assets::ResourceManager::physicsObjectLibrary_.
meshGroup The collision mesh data for the object.
Returns true if initialized successfully, false otherwise.

Variable documentation

scene::SceneNode* esp::physics::RigidObject::BBNode_

The SceneNode of a bounding box debug drawable. If nullptr, BB drawing is off. See toggleBBDraw().