class
#include <esp/physics/RigidScene.h>
RigidScene
Contents
Base classes
- class RigidBase
Derived classes
- class BulletRigidScene
- An individual rigid scene instance implementing an interface with Bullet physics to enable dynamics. See btCollisionObject.
Constructors, destructors, conversion operators
-
RigidScene(scene::
SceneNode* rigidBodyNode) - ~RigidScene() virtual
- Virtual destructor for a RigidScene.
Public functions
-
auto initialize(const assets::
ResourceManager& resMgr, const std:: string& handle) -> bool override - Initializes the RigidScene that inherits from this class.
-
auto getInitializationAttributes() const -> std::
shared_ptr<assets:: PhysicsSceneAttributes> - Get a copy of the template used to initialize this scene object.
- auto finalizeObject() -> bool override
- Finalize the creation of this RigidScene.
- auto setMotionType(MotionType mt) -> bool override
- 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.
Private functions
- auto finalizeObject_LibSpecific() -> bool override
- any physics-lib-specific finalization code that needs to be run afterRigidScene 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:: RigidScene:: initialize(const assets:: ResourceManager& resMgr,
const std:: string& handle) override
Initializes the RigidScene that inherits from this class.
Parameters | |
---|---|
resMgr | a reference to ResourceManager object |
handle | The handle for the template structure defining relevant phyiscal parameters for this object |
Returns | true if initialized successfully, false otherwise. |
std:: shared_ptr<assets:: PhysicsSceneAttributes> esp:: physics:: RigidScene:: getInitializationAttributes() const
Get a copy of the template used to initialize this scene object.
Returns | A copy of the PhysicsSceneAttributes template used to create this scene object. |
---|
bool esp:: physics:: RigidScene:: finalizeObject() override
Finalize the creation of this RigidScene.
Returns | whether successful finalization. |
---|
bool esp:: physics:: RigidScene:: setMotionType(MotionType mt) override
Set the MotionType of the object. If the object is ObjectType::SCENE it can only be MotionType::
Parameters | |
---|---|
mt | The desirved MotionType. |
Returns | true if successfully set, false otherwise. |
bool esp:: physics:: RigidScene:: finalizeObject_LibSpecific() override private
any physics-lib-specific finalization code that needs to be run afterRigidScene 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. |
---|