Contact information returned by collision. More...
#include <collision_data.h>
Public Member Functions | |
Contact () | |
Default constructor. More... | |
Contact (const CollisionGeometry *o1_, const CollisionGeometry *o2_, int b1_, int b2_) | |
Contact (const CollisionGeometry *o1_, const CollisionGeometry *o2_, int b1_, int b2_, const Vec3s &p1, const Vec3s &p2, const Vec3s &normal_, CoalScalar depth_) | |
Contact (const CollisionGeometry *o1_, const CollisionGeometry *o2_, int b1_, int b2_, const Vec3s &pos_, const Vec3s &normal_, CoalScalar depth_) | |
CoalScalar | getDistanceToCollision (const CollisionRequest &request) const |
bool | operator!= (const Contact &other) const |
bool | operator< (const Contact &other) const |
bool | operator== (const Contact &other) const |
Public Attributes | |
int | b1 |
contact primitive in object 1 if object 1 is mesh or point cloud, it is the triangle or point id if object 1 is geometry shape, it is NONE (-1), if object 1 is octree, it is the id of the cell More... | |
int | b2 |
contact primitive in object 2 if object 2 is mesh or point cloud, it is the triangle or point id if object 2 is geometry shape, it is NONE (-1), if object 2 is octree, it is the id of the cell More... | |
std::array< Vec3s, 2 > | nearest_points |
nearest points associated to this contact. More... | |
Vec3s | normal |
contact normal, pointing from o1 to o2. The normal defined as the normalized separation vector: normal = (p2 - p1) / dist(o1, o2), where p1 = nearest_points[0] belongs to o1 and p2 = nearest_points[1] belongs to o2 and dist(o1, o2) is the signed distance between o1 and o2. The normal always points from o1 to o2. More... | |
const CollisionGeometry * | o1 |
collision object 1 More... | |
const CollisionGeometry * | o2 |
collision object 2 More... | |
CoalScalar | penetration_depth |
penetration depth More... | |
Vec3s | pos |
contact position, in world space More... | |
Static Public Attributes | |
static const int | NONE = -1 |
invalid contact primitive information More... | |
Contact information returned by collision.
Definition at line 58 of file coal/collision_data.h.
|
inline |
Default constructor.
Definition at line 111 of file coal/collision_data.h.
|
inline |
Definition at line 117 of file coal/collision_data.h.
|
inline |
Definition at line 125 of file coal/collision_data.h.
|
inline |
Definition at line 137 of file coal/collision_data.h.
|
inline |
Definition at line 384 of file coal/collision_data.h.
|
inline |
Definition at line 162 of file coal/collision_data.h.
|
inline |
Definition at line 149 of file coal/collision_data.h.
|
inline |
Definition at line 154 of file coal/collision_data.h.
int coal::Contact::b1 |
contact primitive in object 1 if object 1 is mesh or point cloud, it is the triangle or point id if object 1 is geometry shape, it is NONE (-1), if object 1 is octree, it is the id of the cell
Definition at line 69 of file coal/collision_data.h.
int coal::Contact::b2 |
contact primitive in object 2 if object 2 is mesh or point cloud, it is the triangle or point id if object 2 is geometry shape, it is NONE (-1), if object 2 is octree, it is the id of the cell
Definition at line 75 of file coal/collision_data.h.
std::array<Vec3s, 2> coal::Contact::nearest_points |
nearest points associated to this contact.
nearest_points
to witness_points
. Definition at line 99 of file coal/collision_data.h.
|
static |
invalid contact primitive information
Definition at line 108 of file coal/collision_data.h.
Vec3s coal::Contact::normal |
contact normal, pointing from o1 to o2. The normal defined as the normalized separation vector: normal = (p2 - p1) / dist(o1, o2), where p1 = nearest_points[0] belongs to o1 and p2 = nearest_points[1] belongs to o2 and dist(o1, o2) is the signed distance between o1 and o2. The normal always points from o1 to o2.
Definition at line 88 of file coal/collision_data.h.
const CollisionGeometry* coal::Contact::o1 |
collision object 1
Definition at line 60 of file coal/collision_data.h.
const CollisionGeometry* coal::Contact::o2 |
collision object 2
Definition at line 63 of file coal/collision_data.h.
CoalScalar coal::Contact::penetration_depth |
penetration depth
Definition at line 105 of file coal/collision_data.h.
Vec3s coal::Contact::pos |
contact position, in world space
Definition at line 102 of file coal/collision_data.h.