#include <collision.h>
Collaboration diagram for Collision:
Public Methods | |
Collision () | |
Default and unusefull default constructor. | |
Collision (Cylinder *cyl1, const Point3d &pt1, Cylinder *cyl2, const Point3d &pt2, Vector3d &normal, collisionType type) | |
Collision against other cylinder. | |
Collision (Cylinder *cyl, const Point3d &pt, collisionType type) | |
Collision (Cylinder *cyl, const Point3d &pt1, const Point3d &pt2, collisionType type) | |
Collision of one cylinder in two points over a plane. | |
~Collision () | |
void | resolve () |
Resolves the collision appling a force on the cylinders. | |
collisionType | getType () |
Returns the type of collision. | |
Protected Methods | |
void | resolveGroundCollision () |
Resolves the collision against ground plane. | |
void | resolveCylinderCollision () |
Resolves the collision against another cylinder. | |
Protected Attributes | |
Cylinder * | cyl1 |
Cylinder that collides. | |
Cylinder * | cyl2 |
Cylinder that collides. | |
Point3d | pt1 |
Point over cylinder. | |
Point3d | pt2 |
Point over cylinder. | |
collisionType | type |
Type of collision. | |
Vector3d | normal |
Collision normal, normalized. |
|
Default and unusefull default constructor. Default constructor, but not usefull at all. Definition at line 34 of file collision.cc. References noCollision, and type. |
|
Collision against other cylinder. This collision is against another cylinder. Just copy some data. Definition at line 42 of file collision.cc. References collisionType, cyl1, cyl2, normal, Point3d, pt1, pt2, and type. |
|
Collision between a plane and a cylinder. The plane is always the ground plane (n(0,0,1), p(0,1,0)). Definition at line 55 of file collision.cc. References collisionType, cyl1, cyl2, normal, Point3d, pt1, and type. |
|
Collision of one cylinder in two points over a plane. Two points of one cylinder are touching in some way a plane, the only difference is that we should anulate moment Definition at line 67 of file collision.cc. References collisionType, cyl1, cyl2, normal, Point3d, pt1, pt2, and type. |
|
Definition at line 78 of file collision.cc. |
|
Returns the type of collision.
Definition at line 76 of file collision.h. References collisionType, and type. Referenced by Cylinder::newCycle(). |
|
Resolves the collision appling a force on the cylinders. Resolves a collision Definition at line 84 of file collision.cc. References cyl2, noCollision, resolveCylinderCollision(), resolveGroundCollision(), and type. Referenced by Cylinder::newCycle(). |
|
Resolves the collision against another cylinder. Resolves the forces that have to applied against both cylinders, the moments, and all those things, depending if they are in contact, o penetrating... Definition at line 171 of file collision.cc. Referenced by resolve(). |
|
Resolves the collision against ground plane.
Definition at line 94 of file collision.cc. References Cylinder::angularVelocity, COLLISION_VELOCITY_EPSILUM, contact, cyl1, Cylinder::force, World::getGroundFrictionCoefficient(), Cylinder::inertia, Cylinder::inertiaInverse, log, Cylinder::mass, Vector3d::module(), Cylinder::moment, normal, Vector3d::normalize(), Cylinder::orientationBase, Point3d, pt1, Quaternion::toBody(), Vector3d::toString(), Quaternion::toWorld(), type, Cylinder::velocity, Vector3d::X(), Vector3d::Y(), and Vector3d::Z(). Referenced by resolve(). |
|
Cylinder that collides.
Definition at line 43 of file collision.h. Referenced by Collision(), and resolveGroundCollision(). |
|
Cylinder that collides.
Definition at line 43 of file collision.h. |
|
Collision normal, normalized.
Definition at line 50 of file collision.h. Referenced by Collision(), and resolveGroundCollision(). |
|
Point over cylinder.
Definition at line 45 of file collision.h. Referenced by Collision(), and resolveGroundCollision(). |
|
Point over cylinder.
Definition at line 45 of file collision.h. Referenced by Collision(). |
|
Type of collision.
Definition at line 48 of file collision.h. Referenced by Collision(), getType(), resolve(), and resolveGroundCollision(). |