Class RigidBodyComponent¶
Defined in File rigid_body_component.h
Inheritance Relationships¶
Base Types¶
public CollisionComponent
(Class CollisionComponent)public btMotionState
Derived Types¶
public BoxColliderComponent
(Class BoxColliderComponent)public CapsuleColliderComponent
(Class CapsuleColliderComponent)public SphereColliderComponent
(Class SphereColliderComponent)public StaticMeshColliderComponent
(Class StaticMeshColliderComponent)
Class Documentation¶
-
class
RigidBodyComponent
: public CollisionComponent, public btMotionState¶ Component that reacts to and moves according to physics.
Subclassed by BoxColliderComponent, CapsuleColliderComponent, SphereColliderComponent, StaticMeshColliderComponent
Public Functions
-
virtual
~RigidBodyComponent
()¶
-
void
setAxisLock
(bool enabled)¶
-
PhysicsMaterial
getMaterial
() const¶
-
bool
isMoveable
()¶
-
void
setMoveable
(bool enabled)¶
-
bool
canSleep
()¶
-
void
setSleepable
(bool enabled)¶
-
bool
isCCD
()¶
-
void
setCCD
(bool enabled)¶
-
bool
isGeneratesHitEvents
()¶
-
void
setGeneratedHitEvents
(bool enabled)¶
-
bool
isKinematic
()¶
-
void
setKinematic
(bool enabled)¶
-
void
setupRigidBody
()¶
-
bool
setupData
()¶ Perform setting up internal data needed from other components after they have been added to the owning entity.
-
JSON::json
getJSON
() const¶ Get JSON representation of the component data needed to re-construct component from memory.
-
void
draw
()¶ Expose the component data with ImGui.
-
void
highlight
()¶
Protected Functions
-
RigidBodyComponent
(Entity &owner, const PhysicsMaterial &material, float volume, const Vector3 &offset, const Vector3 &gravity, const Vector3 &angularFactor, int collisionGroup, int collisionMask, bool isMoveable, bool isKinematic, bool generatesHitEvents, bool canSleep, bool isCCD, const Ref<btCollisionShape> &collisionShape)¶
-
void
getWorldTransform
(btTransform &worldTrans) const¶
-
void
setWorldTransform
(const btTransform &worldTrans)¶
-
void
updateTransform
()¶
-
virtual