Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
mirtk::SurfaceCollisions Class Reference

#include <SurfaceCollisions.h>

Inheritance diagram for mirtk::SurfaceCollisions:
Inheritance graph
Collaboration diagram for mirtk::SurfaceCollisions:
Collaboration graph

Classes

struct  CollisionInfo
 Structure storing information about detected collision. More...
 
struct  IntersectionInfo
 Structure storing information about detected self-intersection. More...
 

Public Types

enum  CollisionType {
  NoCollision, Collision, FrontfaceCollision, BackfaceCollision,
  Intersection, SelfIntersection, AdjacentIntersection, Ambiguous
}
 Type of self-collision. More...
 

Public Member Functions

const CollisionsSet & Collisions (int) const
 
bool FoundCollisions () const
 Whether at least one collision was found.
 
bool FoundIntersections () const
 Whether at least one intersection was found.
 
vtkDataArray * GetCenterArray () const
 Get cell data array storing center points of bounding spheres.
 
CollisionType GetCollisionType (int) const
 Get type of cell collision.
 
CollisionType GetCollisionType (vtkIdType) const
 Get type of cell collision.
 
vtkDataArray * GetCollisionTypeArray () const
 Get cell data array storing type of cell collision.
 
vtkDataArray * GetRadiusArray () const
 Get cell data array storing radii of bounding spheres.
 
const IntersectionsSet & Intersections (int) const
 
 mirtkOnOffMacro (AdjacentIntersectionTest)
 Enable/disable intersection test for adjacent triangles.
 
 mirtkOnOffMacro (NonAdjacentIntersectionTest)
 Enable/disable intersection test for non-adjacent triangles.
 
 mirtkOnOffMacro (FrontfaceCollisionTest)
 Enable/disable near miss collision test for front-facing triangles.
 
 mirtkOnOffMacro (BackfaceCollisionTest)
 Enable/disable near miss collision test for back-facing triangles.
 
 mirtkOnOffMacro (FastCollisionTest)
 Enable/disable fast, approximate collision test.
 
 mirtkOnOffMacro (StoreIntersectionDetails)
 Enable/disable storage of details about found intersections.
 
 mirtkOnOffMacro (StoreCollisionDetails)
 Enable/disable storage of details about found intersections.
 
 mirtkOnOffMacro (ResetCollisionType)
 Enable/disable resetting of optional input collision type array.
 
int NumberOfCollisions (int) const
 
int NumberOfIntersections (int) const
 
SurfaceCollisionsoperator= (const SurfaceCollisions &)
 Assignment operator.
 
 SurfaceCollisions ()
 Constructor.
 
 SurfaceCollisions (const SurfaceCollisions &)
 Copy constructor.
 
virtual ~SurfaceCollisions ()
 Destructor.
 
- Public Member Functions inherited from mirtk::MeshFilter
vtkPolyData * GetOutput ()
 Get output surface mesh.
 
 mirtkOnOffMacro (DoublePrecision)
 Enable/disable double precision output.
 
virtual void Run ()
 Run filter.
 
void SetInput (vtkPolyData *)
 Set input surface mesh.
 
void SetInputData (vtkPolyData *)
 Set input surface mesh.
 
void Update ()
 Run filter.
 
- Public Member Functions inherited from mirtk::Object
virtual const char * NameOfClass () const =0
 Get name of class, which this object is an instance of.
 
virtual ParameterList Parameter () const
 Get parameter name/value pairs.
 
bool Parameter (const ParameterList &)
 Set parameters from name/value pairs.
 
virtual bool Set (const char *name, const char *value)
 
virtual ~Object ()
 Destructor.
 

Static Public Member Functions

static bool IsCollision (CollisionType)
 Whether a given collision type indicates a near miss collision.
 
static bool IsIntersection (CollisionType)
 Whether a given collision type indicates a self-intersection.
 
- Static Public Member Functions inherited from mirtk::Object
static const char * NameOfType ()
 Get name of this class type.
 

Protected Member Functions

virtual void Execute ()
 Execute filter.
 
