MAGE  v0.171.0
Matthias Advanced Game Engine
mage::rendering::MeshDescriptor< VertexT, IndexT > Class Template Reference

#include <mesh_descriptor.hpp>

Public Member Functions

constexpr MeshDescriptor (bool invert_handedness=false, bool clockwise_order=true) noexcept
 
constexpr MeshDescriptor (const MeshDescriptor &desc) noexcept=default
 
constexpr MeshDescriptor (MeshDescriptor &&desc) noexcept=default
 
 ~MeshDescriptor ()=default
 
MeshDescriptoroperator= (const MeshDescriptor &desc) noexcept=default
 
MeshDescriptoroperator= (MeshDescriptor &&desc) noexcept=default
 
constexpr bool InvertHandness () const noexcept
 
constexpr bool ClockwiseOrder () const noexcept
 

Private Attributes

bool m_invert_handedness
 
bool m_clockwise_order
 

Detailed Description

template<typename VertexT, typename IndexT = U32>
class mage::rendering::MeshDescriptor< VertexT, IndexT >

A class of mesh descriptors.

Template Parameters
VertexTThe vertex type.
IndexTThe index type.

Constructor & Destructor Documentation

◆ MeshDescriptor() [1/3]

template<typename VertexT , typename IndexT = U32>
constexpr mage::rendering::MeshDescriptor< VertexT, IndexT >::MeshDescriptor ( bool  invert_handedness = false,
bool  clockwise_order = true 
)
explicitnoexcept

Constructs a mesh descriptor.

Parameters
[in]invert_handednessA flag indicating whether the mesh coordinate system handness should be inverted.
[in]clockwise_orderA flag indicating whether the face vertices should be defined in clockwise order or not (i.e. counterclockwise order).

◆ MeshDescriptor() [2/3]

template<typename VertexT , typename IndexT = U32>
constexpr mage::rendering::MeshDescriptor< VertexT, IndexT >::MeshDescriptor ( const MeshDescriptor< VertexT, IndexT > &  desc)
defaultnoexcept

Constructs a mesh descriptor from the given mesh descriptor.

Parameters
[in]descA reference to the mesh descriptor to copy.

◆ MeshDescriptor() [3/3]

template<typename VertexT , typename IndexT = U32>
constexpr mage::rendering::MeshDescriptor< VertexT, IndexT >::MeshDescriptor ( MeshDescriptor< VertexT, IndexT > &&  desc)
defaultnoexcept

Constructs a mesh descriptor by moving the given mesh descriptor.

Parameters
[in]descA reference to the mesh descriptor to move.

◆ ~MeshDescriptor()

template<typename VertexT , typename IndexT = U32>
mage::rendering::MeshDescriptor< VertexT, IndexT >::~MeshDescriptor ( )
default

Destructs this mesh descriptor.

Member Function Documentation

◆ ClockwiseOrder()

template<typename VertexT , typename IndexT = U32>
constexpr bool mage::rendering::MeshDescriptor< VertexT, IndexT >::ClockwiseOrder ( ) const
noexcept

Checks whether the face vertices should be defined in clockwise order or not (i.e. counterclockwise order) according to this mesh descriptor.

Returns
true if the face vertices should be defined in clockwise order. false otherwise.

◆ InvertHandness()

template<typename VertexT , typename IndexT = U32>
constexpr bool mage::rendering::MeshDescriptor< VertexT, IndexT >::InvertHandness ( ) const
noexcept

Checks whether the mesh coordinate system handness should be inverted or not according to this mesh descriptor.

Returns
true if the mesh coordinate system handness should be inverted. false otherwise.

◆ operator=() [1/2]

template<typename VertexT , typename IndexT = U32>
MeshDescriptor& mage::rendering::MeshDescriptor< VertexT, IndexT >::operator= ( const MeshDescriptor< VertexT, IndexT > &  desc)
defaultnoexcept

Copies the given mesh descriptor to this mesh descriptor.

Parameters
[in]descA reference to the mesh descriptor to copy.
Returns
A reference to the copy of the given mesh descriptor (i.e. this mesh descriptor).

◆ operator=() [2/2]

template<typename VertexT , typename IndexT = U32>
MeshDescriptor& mage::rendering::MeshDescriptor< VertexT, IndexT >::operator= ( MeshDescriptor< VertexT, IndexT > &&  desc)
defaultnoexcept

Moves the given mesh descriptor to this mesh descriptor.

Parameters
[in]descA reference to the mesh descriptor to move.
Returns
A reference to the moved mesh descriptor (i.e. this mesh descriptor).

Member Data Documentation

◆ m_clockwise_order

template<typename VertexT , typename IndexT = U32>
bool mage::rendering::MeshDescriptor< VertexT, IndexT >::m_clockwise_order
private

A flag indicating whether the face vertices should be defined in clockwise order or not (i.e. counterclockwise order) for this mesh descriptor.

◆ m_invert_handedness

template<typename VertexT , typename IndexT = U32>
bool mage::rendering::MeshDescriptor< VertexT, IndexT >::m_invert_handedness
private

A flag indicating whether the mesh coordinate system handness should be inverted or not for this mesh descriptor.