Simulant  21.12-574
A portable game engine for Windows, OSX, Linux, Dreamcast, and PSP
Public Member Functions | Friends | List of all members
smlt::behaviours::KinematicBody Class Reference
Inheritance diagram for smlt::behaviours::KinematicBody:
smlt::behaviours::impl::DynamicBody smlt::RefCounted< KinematicBody > smlt::behaviours::impl::Body smlt::TwoPhaseConstructed smlt::behaviours::StageNodeBehaviour smlt::Behaviour smlt::Updateable

Public Member Functions

 KinematicBody (RigidBodySimulation *simulation)
 
const char * name () const
 
- Public Member Functions inherited from smlt::behaviours::impl::DynamicBody
 DynamicBody (RigidBodySimulation *simulation)
 
float mass () const
 
void set_mass (float m)
 
void set_center_of_mass (const smlt::Vec3 &com)
 
Vec3 center_of_mass () const
 
Vec3 absolute_center_of_mass () const
 
void add_force (const Vec3 &force)
 
void add_force_at_position (const Vec3 &force, const Vec3 &position)
 
void add_relative_force (const Vec3 &force)
 
void add_torque (const Vec3 &torque)
 
void add_relative_torque (const Vec3 &torque)
 
void add_impulse (const Vec3 &impulse)
 
void add_impulse_at_position (const Vec3 &impulse, const Vec3 &position)
 
void add_acceleration_force (const Vec3 &acc)
 
void add_acceleration_force_at_position (const Vec3 &force, const Vec3 &position)
 
void set_linear_damping (const float d)
 
void set_angular_damping (const float d)
 
void set_angular_damping (const Vec3 &v)
 
void set_angular_sleep_tolerance (float x)
 
Vec3 linear_velocity () const
 
Vec3 linear_velocity_at (const Vec3 &position) const
 
void set_linear_velocity (const Vec3 &vel)
 
Vec3 angular_velocity () const
 
void set_angular_velocity (const Vec3 &vel)
 
Vec3 position () const
 
Quaternion rotation () const
 
Vec3 forward ()
 
Vec3 right ()
 
Vec3 up ()
 
bool is_awake () const
 
void lock_rotation (bool x, bool y, bool z)
 
- Public Member Functions inherited from smlt::behaviours::impl::Body
 Body (RigidBodySimulation *simulation)
 
void move_to (const Vec3 &position)
 
void rotate_to (const Quaternion &rotation)
 
bool init ()
 
void clean_up ()
 
void add_box_collider (const Vec3 &size, const PhysicsMaterial &properties, uint16_t kind=0, const Vec3 &offset=Vec3(), const Quaternion &rotation=Quaternion())
 
void add_sphere_collider (const float diameter, const PhysicsMaterial &properties, uint16_t kind=0, const Vec3 &offset=Vec3())
 
void add_capsule_collider (float height, const float diameter, const PhysicsMaterial &properties, uint16_t kind=0)
 
void add_triangle_collider (const smlt::Vec3 &v1, const smlt::Vec3 &v2, const smlt::Vec3 &v3, const PhysicsMaterial &properties, uint16_t kind=0)
 
void register_collision_listener (CollisionListener *listener)
 
void unregister_collision_listener (CollisionListener *listener)
 
Quaternion rotation () const
 
Vec3 position () const
 
- Public Member Functions inherited from smlt::Behaviour
void enable ()
 
void disable ()
 
void _update_thunk (float dt) override
 
void _late_update_thunk (float dt) override
 
void _fixed_update_thunk (float step) override
 
bool attached () const
 
- Public Member Functions inherited from smlt::TwoPhaseConstructed
virtual bool init ()
 
virtual void clean_up ()
 

Friends

class RigidBodySimulation
 

Additional Inherited Members

- Public Types inherited from smlt::RefCounted< KinematicBody >
typedef std::shared_ptr< KinematicBody > ptr
 
typedef std::weak_ptr< KinematicBody > wptr
 
- Static Public Member Functions inherited from smlt::RefCounted< KinematicBody >
static RefCounted< KinematicBody >::ptr create (Args &&... args)
 
static RefCounted< KinematicBody >::ptr create ()
 
- Public Attributes inherited from smlt::behaviours::impl::Body
Property< decltype(&Body::simulation_)> simulation
 
- Public Attributes inherited from smlt::behaviours::StageNodeBehaviour
Property< decltype(&StageNodeBehaviour::stage_node_)> stage_node = { this, &StageNodeBehaviour::stage_node_ }
 
- Public Attributes inherited from smlt::Behaviour
Property< Organism *Behaviour::* > organism
 
- Protected Member Functions inherited from smlt::behaviours::impl::DynamicBody
b3Body * fetch_body () const
 
- Protected Member Functions inherited from smlt::behaviours::impl::Body
void update (float dt) override
 
void store_collider (b3Fixture *fixture, const PhysicsMaterial &material, uint16_t kind)
 
- Protected Member Functions inherited from smlt::behaviours::StageNodeBehaviour
void on_behaviour_added (Organism *controllable) override
 
void on_behaviour_removed (Organism *controllable) override
 
- Protected Member Functions inherited from smlt::RefCounted< KinematicBody >
 RefCounted (Args &&...)
 
- Protected Attributes inherited from smlt::behaviours::impl::Body
b3Body * body_ = nullptr
 
RigidBodySimulationsimulation_ = nullptr
 
std::pair< Vec3, Quaternionlast_state_
 
std::unordered_map< b3Fixture *, ColliderDetailscollider_details_
 

The documentation for this class was generated from the following files: