$search

collision_checking::RSS Class Reference

#include <rss.h>

List of all members.

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.
RSSoperator+= (const RSS &other)
 Merge the RSS and another RSS.
RSSoperator+= (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.

Detailed Description

Definition at line 46 of file rss.h.


Constructor & Destructor Documentation

collision_checking::RSS::RSS (  )  [inline]

Definition at line 61 of file rss.h.


Member Function Documentation

Vec3f collision_checking::RSS::center (  )  const [inline]

The RSS center.

Definition at line 121 of file rss.h.

void collision_checking::RSS::clipToRange ( BVH_REAL val,
BVH_REAL  a,
BVH_REAL  b 
) [static, protected]

Clip val between a and b.

Definition at line 1048 of file rss.cpp.

bool collision_checking::RSS::contain ( const Vec3f p  )  const [inline]

Check whether the RSS contains a point.

Definition at line 82 of file rss.cpp.

BVH_REAL collision_checking::RSS::depth (  )  const [inline]

Depth of the RSS.

Definition at line 103 of file rss.h.

BVH_REAL collision_checking::RSS::distance ( const RSS other  )  const

the distance between two RSS

Definition at line 293 of file rss.cpp.

BVH_REAL collision_checking::RSS::height (  )  const [inline]

Height of the RSS.

Definition at line 97 of file rss.h.

bool collision_checking::RSS::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 
) [static, protected]

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.

RSS collision_checking::RSS::operator+ ( const RSS other  )  const

Return the merged RSS of current RSS and the other one.

Definition at line 264 of file rss.cpp.

RSS& collision_checking::RSS::operator+= ( const RSS other  )  [inline]

Merge the RSS and another RSS.

Definition at line 81 of file rss.h.

RSS & collision_checking::RSS::operator+= ( const Vec3f p  ) 

A simple way to merge the RSS and a point, not compact.

Definition at line 129 of file rss.cpp.

bool collision_checking::RSS::overlap ( const RSS other,
RSS overlap_part 
) const [inline]

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.

Definition at line 69 of file rss.h.

bool collision_checking::RSS::overlap ( const RSS other  )  const

Check collision between two RSS.

Definition at line 42 of file rss.cpp.

BVH_REAL collision_checking::RSS::rectDistance ( const Vec3f  Rab[3],
Vec3f const &  Tab,
const BVH_REAL  a[2],
const BVH_REAL  b[2],
Vec3f P = NULL,
Vec3f Q = NULL 
) [static]

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

Definition at line 334 of file rss.cpp.

void collision_checking::RSS::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 
) [static, protected]

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.

BVH_REAL collision_checking::RSS::size (  )  const [inline]

Size of the RSS, for split order.

Definition at line 115 of file rss.h.

BVH_REAL collision_checking::RSS::volume (  )  const [inline]

Volume of the RSS.

Definition at line 109 of file rss.h.

BVH_REAL collision_checking::RSS::width (  )  const [inline]

Width of the RSS.

Definition at line 91 of file rss.h.


Member Data Documentation

Orientation of RSS.

Definition at line 50 of file rss.h.

side lengths of rectangle

Definition at line 56 of file rss.h.

radius of sphere summed with rectangle to form RSS

Definition at line 59 of file rss.h.

position of rectangle (origin of the rectangle)

Definition at line 53 of file rss.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends


collision_checking
Author(s): Jia Pan, Dinesh Manocha (UNC, Chapel Hill)
autogenerated on Fri Mar 1 14:57:01 2013