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


struct  ColliderDetails

Public Member Functions

 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
virtual const char * name () const =0
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 Attributes

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

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 Attributes

b3Body * body_ = nullptr
RigidBodySimulationsimulation_ = nullptr
std::pair< Vec3, Quaternionlast_state_
std::unordered_map< b3Fixture *, ColliderDetailscollider_details_


class smlt::behaviours::RigidBodySimulation
class smlt::behaviours::Fixture
class impl::ContactListener

Member Data Documentation

◆ simulation

Property<decltype(&Body::simulation_)> smlt::behaviours::impl::Body::simulation
Initial value:
= {
this, &Body::simulation_

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