virtual void Initialize ()
 Initialize filter after input and parameters are set.
 
- Protected Member Functions inherited from mirtk::SurfaceFilter
SurfaceFilteroperator= (const SurfaceFilter &)
 Assignment operator.
 
 SurfaceFilter ()
 Default constructor.
 
 SurfaceFilter (const SurfaceFilter &)
 Copy constructor.
 
virtual ~SurfaceFilter ()
 Destructor.
 
- Protected Member Functions inherited from mirtk::MeshFilter
virtual void Finalize ()
 Finalize filter execution.
 
virtual void InitializeEdgeTable ()
 To be called by subclass in Initialize when _EdgeTable is needed.
 
 MeshFilter ()
 Default constructor.
 
 MeshFilter (const MeshFilter &)
 Copy constructor.
 
vtkSmartPointer< vtkDataArray > NewArray (const char *name, vtkIdType n, int c, int type=VTK_VOID) const
 
vtkSmartPointer< vtkDataArray > NewArray (const char *name, int c=1, int type=VTK_VOID) const
 
vtkSmartPointer< vtkDataArray > NewCellArray (const char *name, int c=1, int type=VTK_VOID) const
 
vtkSmartPointer< vtkDataArray > NewPointArray (const char *name, int c=1, int type=VTK_VOID) const
 
MeshFilteroperator= (const MeshFilter &)
 Assignment operator.
 
virtual ~MeshFilter ()
 Destructor.
 
- Protected Member Functions inherited from mirtk::Object
template<typename... Args>
void Throw (ErrorType err, const char *func, Args... args) const
 

Additional Inherited Members

- Static Protected Member Functions inherited from mirtk::Object
template<typename... Args>
static void ThrowStatic (ErrorType err, const char *cls, const char *func, Args... args)
 

Detailed Description

Auxiliary class used to find self-collisions of a triangulated surface mesh

Instances of this class detect different types of self-collisions such as in particular self-intersections between non-adjacent as well as adjacent triangular faces and a list of non-adjacent faces which are about to collide, i.e., very close to each other. They are used to impose either hard or soft non-self-intersection constraints on a deformable surface.

Definition at line 49 of file SurfaceCollisions.h.

Member Enumeration Documentation

§ CollisionType

Type of self-collision.

Enumerator
NoCollision 

No collision with another triangle within search range.

Collision 

Unknown or mixed collision types.

FrontfaceCollision 

Second triangle is within minimum distance towards the front of first triangle.

BackfaceCollision 

Second triangle is within minimum distance towards the back of first triangle.

Intersection 

Unknown or mixed intersection types.

SelfIntersection 

Non-adjacent triangles intersect each other.

AdjacentIntersection 

Adjacent triangles intersect each other.

Ambiguous 

Both collisions and self-intersections found.

Definition at line 58 of file SurfaceCollisions.h.

Member Function Documentation

§ Collisions()

const SurfaceCollisions::CollisionsSet & mirtk::SurfaceCollisions::Collisions ( int  cellId) const
inline

Set of collisions of other faces with the specified cell

Note
Use only when collision tests enabled.

Definition at line 379 of file SurfaceCollisions.h.

§ Intersections()

const SurfaceCollisions::IntersectionsSet & mirtk::SurfaceCollisions::Intersections ( int  cellId) const
inline

Set of intersections of other faces with the specified cell

Note
Use only when intersection tests enabled.

Definition at line 372 of file SurfaceCollisions.h.

§ NumberOfCollisions()

int mirtk::SurfaceCollisions::NumberOfCollisions ( int  cellId) const
inline

Number of collisions with specified cell

Note
Use only when both collision tests and storage of collision details are enabled.

Definition at line 391 of file SurfaceCollisions.h.

§ NumberOfIntersections()

int mirtk::SurfaceCollisions::NumberOfIntersections ( int  cellId) const
inline

Number of self-intersections with specified cell

Note
Use only when both intersection tests and storage of intersection details are enabled.

Definition at line 385 of file SurfaceCollisions.h.


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