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

A class describing the kIOS collision structure, which is a set of spheres. More...

#include <kIOS.h>

Classes

struct  kIOS_Sphere
 One sphere in kIOS. More...
 

Public Types

using S = S_
 

Public Member Functions

const Vector3< S > & center () const
 Center of the kIOS. More...
 
bool contain (const Vector3< S > &p) const
 Check whether the kIOS contains a point. More...
 
S depth () const
 Depth of the kIOS. More...
 
S distance (const kIOS< S > &other, Vector3< S > *P=nullptr, Vector3< S > *Q=nullptr) const
 The distance between two kIOS. More...
 
S height () const
 Height of the kIOS. More...
 
kIOS< Soperator+ (const kIOS< S > &other) const
 Return the merged kIOS of current kIOS and the other one. More...
 
kIOS< S > & operator+= (const kIOS< S > &other)
 Merge the kIOS and another kIOS. More...
 
kIOS< S > & operator+= (const Vector3< S > &p)
 A simple way to merge the kIOS and a point. More...
 
bool overlap (const kIOS< S > &other) const
 Check collision between two kIOS. More...
 
bool overlap (const kIOS< S > &other, kIOS< S > &overlap_part) const
 Check collision between two kIOS and return the overlap part. For kIOS, we return nothing, as the overlappart of two kIOS usually is not an kIOS. More...
 
S size () const
 size of the kIOS (used in BV_Splitter to order two kIOSs) More...
 
S volume () const
 Volume of the kIOS. More...
 
S width () const
 Width of the kIOS. More...
 

Static Public Member Functions

static S cosA ()
 
static constexpr S invSinA ()
 
static constexpr S ratio ()
 

Public Attributes

unsigned int num_spheres
 The number of spheres, no larger than 5. More...
 
OBB< Sobb
 OBB related with kIOS. More...
 
kIOS_Sphere spheres [5]
 The (at most) five spheres for intersection. More...
 

Static Private Member Functions

static kIOS_Sphere encloseSphere (const kIOS_Sphere &s0, const kIOS_Sphere &s1)
 generate one sphere enclosing two spheres More...
 

Detailed Description

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

A class describing the kIOS collision structure, which is a set of spheres.

Definition at line 48 of file kIOS.h.

Member Typedef Documentation

◆ S

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

Definition at line 63 of file kIOS.h.

Member Function Documentation

◆ center()

template<typename S >
const Vector3< S > & fcl::kIOS< S >::center

Center of the kIOS.

Definition at line 166 of file kIOS-inl.h.

◆ contain()

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

Check whether the kIOS contains a point.

Definition at line 108 of file kIOS-inl.h.

◆ cosA()

template<typename S_ >
static S fcl::kIOS< S_ >::cosA ( )
inlinestatic

Definition at line 121 of file kIOS.h.

◆ depth()

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

Depth of the kIOS.

Definition at line 187 of file kIOS-inl.h.

◆ distance()

template<typename S >
S fcl::kIOS< S >::distance ( const kIOS< S > &  other,
Vector3< S > *  P = nullptr,
Vector3< S > *  Q = nullptr 
) const

The distance between two kIOS.

Definition at line 208 of file kIOS-inl.h.

◆ encloseSphere()

template<typename S_ >
kIOS< S >::kIOS_Sphere fcl::kIOS< S >::encloseSphere ( const kIOS_Sphere s0,
const kIOS_Sphere s1 
)
staticprivate

generate one sphere enclosing two spheres

The sphere with the larger radius encloses the other

spheres partially overlapping or disjoint

Definition at line 52 of file kIOS-inl.h.

◆ height()

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

Height of the kIOS.

Definition at line 180 of file kIOS-inl.h.

◆ invSinA()

template<typename S_ >
static constexpr S fcl::kIOS< S_ >::invSinA ( )
inlinestaticconstexpr

Definition at line 120 of file kIOS.h.

◆ operator+()

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

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

Definition at line 148 of file kIOS-inl.h.

◆ operator+=() [1/2]

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

Merge the kIOS and another kIOS.

Definition at line 140 of file kIOS-inl.h.

◆ operator+=() [2/2]

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

A simple way to merge the kIOS and a point.

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

◆ overlap() [1/2]

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

Check collision between two kIOS.

Definition at line 80 of file kIOS-inl.h.

◆ overlap() [2/2]

template<typename S >
bool fcl::kIOS< S >::overlap ( const kIOS< S > &  other,
kIOS< S > &  overlap_part 
) const

Check collision between two kIOS and return the overlap part. For kIOS, we return nothing, as the overlappart of two kIOS usually is not an kIOS.

Todo:
Not efficient. It first checks the sphere collisions and then use OBB for further culling.

Definition at line 100 of file kIOS-inl.h.

◆ ratio()

template<typename S_ >
static constexpr S fcl::kIOS< S_ >::ratio ( )
inlinestaticconstexpr

Definition at line 119 of file kIOS.h.

◆ size()

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

size of the kIOS (used in BV_Splitter to order two kIOSs)

Definition at line 201 of file kIOS-inl.h.

◆ volume()

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

Volume of the kIOS.

Definition at line 194 of file kIOS-inl.h.

◆ width()

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

Width of the kIOS.

Definition at line 173 of file kIOS-inl.h.

Member Data Documentation

◆ num_spheres

template<typename S_ >
unsigned int fcl::kIOS< S_ >::num_spheres

The number of spheres, no larger than 5.

Definition at line 69 of file kIOS.h.

◆ obb

template<typename S_ >
OBB<S> fcl::kIOS< S_ >::obb

OBB related with kIOS.

Definition at line 72 of file kIOS.h.

◆ spheres

template<typename S_ >
kIOS_Sphere fcl::kIOS< S_ >::spheres[5]

The (at most) five spheres for intersection.

Definition at line 66 of file kIOS.h.


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


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