|
VEGO-Engine
0.1
|
Public Member Functions | |
| CollisionHandler (Manager &mManager) | |
| std::vector< ColliderComponent * > | getColliders (std::initializer_list< Entity::GroupLabel > const &groupLabels, std::initializer_list< Entity * > const &excludedEntities={}) |
| template<typename T> | |
| T | getAnyIntersection (Entity *entity, Vector2D posMod={}, std::initializer_list< Entity::GroupLabel > const &groupLabels={}, std::initializer_list< Entity * > const &excludedEntities={}) |
| Tests entity against all entities with the specified labels for a collision. | |
| void | update () |
| template<> | |
| IntersectionBitSet | getAnyIntersection (Entity *entity, Vector2D posMod, std::initializer_list< Entity::GroupLabel > const &groupLabels, std::initializer_list< Entity * > const &excludedEntities) |
| template<> | |
| Entity * | getAnyIntersection (Entity *entity, Vector2D posMod, std::initializer_list< Entity::GroupLabel > const &groupLabels, std::initializer_list< Entity * > const &excludedEntities) |
| template<> | |
| bool | getAnyIntersection (Entity *entity, Vector2D posMod, std::initializer_list< Entity::GroupLabel > const &groupLabels, std::initializer_list< Entity * > const &excludedEntities) |
Static Public Member Functions | |
| static IntersectionBitSet | getIntersection (Entity *entityA, Entity *entityB, Vector2D posModA=Vector2D(0, 0), Vector2D posModB=Vector2D(0, 0)) |
| static IntersectionBitSet | getIntersectionWithBounds (Entity *entity, Vector2D posMod=Vector2D(0, 0)) |
| IntersectionBitSet CollisionHandler::getAnyIntersection | ( | Entity * | entity, |
| Vector2D | posMod, | ||
| std::initializer_list< Entity::GroupLabel > const & | groupLabels, | ||
| std::initializer_list< Entity * > const & | excludedEntities ) |
Refer to getAnyIntersection() for more details
Direction in bitset true if edge in that direction collides Example usage for IntersectionBitSet (TransformComponent::update()):
| Entity * CollisionHandler::getAnyIntersection | ( | Entity * | entity, |
| Vector2D | posMod, | ||
| std::initializer_list< Entity::GroupLabel > const & | groupLabels, | ||
| std::initializer_list< Entity * > const & | excludedEntities ) |
Refer to getAnyIntersection() for more details
| bool CollisionHandler::getAnyIntersection | ( | Entity * | entity, |
| Vector2D | posMod, | ||
| std::initializer_list< Entity::GroupLabel > const & | groupLabels, | ||
| std::initializer_list< Entity * > const & | excludedEntities ) |
Refer to getAnyIntersection() for more details
| T CollisionHandler::getAnyIntersection | ( | Entity * | entity, |
| Vector2D | posMod = {}, | ||
| std::initializer_list< Entity::GroupLabel > const & | groupLabels = {}, | ||
| std::initializer_list< Entity * > const & | excludedEntities = {} ) |
Tests entity against all entities with the specified labels for a collision.
Tests the given entity against every other entity with the specified labels for intersections between their collison boxes. If the primary entity has no ColliderComponent, the equivalent of no collision is returned immediately, other entities are skipped if they don't have a ColliderComponent
| entity | The primary entity to check against. Return values will be relative to this entity |
| posMod | Modifier to apply toposition before checking collisions. |
| groupLabels | Entities need to have at least one listed GroupLabels to get checked against |
| teamLabels | Entities need to have one of the specified TeamLabels to get checked against |
| negateTeam | If set to true, entities will only be checked against if they don't have one of the specified TeamLabels |