Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Friends | List of all members
fcl::Halfspace< S_ > Class Template Reference

Half Space: this is equivalent to the Planed in ODE. The separation plane is defined as n * x = d. Points in the negative side of the separation plane (i.e. {x | n * x < d}) are inside the half space and points in the positive side of the separation plane (i.e. {x | n * x > d}) are outside the half space. More...

#include <halfspace.h>

Inheritance diagram for fcl::Halfspace< S_ >:
Inheritance graph
[legend]

Public Types

using S = S_
 
- Public Types inherited from fcl::ShapeBase< S_ >
using S = S_
 

Public Member Functions

void computeLocalAABB () override
 Compute AABB. More...
 
S distance (const Vector3< S > &p) const
 
NODE_TYPE getNodeType () const override
 Get node type: a half space. More...
 
 Halfspace ()
 
 Halfspace (const Vector3< S > &n, S d)
 Construct a half space with normal direction and offset. More...
 
 Halfspace (S a, S b, S c, S d_)
 Construct a plane with normal direction and offset. More...
 
std::string representation (int precision=20) const
 Create a string that should be sufficient to recreate this shape. This is akin to the repr() implementation in python. More...
 
S signedDistance (const Vector3< S > &p) const
 
- Public Member Functions inherited from fcl::ShapeBase< S_ >
OBJECT_TYPE getObjectType () const
 Get object type: a geometric shape. More...
 
 ShapeBase ()
 
- Public Member Functions inherited from fcl::CollisionGeometry< S_ >
 CollisionGeometry ()
 
virtual Vector3< S_ > computeCOM () const
 compute center of mass More...
 
virtual Matrix3< S_ > computeMomentofInertia () const
 compute the inertia matrix, related to the origin More...
 
virtual Matrix3< S_ > computeMomentofInertiaRelatedToCOM () const
 compute the inertia matrix, related to the com More...
 
virtual S_ computeVolume () const
 compute the volume More...
 
virtual NODE_TYPE getNodeType () const
 get the node type More...
 
virtual OBJECT_TYPE getObjectType () const
 get the type of the object More...
 
void * getUserData () const
 get user data in geometry More...
 
bool isFree () const
 whether the object is completely free More...
 
bool isOccupied () const
 whether the object is completely occupied More...
 
bool isUncertain () const
 whether the object has some uncertainty More...
 
void setUserData (void *data)
 set user data in geometry More...
 
virtual ~CollisionGeometry ()
 

Public Attributes

S d
 Planed offset. More...
 
Vector3< Sn
 Planed normal. More...
 
- Public Attributes inherited from fcl::CollisionGeometry< S_ >
Vector3< S_ > aabb_center
 AABB center in local coordinate. More...
 
AABB< S_ > aabb_local
 AABB in local coordinate, used for tight AABB when only translation transform. More...
 
S_ aabb_radius
 AABB radius. More...
 
S_ cost_density
 collision cost for unit volume More...
 
S_ threshold_free
 threshold for free (<= is free) More...
 
S_ threshold_occupied
 threshold for occupied ( >= is occupied) More...
 
void * user_data
 pointer to user defined data specific to this object More...
 

Protected Member Functions

void unitNormalTest ()
 Turn non-unit normal into unit. More...
 

Friends

std::ostream & operator<< (std::ostream &out, const Halfspace &halfspace)
 

Detailed Description

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

Half Space: this is equivalent to the Planed in ODE. The separation plane is defined as n * x = d. Points in the negative side of the separation plane (i.e. {x | n * x < d}) are inside the half space and points in the positive side of the separation plane (i.e. {x | n * x > d}) are outside the half space.

Definition at line 60 of file geometry/shape/halfspace.h.

Member Typedef Documentation

◆ S

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

Definition at line 64 of file geometry/shape/halfspace.h.

Constructor & Destructor Documentation

◆ Halfspace() [1/3]

template<typename S >
fcl::Halfspace< S >::Halfspace ( const Vector3< S > &  n,
S  d 
)

Construct a half space with normal direction and offset.

Definition at line 60 of file geometry/shape/halfspace-inl.h.

◆ Halfspace() [2/3]

template<typename S >
fcl::Halfspace< S >::Halfspace ( S  a,
S  b,
S  c,
S  d_ 
)

Construct a plane with normal direction and offset.

Definition at line 68 of file geometry/shape/halfspace-inl.h.

◆ Halfspace() [3/3]

template<typename S >
fcl::Halfspace< S >::Halfspace

Definition at line 76 of file geometry/shape/halfspace-inl.h.

Member Function Documentation

◆ computeLocalAABB()

template<typename S >
void fcl::Halfspace< S >::computeLocalAABB
overridevirtual

Compute AABB.

Implements fcl::CollisionGeometry< S_ >.

Definition at line 97 of file geometry/shape/halfspace-inl.h.

◆ distance()

template<typename S >
S fcl::Halfspace< S >::distance ( const Vector3< S > &  p) const

Definition at line 90 of file geometry/shape/halfspace-inl.h.

◆ getNodeType()

template<typename S >
NODE_TYPE fcl::Halfspace< S >::getNodeType
override

Get node type: a half space.

Definition at line 132 of file geometry/shape/halfspace-inl.h.

◆ representation()

template<typename S >
std::string fcl::Halfspace< S >::representation ( int  precision = 20) const

Create a string that should be sufficient to recreate this shape. This is akin to the repr() implementation in python.

Parameters
precisionThe requested digits of precision for the numerical measures (same semantics as std::setprecision()).
Returns
The string representation of this instance.

Definition at line 139 of file geometry/shape/halfspace-inl.h.

◆ signedDistance()

template<typename S >
S fcl::Halfspace< S >::signedDistance ( const Vector3< S > &  p) const

Definition at line 83 of file geometry/shape/halfspace-inl.h.

◆ unitNormalTest()

template<typename S >
void fcl::Halfspace< S >::unitNormalTest
protected

Turn non-unit normal into unit.

Definition at line 150 of file geometry/shape/halfspace-inl.h.

Friends And Related Function Documentation

◆ operator<<

template<typename S_ >
std::ostream& operator<< ( std::ostream &  out,
const Halfspace< S_ > &  halfspace 
)
friend

Definition at line 98 of file geometry/shape/halfspace.h.

Member Data Documentation

◆ d

template<typename S_ >
S fcl::Halfspace< S_ >::d

Planed offset.

Definition at line 88 of file geometry/shape/halfspace.h.

◆ n

template<typename S_ >
Vector3<S> fcl::Halfspace< S_ >::n

Planed normal.

Definition at line 85 of file geometry/shape/halfspace.h.


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


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