#include <DSAPBox.h>
SAPBox is a simple bounding box. It contains a Cube which contains only one final CollisionElement and pointers to min and max EndPoints. min and max end points are respectively min and max coordinates of the cube on a coordinate axis. min and max are updated with the method update(int i), so min and max have min/max values on the i-th axis after the method update(int i).
Public Attributes | |
collision::geometry::Cube | cube |
EndPoint * | min {nullptr} |
EndPoint * | max {nullptr} |
Public Member Functions | |
DSAPBox (const collision::geometry::Cube &c, EndPoint *mi=nullptr, EndPoint *ma=nullptr) | |
void | update (int axis, double alarmDist) |
double | squaredDistance (const DSAPBox &other) const |
double | squaredDistance (const DSAPBox &other, int axis) const |
Compute the squared distance from this to other on a specific axis. More... | |
void | show () const |
collision::geometry::Cube sofa::component::collision::detection::algorithm::DSAPBox::cube |
EndPoint* sofa::component::collision::detection::algorithm::DSAPBox::max {nullptr} |
EndPoint* sofa::component::collision::detection::algorithm::DSAPBox::min {nullptr} |
|
inlineexplicit |
|
inline |
double sofa::component::collision::detection::algorithm::DSAPBox::squaredDistance | ( | const DSAPBox & | other | ) | const |
double sofa::component::collision::detection::algorithm::DSAPBox::squaredDistance | ( | const DSAPBox & | other, |
int | axis | ||
) | const |
Compute the squared distance from this to other on a specific axis.
void sofa::component::collision::detection::algorithm::DSAPBox::update | ( | int | axis, |
double | alarmDist | ||
) |