Poly< T > Class Template Reference

#include <simplemesh.h>

Detailed Description

template<typename T>
class maxon::Poly< T >

Template class for simple triangles/quadrangles. The class stores 4 indices. In case of a quadrangle the third and fourth are identical.

Public Member Functions

 Poly ()
 
 Poly (ENUM_DONT_INITIALIZE)
 
 Poly (const T &av, const T &bv, const T &cv)
 
 Poly (const T &av, const T &bv, const T &cv, const T &dv)
 
 Poly (const Poly &src)
 
 MAXON_OPERATOR_COPY_ASSIGNMENT (Poly)
 
T & operator[] (Int index)
 
const T & operator[] (Int index) const
 
Bool IsTriangle () const
 
Int FindCornerIndex (const T &value) const
 
Int FindEdge (const T &value1, const T &value2) const
 
void GetEdgeValues (Int edge, T &av, T &bv) const
 
Int GetMemorySize () const
 
 MAXON_OPERATOR_EQUALITY_HASHCODE (Poly, a, b, c, d)
 
String ToString (const FormatStatement *formatStatement=nullptr) const
 

Static Public Member Functions

static Result< void > DescribeIO (const DataSerializeInterface &stream)
 

Public Attributes

a
 
b
 
c
 
d
 

Constructor & Destructor Documentation

◆ Poly() [1/5]

Poly ( )

◆ Poly() [2/5]

Poly ( ENUM_DONT_INITIALIZE  )
explicit

◆ Poly() [3/5]

Poly ( const T &  av,
const T &  bv,
const T &  cv 
)

◆ Poly() [4/5]

Poly ( const T &  av,
const T &  bv,
const T &  cv,
const T &  dv 
)

◆ Poly() [5/5]

Poly ( const Poly< T > &  src)

Member Function Documentation

◆ MAXON_OPERATOR_COPY_ASSIGNMENT()

MAXON_OPERATOR_COPY_ASSIGNMENT ( Poly< T >  )

◆ operator[]() [1/2]

T& operator[] ( Int  index)

◆ operator[]() [2/2]

const T& operator[] ( Int  index) const

◆ IsTriangle()

Bool IsTriangle ( void  ) const

◆ FindCornerIndex()

Int FindCornerIndex ( const T &  value) const

◆ FindEdge()

Int FindEdge ( const T &  value1,
const T &  value2 
) const

◆ GetEdgeValues()

void GetEdgeValues ( Int  edge,
T &  av,
T &  bv 
) const

◆ GetMemorySize()

Int GetMemorySize ( void  ) const

◆ MAXON_OPERATOR_EQUALITY_HASHCODE()

MAXON_OPERATOR_EQUALITY_HASHCODE ( Poly< T >  ,
a  ,
b  ,
c  ,
d   
)

◆ ToString()

String ToString ( const FormatStatement formatStatement = nullptr) const

◆ DescribeIO()

static Result<void> DescribeIO ( const DataSerializeInterface stream)
static

Describe all elements of this class for I/O operations.

Parameters
[in]streamThe stream that is used to register the class members.
Returns
OK on success.

Member Data Documentation

◆ a

T a

◆ b

T b

◆ c

T c

◆ d

T d