Symphony Of Empires
Eng3D::Mesh< V, T, C > Struct Template Reference

Packed model - packs both vertices and texcoords into the same buffer. More...

#include <mesh.hpp>

Public Types

using DataType = Eng3D::MeshData< V, T, C >
 

Public Member Functions

 Mesh (enum Eng3D::MeshMode _mode)
 
virtual ~Mesh ()=default
 
 Mesh (const Mesh &)=delete
 
 Mesh (Mesh &&) noexcept=default
 
Meshoperator= (const Mesh &)=delete
 
void draw (int instances=0) const
 
virtual void upload () const
 
template<typename I = glm::vec2>
void instancing (I &instances_buffer, int instances=0)
 Enables instances on this simple mesh. More...
 

Public Attributes

std::vector< DataTypebuffer
 
std::vector< unsigned int > indices
 
enum Eng3D::MeshMode mode
 

Detailed Description

template<typename V = glm::vec3, typename T = glm::vec2, typename C = void>
struct Eng3D::Mesh< V, T, C >

Packed model - packs both vertices and texcoords into the same buffer.

Definition at line 144 of file mesh.hpp.

Member Typedef Documentation

◆ DataType

template<typename V = glm::vec3, typename T = glm::vec2, typename C = void>
using Eng3D::Mesh< V, T, C >::DataType = Eng3D::MeshData<V, T, C>

Definition at line 145 of file mesh.hpp.

Constructor & Destructor Documentation

◆ Mesh() [1/3]

template<typename V = glm::vec3, typename T = glm::vec2, typename C = void>
Eng3D::Mesh< V, T, C >::Mesh ( enum Eng3D::MeshMode  _mode)
inline

Definition at line 147 of file mesh.hpp.

◆ ~Mesh()

template<typename V = glm::vec3, typename T = glm::vec2, typename C = void>
virtual Eng3D::Mesh< V, T, C >::~Mesh ( )
virtualdefault

◆ Mesh() [2/3]

template<typename V = glm::vec3, typename T = glm::vec2, typename C = void>
Eng3D::Mesh< V, T, C >::Mesh ( const Mesh< V, T, C > &  )
delete

◆ Mesh() [3/3]

template<typename V = glm::vec3, typename T = glm::vec2, typename C = void>
Eng3D::Mesh< V, T, C >::Mesh ( Mesh< V, T, C > &&  )
defaultnoexcept

Member Function Documentation

◆ draw()

template<typename V = glm::vec3, typename T = glm::vec2, typename C = void>
void Eng3D::Mesh< V, T, C >::draw ( int  instances = 0) const
inline

Definition at line 157 of file mesh.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ instancing()

template<typename V = glm::vec3, typename T = glm::vec2, typename C = void>
template<typename I = glm::vec2>
void Eng3D::Mesh< V, T, C >::instancing ( I &  instances_buffer,
int  instances = 0 
)
inline

Enables instances on this simple mesh.

Parameters
instances_bufferContigous buffer with instances data
instancesNumber of instances to configure for

Definition at line 171 of file mesh.hpp.

Here is the call graph for this function:

◆ operator=()

template<typename V = glm::vec3, typename T = glm::vec2, typename C = void>
Mesh& Eng3D::Mesh< V, T, C >::operator= ( const Mesh< V, T, C > &  )
delete

◆ upload()

template<typename V = glm::vec3, typename T = glm::vec2, typename C = void>
virtual void Eng3D::Mesh< V, T, C >::upload ( ) const
inlinevirtual

Definition at line 161 of file mesh.hpp.

Here is the call graph for this function:

Member Data Documentation

◆ buffer

template<typename V = glm::vec3, typename T = glm::vec2, typename C = void>
std::vector<DataType> Eng3D::Mesh< V, T, C >::buffer

Definition at line 175 of file mesh.hpp.

◆ indices

template<typename V = glm::vec3, typename T = glm::vec2, typename C = void>
std::vector<unsigned int> Eng3D::Mesh< V, T, C >::indices

Definition at line 176 of file mesh.hpp.

◆ mode

template<typename V = glm::vec3, typename T = glm::vec2, typename C = void>
enum Eng3D::MeshMode Eng3D::Mesh< V, T, C >::mode

Definition at line 176 of file mesh.hpp.


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