NAP
Public Types | Public Attributes | List of all members
MeshProperties< VERTEX_ATTRIBUTE_PTR > Struct Template Reference

#include <mesh.h>

Public Types

using VertexAttributeList = std::vector< VERTEX_ATTRIBUTE_PTR >
 

Public Attributes

int mNumVertices = 0
 Property: 'NumVertices' number of mesh vertices. More...
 
EMemoryUsage mUsage = EMemoryUsage::Static
 Property: 'Usage' GPU memory usage. More...
 
EDrawMode mDrawMode = EDrawMode::Triangles
 Property: 'DrawMode' The draw mode that should be used to draw the shapes. More...
 
ECullMode mCullMode = ECullMode::Back
 Property: 'CullMode' The triangle cull mode to use. More...
 
EPolygonMode mPolygonMode = EPolygonMode::Fill
 Property: 'PolygonMode' The polygon mode to use, fill is always available and should be the default. More...
 
VertexAttributeList mAttributes
 Property: 'Attributes' vertex attributes. More...
 
std::vector< MeshShapemShapes
 Property: 'Shapes' list of managed shapes. More...
 

Description

template<typename VERTEX_ATTRIBUTE_PTR>
struct nap::MeshProperties< VERTEX_ATTRIBUTE_PTR >

Helper struct for data that is common between MeshInstance and Mesh. Templatized as the ownership for vertex attributes is different between a MeshInstance and a Mesh:

The difference in ownership is important as json-based data is owned by the resourceManager, whereas mesh data does not always originate from a json-based source, as is the case for procedural meshes and binary-based loading of meshes.

Member Typedef Documentation

◆ VertexAttributeList

using VertexAttributeList = std::vector<VERTEX_ATTRIBUTE_PTR>

Member Data Documentation

◆ mAttributes

VertexAttributeList mAttributes

Property: 'Attributes' vertex attributes.

◆ mCullMode

Property: 'CullMode' The triangle cull mode to use.

◆ mDrawMode

Property: 'DrawMode' The draw mode that should be used to draw the shapes.

◆ mNumVertices

int mNumVertices = 0

Property: 'NumVertices' number of mesh vertices.

◆ mPolygonMode

Property: 'PolygonMode' The polygon mode to use, fill is always available and should be the default.

◆ mShapes

std::vector<MeshShape> mShapes

Property: 'Shapes' list of managed shapes.

◆ mUsage

Property: 'Usage' GPU memory usage.