FCL
0.6.0
Flexible Collision Library
|
A class for rectangle sphere-swept bounding volume. More...
#include <RSS.h>
Public Types | |
using | S = S_ |
Public Member Functions | |
RSS () | |
Constructor. | |
bool | overlap (const RSS< S > &other) const |
Check collision between two RSS. | |
bool | overlap (const RSS< S > &other, RSS< S > &overlap_part) const |
Check collision between two RSS and return the overlap part. For RSS, we return nothing, as the overlap part of two RSSs usually is not a RSS. | |
bool | contain (const Vector3< S > &p) const |
Check whether the RSS contains a point. More... | |
RSS< S > & | operator+= (const Vector3< S > &p) |
A simple way to merge the RSS and a point, not compact. More... | |
RSS< S > & | operator+= (const RSS< S > &other) |
Merge the RSS and another RSS. | |
RSS< S > | operator+ (const RSS< S > &other) const |
Return the merged RSS of current RSS and the other one. | |
S | width () const |
Width of the RSS. | |
S | height () const |
Height of the RSS. | |
S | depth () const |
Depth of the RSS. | |
S | volume () const |
Volume of the RSS. | |
S | size () const |
Size of the RSS (used in BV_Splitter to order two RSSs) | |
const Vector3< S > | center () const |
The RSS center. | |
S | distance (const RSS< S > &other, Vector3< S > *P=nullptr, Vector3< S > *Q=nullptr) const |
the distance between two RSS; P and Q, if not nullptr, return the nearest points | |
Public Attributes | |
Matrix3< S > | axis |
Orientation of RSS. The axes of the rotation matrix are the principle directions of the box. We assume that the first column corresponds to the axis with the longest box edge, second column corresponds to the shorter one and the third coulumn corresponds to the shortest one. | |
Vector3< S > | To |
Origin of the rectangle in RSS. | |
S | l [2] |
Side lengths of rectangle. | |
S | r |
Radius of sphere summed with rectangle to form RSS. | |
A class for rectangle sphere-swept bounding volume.
bool fcl::RSS< S >::contain | ( | const Vector3< S > & | p | ) | const |
Check whether the RSS contains a point.
projection is within the rectangle