#include <RSS.h>
Public Member Functions | |
| bool | overlap (const RSS &other) const |
| Check collision between two RSS. | |
| bool | overlap (const RSS &other, RSS &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 Vec3f &p) const |
| Check whether the RSS contains a point. | |
| RSS & | operator+= (const Vec3f &p) |
| A simple way to merge the RSS and a point, not compact. | |
| RSS & | operator+= (const RSS &other) |
| Merge the RSS and another RSS. | |
| RSS | operator+ (const RSS &other) const |
| Return the merged RSS of current RSS and the other one. | |
| FCL_REAL | width () const |
| Width of the RSS. | |
| FCL_REAL | height () const |
| Height of the RSS. | |
| FCL_REAL | depth () const |
| Depth of the RSS. | |
| FCL_REAL | volume () const |
| Volume of the RSS. | |
| FCL_REAL | size () const |
| Size of the RSS (used in BV_Splitter to order two RSSs). | |
| const Vec3f & | center () const |
| The RSS center. | |
| FCL_REAL | distance (const RSS &other, Vec3f *P=NULL, Vec3f *Q=NULL) const |
| the distance between two RSS; P and Q, if not NULL, return the nearest points | |
Public Attributes | |
| Vec3f | axis [3] |
| Orientation of RSS. axis[i] is the ith column of the orientation matrix for the RSS; it is also the i-th principle direction of the RSS. We assume that axis[0] corresponds to the axis with the longest length, axis[1] corresponds to the shorter one and axis[2] corresponds to the shortest one. | |
| Vec3f | Tr |
| Origin of the rectangle in RSS. | |
| FCL_REAL | l [2] |
| Side lengths of rectangle. | |
| FCL_REAL | r |
| Radius of sphere summed with rectangle to form RSS. | |
Definition at line 49 of file RSS.h.
| bool fcl::RSS::contain | ( | const Vec3f & | p | ) | const [inline] |
| bool fcl::RSS::overlap | ( | const RSS & | other | ) | const |
Check collision between two RSS.
compute what transform [R,T] that takes us from cs1 to cs2. [R,T] = [R1,T1]'[R2,T2] = [R1',-R1'T][R2,T2] = [R1'R2, R1'(T2-T1)] First compute the rotation part, then translation part
First compute T2 - T1
Then compute R1'(T2 - T1)
Now compute R1'R2