Saga
Saga Game Engine
|
Functions | |
glm::vec3 | detectCollision (CylinderCollider &a, Transform &aTransform, CylinderCollider &b, Transform &bTransform) |
Detect collision between two axis-aligned cylinder colliders, and return the mtv such that if the first cylinder is translated by the mtv, the two objects no longer collide. | |
std::pair< glm::vec3, std::vector< Collision > > | ellipsoidTriangleCollisions (std::shared_ptr< GameWorld > world, Entity entityEllipsoid, Transform &transform, EllipsoidCollider &ellipsoidCollider, RigidBody &rigidBody, glm::vec3 move) |
Handle collisions between a moving ellipsoid and triangles in the scene. By default, this does 100 translations before dropping further movement. | |
void | cylinderCylinderCollision (std::shared_ptr< GameWorld > world, float deltaTime, float time) |
Process all cylinder-cylinder collisions. If two cylinders penetrate, they move by half of the minimum translation vector away from each other if they are both dynamic. Otherwise, only the dynamic one move and moves by the full mtv, plus some epsilon. By default, this only resolve 100 collisions per call. | |
void Saga::Systems::anonymous_namespace{collisionSystem.cpp}::cylinderCylinderCollision | ( | std::shared_ptr< GameWorld > | world, |
float | deltaTime, | ||
float | time | ||
) |
Process all cylinder-cylinder collisions. If two cylinders penetrate, they move by half of the minimum translation vector away from each other if they are both dynamic. Otherwise, only the dynamic one move and moves by the full mtv, plus some epsilon. By default, this only resolve 100 collisions per call.
world | |
deltaTime | |
time | time ellapsed since the start of the program. |
glm::vec3 Saga::Systems::anonymous_namespace{collisionSystem.cpp}::detectCollision | ( | CylinderCollider & | a, |
Transform & | aTransform, | ||
CylinderCollider & | b, | ||
Transform & | bTransform | ||
) |
Detect collision between two axis-aligned cylinder colliders, and return the mtv such that if the first cylinder is translated by the mtv, the two objects no longer collide.
a | the first cylinder collider. |
aTransform | the first cylinder transform, used to position the cylinder in space. |
b | the second cylinder collider. |
bTransform | the second cylinder transform, used to position the cylinder in space. |
std::pair< glm::vec3, std::vector< Collision > > Saga::Systems::anonymous_namespace{collisionSystem.cpp}::ellipsoidTriangleCollisions | ( | std::shared_ptr< GameWorld > | world, |
Entity | entityEllipsoid, | ||
Transform & | transform, | ||
EllipsoidCollider & | ellipsoidCollider, | ||
RigidBody & | rigidBody, | ||
glm::vec3 | move | ||
) |
Handle collisions between a moving ellipsoid and triangles in the scene. By default, this does 100 translations before dropping further movement.
world | |
entityEllipsoid | entity the ellipsoid is attached to. |
transform | the entity's transform. |
ellipsoidCollider | the entity's ellipsoid collider. |
rigidBody | the entity's rigid body. |
deltaTime | time since last update call, in seconds. |