coal  3.0.1
Coal, The Collision Detection Library. Previously known as HPP-FCL, fork of FCL -- The Flexible Collision Library
coal::TriangleTpl< _IndexType > Class Template Reference

Triangle with 3 indices for points. More...

#include <coal/data_types.h>

Public Types

typedef _IndexType index_type
 
typedef _IndexType IndexType
 
typedef int size_type
 

Public Member Functions

 TriangleTpl ()
 Default constructor. More...
 
 TriangleTpl (const TriangleTpl &other)
 Copy constructor. More...
 
 TriangleTpl (IndexType p1, IndexType p2, IndexType p3)
 Create a triangle with given vertex indices. More...
 
template<typename OtherIndexType >
 TriangleTpl (const TriangleTpl< OtherIndexType > &other)
 Copy constructor from another vertex index type. More...
 
TriangleTploperator= (const TriangleTpl &other)
 Copy operator. More...
 
template<typename OtherIndexType >
TriangleTploperator= (const TriangleTpl< OtherIndexType > &other)
 Copy operator from another index type. More...
 
template<typename OtherIndexType >
TriangleTpl< OtherIndexType > cast () const
 
void set (IndexType p1, IndexType p2, IndexType p3)
 Set the vertex indices of the triangle. More...
 
IndexType operator[] (IndexType i) const
 Access the triangle index. More...
 
IndexTypeoperator[] (IndexType i)
 
bool operator== (const TriangleTpl &other) const
 
bool operator!= (const TriangleTpl &other) const
 
bool isValid () const
 

Static Public Member Functions

static size_type size ()
 

Protected Attributes

IndexType vids [3]
 indices for each vertex of triangle More...
 

Friends

template<typename OtherIndexType >
class TriangleTpl
 

Detailed Description

template<typename _IndexType>
class coal::TriangleTpl< _IndexType >

Triangle with 3 indices for points.

Member Typedef Documentation

◆ index_type

template<typename _IndexType >
typedef _IndexType coal::TriangleTpl< _IndexType >::index_type

◆ IndexType

template<typename _IndexType >
typedef _IndexType coal::TriangleTpl< _IndexType >::IndexType

◆ size_type

template<typename _IndexType >
typedef int coal::TriangleTpl< _IndexType >::size_type

Constructor & Destructor Documentation

◆ TriangleTpl() [1/4]

template<typename _IndexType >
coal::TriangleTpl< _IndexType >::TriangleTpl ( )
inline

Default constructor.

◆ TriangleTpl() [2/4]

template<typename _IndexType >
coal::TriangleTpl< _IndexType >::TriangleTpl ( const TriangleTpl< _IndexType > &  other)
inline

Copy constructor.

◆ TriangleTpl() [3/4]

template<typename _IndexType >
coal::TriangleTpl< _IndexType >::TriangleTpl ( IndexType  p1,
IndexType  p2,
IndexType  p3 
)
inline

Create a triangle with given vertex indices.

◆ TriangleTpl() [4/4]

template<typename _IndexType >
template<typename OtherIndexType >
coal::TriangleTpl< _IndexType >::TriangleTpl ( const TriangleTpl< OtherIndexType > &  other)
inline

Copy constructor from another vertex index type.

Member Function Documentation

◆ cast()

template<typename _IndexType >
template<typename OtherIndexType >
TriangleTpl<OtherIndexType> coal::TriangleTpl< _IndexType >::cast ( ) const
inline

◆ isValid()

template<typename _IndexType >
bool coal::TriangleTpl< _IndexType >::isValid ( ) const
inline

◆ operator!=()

template<typename _IndexType >
bool coal::TriangleTpl< _IndexType >::operator!= ( const TriangleTpl< _IndexType > &  other) const
inline

◆ operator=() [1/2]

template<typename _IndexType >
TriangleTpl& coal::TriangleTpl< _IndexType >::operator= ( const TriangleTpl< _IndexType > &  other)
inline

Copy operator.

◆ operator=() [2/2]

template<typename _IndexType >
template<typename OtherIndexType >
TriangleTpl& coal::TriangleTpl< _IndexType >::operator= ( const TriangleTpl< OtherIndexType > &  other)
inline

Copy operator from another index type.

◆ operator==()

template<typename _IndexType >
bool coal::TriangleTpl< _IndexType >::operator== ( const TriangleTpl< _IndexType > &  other) const
inline

◆ operator[]() [1/2]

template<typename _IndexType >
IndexType& coal::TriangleTpl< _IndexType >::operator[] ( IndexType  i)
inline

◆ operator[]() [2/2]

template<typename _IndexType >
IndexType coal::TriangleTpl< _IndexType >::operator[] ( IndexType  i) const
inline

Access the triangle index.

◆ set()

template<typename _IndexType >
void coal::TriangleTpl< _IndexType >::set ( IndexType  p1,
IndexType  p2,
IndexType  p3 
)
inline

Set the vertex indices of the triangle.

◆ size()

template<typename _IndexType >
static size_type coal::TriangleTpl< _IndexType >::size ( )
inlinestatic

Friends And Related Function Documentation

◆ TriangleTpl

template<typename _IndexType >
template<typename OtherIndexType >
friend class TriangleTpl
friend

Member Data Documentation

◆ vids

template<typename _IndexType >
IndexType coal::TriangleTpl< _IndexType >::vids[3]
protected
Initial value:
= {(std::numeric_limits<IndexType>::max)(),
(std::numeric_limits<IndexType>::max)(),
(std::numeric_limits<IndexType>::max)()}

indices for each vertex of triangle


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