Template Struct collision_event_base

Inheritance Relationships

Base Type

Struct Documentation

template<class T>
struct legion::physics::collision_event_base : public legion::core::events::event<T>

Public Functions

inline collision_event_base(physics_manifold *m, float d)
collision_event_base(const collision_event_base &other) = default
collision_event_base(collision_event_base &&other) noexcept = default
collision_event_base &operator=(const collision_event_base &other) = default
collision_event_base &operator=(collision_event_base &&other) noexcept = default
inline std::pair<ecs::entity_handle, ecs::entity_handle> participants() const

utility function to quickly get the participating entities of this collision.

inline std::pair<math::vec3, math::vec3> centers() const noexcept

gets the centers of the colliders in local space

inline std::pair<PhysicsCollider*, PhysicsCollider*> colliders() const noexcept

gets the colliders themselves

inline std::pair<transform, transform> transforms() const

gets the transform of the colliding bodys themselves

Public Members

physics_manifold *manifold
float physics_delta