class
#include <esp/physics/RigidStage.h>
RigidStage A RigidBase representing an individual rigid stage instance attached to a SceneNode. This construction currently may only be esp::
Base classes
- class RigidBase
- This class specifies the functionality expected of rigid objects and stages, particularly with regard to dynamic simulation, if such a library, such as bullet, is available.
Derived classes
- class BulletRigidStage
- An individual rigid stage instance implementing an interface with Bullet physics to enable dynamics. See btCollisionObject.
Constructors, destructors, conversion operators
-
RigidStage(scene::
SceneNode* rigidBodyNode, const assets:: ResourceManager& resMgr) - ~RigidStage() defaulted override
- Virtual destructor for a RigidStage.
Public functions
- auto initialize(metadata::attributes::AbstractObjectAttributes::ptr initAttributes) -> bool override
- Initializes the RigidStage that inherits from this class.
-
auto getInitializationAttributes() const -> std::
shared_ptr<metadata:: attributes:: StageAttributes> - Get a copy of the template attributes describing the initial state of this stage object. These attributes have the combination of date from the original object attributes and specific instance attributes used to create this stage object. Note : values will reflect both sources, and should not be saved to disk as object attributes, since instance attribute modifications will still occur on subsequent loads.
- auto finalizeObject() -> bool override
- Finalize the creation of this RigidStage.
- void resetStateFromSceneInstanceAttr() override
- Currently not supported. Set or reset the stages's state using the object's specified
sceneInstanceAttributes_
. - void setMotionType(MotionType mt) override
- Currently ignored for stage objects.
Private functions
- auto initialization_LibSpecific() -> bool override
- Finalize the initialization of this RigidStage geometry. This is overridden by inheriting class specific to certain physics libraries.Necessary to support kinematic objects without any dynamics support.
- auto finalizeObject_LibSpecific() -> bool override
- any physics-lib-specific finalization code that needs to be run afterRigidStage is created. Called from finalizeObject. Overridden by inheriting class specific to certain physics libraries. Necessary to support kinematic objects without any dynamics support.
Function documentation
bool esp:: physics:: RigidStage:: initialize(metadata::attributes::AbstractObjectAttributes::ptr initAttributes) override
Initializes the RigidStage that inherits from this class.
Parameters | |
---|---|
initAttributes | The template structure defining relevant physical parameters for this object |
Returns | true if initialized successfully, false otherwise. |
std:: shared_ptr<metadata:: attributes:: StageAttributes> esp:: physics:: RigidStage:: getInitializationAttributes() const
Get a copy of the template attributes describing the initial state of this stage object. These attributes have the combination of date from the original object attributes and specific instance attributes used to create this stage object. Note : values will reflect both sources, and should not be saved to disk as object attributes, since instance attribute modifications will still occur on subsequent loads.
Returns | A copy of the esp:: |
---|
bool esp:: physics:: RigidStage:: finalizeObject() override
Finalize the creation of this RigidStage.
Returns | whether successful finalization. |
---|
void esp:: physics:: RigidStage:: setMotionType(MotionType mt) override
Currently ignored for stage objects.
Parameters | |
---|---|
mt | The desirved MotionType. |
bool esp:: physics:: RigidStage:: initialization_LibSpecific() override private
Finalize the initialization of this RigidStage geometry. This is overridden by inheriting class specific to certain physics libraries.Necessary to support kinematic objects without any dynamics support.
Returns | true if initialized successfully, false otherwise. |
---|
bool esp:: physics:: RigidStage:: finalizeObject_LibSpecific() override private
any physics-lib-specific finalization code that needs to be run afterRigidStage is created. Called from finalizeObject. Overridden by inheriting class specific to certain physics libraries. Necessary to support kinematic objects without any dynamics support.
Returns | whether successful finalization. |
---|