Public Types | Public Member Functions | Public Attributes | Private Member Functions | List of all members
fcl::RSS< S_ > Class Template Reference

A class for rectangle swept sphere bounding volume. More...

#include <RSS.h>

Public Types

using S = S_
 

Public Member Functions

const Vector3< Scenter () const
 The RSS center C, measured and expressed in frame F: p_FoC_F. More...
 
bool contain (const Vector3< S > &p) const
 Check whether the RSS contains a point. More...
 
S depth () const
 Depth of the RSS. More...
 
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 More...
 
S height () const
 Height of the RSS. More...
 
RSS< Soperator+ (const RSS< S > &other) const
 Return the merged RSS of current RSS and the other one. More...
 
RSS< S > & operator+= (const RSS< S > &other)
 Merge the RSS and another RSS. More...
 
RSS< S > & operator+= (const Vector3< S > &p)
 A simple way to merge the RSS and a point, not compact. More...
 
bool overlap (const RSS< S > &other) const
 Check collision between two RSS. More...
 
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. More...
 
 RSS ()
 Constructor. More...
 
void setToFromCenter (const Vector3< S > &p_FoCenter_F)
 Set To of the RSS from the center coordinates in frame F. More...
 
S size () const
 Size of the RSS (used in BV_Splitter to order two RSSs) More...
 
S volume () const
 Volume of the RSS. More...
 
S width () const
 Width of the RSS. More...
 

Public Attributes

Matrix3< Saxis
 Frame T's orientation in frame F. More...
 
S l [2]
 Side lengths of rectangle in frame T. More...
 
S r
 Radius of sphere summed with rectangle to form RSS. More...
 
Vector3< STo
 Origin of frame T in frame F. More...
 

Private Member Functions

Vector3< S > & p_FoTo_F ()
 
const Vector3< S > & p_FoTo_F () const
 
Matrix3< S > & R_FT ()
 
const Matrix3< S > & R_FT () const
 

Detailed Description

template<typename S_>
class fcl::RSS< S_ >

A class for rectangle swept sphere bounding volume.

RSS defines a rectangle swept sphere. The rectangle is defined in the frame T. It has one corner positioned at the origin of frame T. It lies on T's z = 0 plane. Its longest dimension extends in the +x direction, and its shorter dimension in the +y direction.

The RSS is then posed in another frame F. R_FT (the axis field) is the relative orientation between frame T and F and p_FoTo_F (the To field) is the position of T's origin in frame F.

Definition at line 58 of file RSS.h.

Member Typedef Documentation

◆ S

template<typename S_ >
using fcl::RSS< S_ >::S = S_

Definition at line 62 of file RSS.h.

Constructor & Destructor Documentation

◆ RSS()

template<typename S >
fcl::RSS< S >::RSS

Constructor.

Definition at line 101 of file RSS-inl.h.

Member Function Documentation

◆ center()

template<typename S >
const Vector3< S > fcl::RSS< S >::center

The RSS center C, measured and expressed in frame F: p_FoC_F.

Definition at line 416 of file RSS-inl.h.

◆ contain()

template<typename S >
bool fcl::RSS< S >::contain ( const Vector3< S > &  p) const

Check whether the RSS contains a point.

projection is within the rectangle

Definition at line 130 of file RSS-inl.h.

◆ depth()

template<typename S >
S fcl::RSS< S >::depth

Depth of the RSS.

Definition at line 395 of file RSS-inl.h.

◆ distance()

template<typename S >
S fcl::RSS< 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

Definition at line 433 of file RSS-inl.h.

◆ height()

template<typename S >
S fcl::RSS< S >::height

Height of the RSS.

Definition at line 388 of file RSS-inl.h.

◆ operator+()

template<typename S >
RSS< S > fcl::RSS< S >::operator+ ( const RSS< S > &  other) const

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

Definition at line 313 of file RSS-inl.h.

◆ operator+=() [1/2]

template<typename S >
RSS< S > & fcl::RSS< S >::operator+= ( const RSS< S > &  other)

Merge the RSS and another RSS.

Definition at line 305 of file RSS-inl.h.

◆ operator+=() [2/2]

template<typename S >
RSS< S > & fcl::RSS< S >::operator+= ( const Vector3< S > &  p)

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

Todo:
This function may have some bug.

Definition at line 167 of file RSS-inl.h.

◆ overlap() [1/2]

template<typename S >
bool fcl::RSS< S >::overlap ( const RSS< S > &  other) const

Check collision between two RSS.

Definition at line 109 of file RSS-inl.h.

◆ overlap() [2/2]

template<typename S >
bool fcl::RSS< S >::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.

Definition at line 122 of file RSS-inl.h.

◆ p_FoTo_F() [1/2]

template<typename S_ >
Vector3<S>& fcl::RSS< S_ >::p_FoTo_F ( )
inlineprivate

Definition at line 145 of file RSS.h.

◆ p_FoTo_F() [2/2]

template<typename S_ >
const Vector3<S>& fcl::RSS< S_ >::p_FoTo_F ( ) const
inlineprivate

Definition at line 148 of file RSS.h.

◆ R_FT() [1/2]

template<typename S_ >
Matrix3<S>& fcl::RSS< S_ >::R_FT ( )
inlineprivate

Definition at line 139 of file RSS.h.

◆ R_FT() [2/2]

template<typename S_ >
const Matrix3<S>& fcl::RSS< S_ >::R_FT ( ) const
inlineprivate

Definition at line 142 of file RSS.h.

◆ setToFromCenter()

template<typename S >
void fcl::RSS< S >::setToFromCenter ( const Vector3< S > &  p_FoCenter_F)

Set To of the RSS from the center coordinates in frame F.

Note: only works correctly if axis and l[] are set.

Definition at line 424 of file RSS-inl.h.

◆ size()

template<typename S >
S fcl::RSS< S >::size

Size of the RSS (used in BV_Splitter to order two RSSs)

Definition at line 409 of file RSS-inl.h.

◆ volume()

template<typename S >
S fcl::RSS< S >::volume

Volume of the RSS.

Definition at line 402 of file RSS-inl.h.

◆ width()

template<typename S >
S fcl::RSS< S >::width

Width of the RSS.

Definition at line 381 of file RSS-inl.h.

Member Data Documentation

◆ axis

template<typename S_ >
Matrix3<S> fcl::RSS< S_ >::axis

Frame T's orientation in frame F.

The axes of the rotation matrix are the principle directions of the rectangle. The first column corresponds to a unit vector along the longest edge and the second column the shortest edge. The third column is the rectangle's unit normal vector.

Definition at line 70 of file RSS.h.

◆ l

template<typename S_ >
S fcl::RSS< S_ >::l[2]

Side lengths of rectangle in frame T.

Definition at line 79 of file RSS.h.

◆ r

template<typename S_ >
S fcl::RSS< S_ >::r

Radius of sphere summed with rectangle to form RSS.

Definition at line 82 of file RSS.h.

◆ To

template<typename S_ >
Vector3<S> fcl::RSS< S_ >::To

Origin of frame T in frame F.

Note this is the translation in frame F to the origin of frame T. The rectangle's minimum corner in frame T is at the origin of frame T.

Definition at line 76 of file RSS.h.


The documentation for this class was generated from the following files:


fcl
Author(s):
autogenerated on Tue Dec 5 2023 03:40:50