Castor3D 0.16.0
Multiplatform 3D engine
Public Member Functions | List of all members
castor3d::Pattern< T > Class Template Reference

Pattern handler class. More...

#include <Pattern.hpp>

Public Member Functions

 Pattern ()=default
 Constructor.
 
Pattern< T > getReversed () const
 Builds the mirror pattern.
 
bool isClosed () const
 Tells if the pattern is closed (first element is also the last)
 
void addElement (TObjConstRef element, uint32_t index=0xFFFFFFFF)
 adds an element to the list, at a given index
 
uint32_t getSize () const
 
TObjRef operator[] (uint32_t index)
 Accessor to an element.
 
TObjConstRef operator[] (uint32_t index) const
 Constant accessor to an element.
 
TObjRef getElement (uint32_t index)
 Accessor to an element.
 
TObjConstRef getElement (uint32_t index) const
 Constant accessor to an element.
 

Detailed Description

template<typename T>
class castor3d::Pattern< T >

Pattern handler class.

Remarks
A pattern is a collection of consecutive points.

Constructor & Destructor Documentation

◆ Pattern()

template<typename T >
castor3d::Pattern< T >::Pattern ( )
default

Constructor.

Member Function Documentation

◆ addElement()

template<typename T >
void castor3d::Pattern< T >::addElement ( TObjConstRef element,
uint32_t index = 0xFFFFFFFF )
inline

adds an element to the list, at a given index

Parameters
[in]elementThe element to add
[in]indexThe index at which the insertion must be done

◆ getElement() [1/2]

template<typename T >
TObjRef castor3d::Pattern< T >::getElement ( uint32_t index)
inline

Accessor to an element.

Parameters
[in]indexthe index of the wanted element
Returns
Modifiable element

References CU_Require.

◆ getElement() [2/2]

template<typename T >
TObjConstRef castor3d::Pattern< T >::getElement ( uint32_t index) const
inline

Constant accessor to an element.

Parameters
[in]indexthe index of the wanted element
Returns
Constant element

References CU_Require.

◆ getReversed()

template<typename T >
Pattern< T > castor3d::Pattern< T >::getReversed ( ) const
inline

Builds the mirror pattern.

Returns
The built pattern

◆ getSize()

template<typename T >
uint32_t castor3d::Pattern< T >::getSize ( ) const
inline
Returns
The number of elements constituting the pattern

◆ isClosed()

template<typename T >
bool castor3d::Pattern< T >::isClosed ( ) const
inline

Tells if the pattern is closed (first element is also the last)

Returns
true if closed, false if not

◆ operator[]() [1/2]

template<typename T >
TObjRef castor3d::Pattern< T >::operator[] ( uint32_t index)
inline

Accessor to an element.

Parameters
[in]indexthe index of the wanted element
Returns
Modifiable element reference

References CU_Require.

◆ operator[]() [2/2]

template<typename T >
TObjConstRef castor3d::Pattern< T >::operator[] ( uint32_t index) const
inline

Constant accessor to an element.

Parameters
[in]indexthe index of the wanted element
Returns
Constant element reference

References CU_Require.


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