Collisions module
Adds collision detection to Cubos.
Components
- BoxCollisionShape - holds a box collision shape for a Collider.
- CapsuleCollisionShape - holds a capsule collision shape for a Collider.
- VoxelCollisionShape - holds a voxel collision shape for a Collider.
- ColliderAABB - holds collider AABB data.
- CollisionLayers - holds the collision layers where the collider appears in.
- CollisionMask - holds the mask of layers which the collider can collide with.
- Collider - identifies an entity as the owner of a Collider and its settings.
Bundles
- ColliderBundle - contains all the necessary components for an entity to have collision detection (A CollisionShape must be added separately).
Relations
- IntersectionStart - Relates entities during the frame when two entities start colliding.
- CollidingWith - Relates entities while they are colliding.
- IntersectionEnd - Relates entities during the frame when two entities stop colliding.
Dependencies
Files
- file collider.hpp
- Component cubos::
engine:: CollisionMask. - file collider_aabb.hpp
- Component cubos::
engine:: ColliderAABB. - file collider_bundle.hpp
- Component cubos::
engine:: ColliderBundle. - file colliding_with.hpp
- Relation cubos::
engine:: CollidingWith. - file collision_layers.hpp
- Component cubos::
engine:: CollisionLayers. - file collision_mask.hpp
- Component cubos::
engine:: CollisionMask. - file contact_manifold.hpp
- Struct cubos::
engine:: ContactManifold. - file intersection_end.hpp
- Relation cubos::
engine:: IntersectionEnd. - file intersection_start.hpp
- Relation cubos::
engine:: IntersectionStart. - file plugin.hpp
- Plugin entry point.
- file raycast.hpp
- System argument cubos::
engine:: Raycast. - file box.hpp
- Component cubos::
engine:: BoxCollisionShape. - file capsule.hpp
- Component cubos::
engine:: CapsuleCollisionShape. - file voxel.hpp
- Component cubos::
engine:: VoxelCollisionShape.
Classes
- struct cubos::engine::Collider
- Component that identifies an entity as the owner of a Collider. Works with a CollisionShape (added separately).
- struct cubos::engine::ColliderAABB
- Component which adds an collider AABB to an entity.
- struct cubos::engine::ColliderBundle
- Bundle that packs the components for a Collider entity.
- struct cubos::engine::CollidingWith
- Relation which represents a collision.
- struct cubos::engine::CollisionLayers
- Component that contains the collision layers where the collider appears in. Check also CollisionMask.
- struct cubos::engine::CollisionMask
- Component that contains the mask of layers which the collider can collide with. Check also CollisionLayers.
- struct cubos::engine::IntersectionEnd
- Relation which identifies the frame when two entities stop colliding.
- struct cubos::engine::IntersectionStart
- Relation which identifies the frame when two entities start colliding.
- class cubos::engine::Raycast
- System argument which allows performing raycast queries among all entities with colliders.
- struct cubos::engine::BoxCollisionShape
- Component which adds a box collision shape to an entity, used with a Collider component.
- struct cubos::engine::CapsuleCollisionShape
- Component which adds a capsule collision shape to an entity, used with a Collider component.
- class cubos::engine::VoxelCollisionShape
- Component which adds a collision shape corresponding to a given voxel grid to an entity, used with a Collider component.
- struct cubos::engine::VoxelCollisionShape::BoxShiftPair
- Struct which holds a sub-box of the voxel collision shape, and its shift from the center of the shape.
Functions
-
auto collisionsPlugin(Cubos& cubos) -> CUBOS_
ENGINE_ API void - Plugin entry function.
Function documentation
CUBOS_ ENGINE_ API void collisionsPlugin(Cubos& cubos)
#include <engine/collisions/plugin.hpp>
Plugin entry function.
| Parameters | |
|---|---|
| cubos | Cubos main class. |