Functions | |
template<typename Container > | |
bool | collide (GeomID, GeomID, Container &) |
Contact generation between two colliding rigid bodies. More... | |
template<typename Container > | |
bool | collide (SphereID s1, SphereID s2, Container &container) |
template<typename Container > | |
bool | collide (SphereID s, PlaneID p, Container &container) |
template<typename Container > | |
bool | collide (PlaneID p, SphereID s, Container &container) |
template<typename Container > | |
bool | collide (SphereID s, CylindricalBoundaryID cb, Container &container) |
template<typename Container > | |
bool | collide (CylindricalBoundaryID cb, SphereID s, Container &container) |
template<typename Container > | |
bool | collide (SphereID s, BoxID b, Container &container) |
Contact generation between a Sphere and a Box. More... | |
template<typename Container > | |
bool | collide (BoxID b, SphereID s, Container &container) |
template<typename Container > | |
bool | collide (BoxID b1, BoxID b2, Container &container) |
Contact generation between two colliding Box primitives. More... | |
template<typename Container > | |
bool | collide (BoxID b, PlaneID p, Container &container) |
Contact generation between a Box and a Plane. More... | |
template<typename Container > | |
bool | collide (PlaneID p, BoxID b, Container &container) |
template<typename Container > | |
bool | collide (CapsuleID c1, CapsuleID c2, Container &container) |
Contact generation between two colliding Capsule primitives. More... | |
template<typename Container > | |
bool | collide (CapsuleID c, PlaneID p, Container &container) |
Contact generation between a Capsule and a Plane. More... | |
template<typename Container > | |
bool | collide (PlaneID p, CapsuleID c, Container &container) |
template<typename Container > | |
bool | collide (SphereID s, CapsuleID c, Container &container) |
template<typename Container > | |
bool | collide (CapsuleID c, SphereID s, Container &container) |
template<typename Container > | |
bool | collide (BoxID b, CapsuleID c, Container &container) |
template<typename Container > | |
bool | collide (CapsuleID c, BoxID b, Container &container) |
template<typename... BodyTypes, typename BodyB , typename Container > | |
bool | collide (Union< BodyTypes... > *bd1, BodyB *bd2, Container &container) |
template<typename BodyA , typename... BodyTypes, typename Container > | |
bool | collide (BodyA *bd1, Union< BodyTypes... > *bd2, Container &container) |
template<typename... BodyTypesA, typename... BodyTypesB, typename Container > | |
bool | collide (Union< BodyTypesA... > *bd1, Union< BodyTypesB... > *bd2, Container &container) |
|
inline |
|
inline |
|
inline |
Contact generation between a Box and a Plane.
b | The colliding box. |
p | The colliding plane. |
container | Contact container for the generated contacts. |
For each corner of the box, the distance to the plane is calculated with a projection on the plane's normal. For each corner, which lies on or inside the plane, a contact point is generated.
|
inline |
|
inline |
|
inline |
Contact generation between a Capsule and a Plane.
c | The colliding capsule. |
p | The colliding plane. |
container | Contact container for the generated contacts. |
The collision between a capsule and a plane is handled as two collisions between the two cap spheres and the plane: the contact points are calculated with a projection of the global positions of the spheres' center of mass on the plane's normal. If the length of the projection is smaller than the radius of the cap sphere, a contact point is generated, which results in a maximum of two contact points.
|
inline |
|
inline |
Contact generation between two colliding Capsule primitives.
c1 | The first colliding capsule. |
c2 | The second colliding capsule. |
container | Contact container for the generated contacts. |
In case of two colliding capsules one or two contact points may be generated. In order to estimate if the two capsules are colliding, the closest points on both centerlines are calculated (see pe::getClosestLineSegmentPoints). If the distance of these two points is smaller than the sum of their radii, the two capsules are colliding. In case they are lying parallel to each other and touch each other along their cylindrical part, two contact points are generated. In all other cases, a single contact point between the calculated closest points is generated.
|
inline |
|
inline |
Contact generation between two colliding rigid bodies.
|
inline |
|
inline |
|
inline |
|
inline |
Contact generation between a Sphere and a Box.
s | The colliding sphere. |
b | The colliding box. |
container | Contact container for the generated contacts. |
In the case of a contact between a sphere and a box, only a single contact point is generated. This contact point is calculated by a projection of the relative distance of the sphere's center of mass from the box's center of mass on the body frame coordinate system of the box. For all three axes, the projection is limited by the lengths of the sides of the box. This projection is transfered to the global world frame, which gives the distance from the box's center of mass to the contact point.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |