FCL  0.6.0
Flexible Collision Library
fcl::kIOS< S_ > Class Template Reference

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

#include <kIOS.h>

Public Types

using S = S_
 

Public Member Functions

bool overlap (const kIOS< S > &other) const
 Check collision between two kIOS.
 
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...
 
bool contain (const Vector3< S > &p) const
 Check whether the kIOS contains a point.
 
kIOS< S > & operator+= (const Vector3< S > &p)
 A simple way to merge the kIOS and a point.
 
kIOS< S > & operator+= (const kIOS< S > &other)
 Merge the kIOS and another kIOS.
 
kIOS< S > operator+ (const kIOS< S > &other) const
 Return the merged kIOS of current kIOS and the other one.
 
const Vector3< S > & center () const
 Center of the kIOS.
 
width () const
 Width of the kIOS.
 
height () const
 Height of the kIOS.
 
depth () const
 Depth of the kIOS.
 
volume () const
 Volume of the kIOS.
 
size () const
 size of the kIOS (used in BV_Splitter to order two kIOSs)
 
distance (const kIOS< S > &other, Vector3< S > *P=nullptr, Vector3< S > *Q=nullptr) const
 The distance between two kIOS.
 

Static Public Member Functions

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

Public Attributes

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

Detailed Description

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

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

Member Function Documentation

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.

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