Public Member Functions |
Vec3f | center () const |
| The RSS center.
|
bool | contain (const Vec3f &p) const |
| Check whether the RSS contains a point.
|
BVH_REAL | depth () const |
| Depth of the RSS.
|
BVH_REAL | distance (const RSS &other) const |
| the distance between two RSS
|
BVH_REAL | height () const |
| Height of the RSS.
|
RSS | operator+ (const RSS &other) const |
| Return the merged RSS of current RSS and the other one.
|
RSS & | operator+= (const RSS &other) |
| Merge the RSS and another RSS.
|
RSS & | operator+= (const Vec3f &p) |
| A simple way to merge the RSS and a point, not compact.
|
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 | overlap (const RSS &other) const |
| Check collision between two RSS.
|
| RSS () |
BVH_REAL | size () const |
| Size of the RSS, for split order.
|
BVH_REAL | volume () const |
| Volume of the RSS.
|
BVH_REAL | width () const |
| Width of the RSS.
|
Static Public Member Functions |
static BVH_REAL | rectDistance (const Vec3f Rab[3], Vec3f const &Tab, const BVH_REAL a[2], const BVH_REAL b[2], Vec3f *P=NULL, Vec3f *Q=NULL) |
| distance between two oriented rectangles P and Q (optional return values) are the closest points in the rectangles, both are in the local frame of the first rectangle
|
Public Attributes |
Vec3f | axis [3] |
| Orientation of RSS.
|
BVH_REAL | l [2] |
| side lengths of rectangle
|
BVH_REAL | r |
| radius of sphere summed with rectangle to form RSS
|
Vec3f | Tr |
| position of rectangle (origin of the rectangle)
|
Static Protected Member Functions |
static void | clipToRange (BVH_REAL &val, BVH_REAL a, BVH_REAL b) |
| Clip val between a and b.
|
static bool | inVoronoi (BVH_REAL a, BVH_REAL b, BVH_REAL Anorm_dot_B, BVH_REAL Anorm_dot_T, BVH_REAL A_dot_B, BVH_REAL A_dot_T, BVH_REAL B_dot_T) |
| Returns whether the nearest point on rectangle edge Pb + B*u, 0 <= u <= b, to the rectangle edge, Pa + A*t, 0 <= t <= a, is within the half space determined by the point Pa and the direction Anorm.
|
static void | segCoords (BVH_REAL &t, BVH_REAL &u, BVH_REAL a, BVH_REAL b, BVH_REAL A_dot_B, BVH_REAL A_dot_T, BVH_REAL B_dot_T) |
| Finds the parameters t & u corresponding to the two closest points on a pair of line segments. The first segment is defined as Pa + A*t, 0 <= t <= a, where "Pa" is one endpoint of the segment, "A" is a unit vector pointing to the other endpoint, and t is a scalar that produces all the points between the two endpoints. Since "A" is a unit vector, "a" is the segment's length. The second segment is defined as Pb + B*u, 0 <= u <= b. Many of the terms needed by the algorithm are already computed for other purposes,so we just pass these terms into the function instead of complete specifications of each segment. "T" in the dot products is the vector betweeen Pa and Pb. Reference: "On fast computation of distance between line segments." Vladimir J. Lumelsky, in Information Processing Letters, no. 21, pages 55-61, 1985.
|
Returns whether the nearest point on rectangle edge Pb + B*u, 0 <= u <= b, to the rectangle edge, Pa + A*t, 0 <= t <= a, is within the half space determined by the point Pa and the direction Anorm.
A,B, and Anorm are unit vectors. T is the vector between Pa and Pb.
Definition at line 1081 of file rss.cpp.
Finds the parameters t & u corresponding to the two closest points on a pair of line segments. The first segment is defined as Pa + A*t, 0 <= t <= a, where "Pa" is one endpoint of the segment, "A" is a unit vector pointing to the other endpoint, and t is a scalar that produces all the points between the two endpoints. Since "A" is a unit vector, "a" is the segment's length. The second segment is defined as Pb + B*u, 0 <= u <= b. Many of the terms needed by the algorithm are already computed for other purposes,so we just pass these terms into the function instead of complete specifications of each segment. "T" in the dot products is the vector betweeen Pa and Pb. Reference: "On fast computation of distance between line segments." Vladimir J. Lumelsky, in Information Processing Letters, no. 21, pages 55-61, 1985.
Definition at line 1055 of file rss.cpp.