Visual Computing Library
Loading...
Searching...
No Matches
vcl::MeshRenderVectors< Mesh > Class Template Reference
Inheritance diagram for vcl::MeshRenderVectors< Mesh >:

Public Member Functions

 MeshRenderVectors (const MeshType &mesh, MRI::BuffersBitSet buffersToFill=MRI::BUFFERS_ALL)
 
void swap (MeshRenderVectors &other)
 
uint vertexNumber () const
 
uint triangleNumber () const
 
uint edgeNumber () const
 
uint wireframeEdgeNumber () const
 
uint textureNumber () const
 
vcl::Point2i textureSize (uint ti) const
 
const floatvertexBufferData () const
 
uint vertexBufferSize () const
 
const uint32_ttriangleBufferData () const
 
uint triangleBufferSize () const
 
const uint32_tedgeBufferData () const
 
uint edgeBufferSize () const
 
const uint32_twireframeBufferData () const
 
uint wireframeBufferSize () const
 
const floatvertexNormalBufferData () const
 
const uint32_tvertexColorBufferData () const
 
const floattriangleNormalBufferData () const
 
const uint32_ttriangleColorBufferData () const
 
const floatvertexTexCoordsBufferData () const
 
const uint32_tvertexTextureIDsBufferData () const
 
const floatwedgeTexCoordsBufferData () const
 
const uint32_twedgeTextureIDsBufferData () const
 
const floatedgeNormalBufferData () const
 
const uint32_tedgeColorBufferData () const
 
const floatmeshColorBufferData () const
 
const unsigned chartextureBufferData (uint ti) const
 
- Public Member Functions inherited from vcl::MeshRenderData< MeshRenderVectors< Mesh > >
void update (const MeshConcept auto &mesh, MRI::BuffersBitSet buffersToUpdate=MRI::BUFFERS_ALL)
 Update the buffers used to render the mesh.
 

Private Types

using MeshType = Mesh
 
using Base = MeshRenderData< MeshRenderVectors< MeshType > >
 
using MRI = MeshRenderInfo
 

Private Member Functions

void setVertexCoordsBuffer (const MeshType &mesh)
 
void setVertexNormalsBuffer (const MeshType &mesh)
 
void setVertexColorsBuffer (const MeshType &mesh)
 
void setVertexTexCoordsBuffer (const MeshType &mesh)
 
void setWedgeTexCoordsBuffer (const MeshType &mesh)
 
void setTriangleIndicesBuffer (const MeshType &mesh)
 
void setTriangleNormalsBuffer (const MeshType &mesh)
 
void setTriangleColorsBuffer (const MeshType &mesh)
 
void setVertexTextureIndicesBuffer (const MeshType &mesh)
 
void setWedgeTextureIndicesBuffer (const MeshType &mesh)
 
void setEdgeIndicesBuffer (const MeshType &mesh)
 
void setEdgeNormalsBuffer (const MeshType &mesh)
 
void setEdgeColorsBuffer (const MeshType &mesh)
 
void setWireframeIndicesBuffer (const MeshType &mesh)
 
void setTextureUnits (const MeshType &mesh)
 
void setMeshUniforms (const MeshType &m)
 

Private Attributes

friend Base
 
std::vector< floatmVerts
 
std::vector< floatmVNormals
 
std::vector< uint32_tmVColors
 
std::vector< floatmVTexCoords
 
std::vector< floatmWTexCoords
 
std::vector< uint32_tmTris
 
std::vector< floatmTNormals
 
std::vector< uint32_tmTColors
 
std::vector< uint32_tmVTexIds
 
std::vector< uint32_tmWTexIds
 
std::vector< uint32_tmEdges
 
std::vector< floatmENormals
 
std::vector< uint32_tmEColors
 
std::vector< uint32_tmWireframe
 
std::vector< vcl::ImagemTextures
 
std::array< float, 4 > mMeshColor = {0.5, 0.5, 0.5, 1}
 

Additional Inherited Members

- Protected Member Functions inherited from vcl::MeshRenderData< MeshRenderVectors< Mesh > >
 MeshRenderData (MRI::BuffersBitSet buffersToFill)
 
void swap (MeshRenderData &other)
 
uint numVerts () const
 Returns the number of vertices that will be used to render the mesh.
 
uint numTris () const
 Returns the number of triangles that will be used to render the mesh.
 
uint numEdges () const
 Returns the number of edges that will be used to render the mesh.
 
uint numWireframeLines () const
 Returns the number of wireframe lines that will be used to render the mesh.
 
void fillVertexCoords (const MeshConcept auto &mesh, auto *buffer)
 Given the mesh and a pointer to a buffer, fills the buffer with the vertex coordinates of the mesh.
 
void fillVertexNormals (const MeshConcept auto &mesh, auto *buffer)
 Given the mesh and a pointer to a buffer, fills the buffer with the vertex normals of the mesh.
 
void fillVertexColors (const MeshConcept auto &mesh, auto *buffer, Color::Format fmt)
 Given the mesh and a pointer to a buffer, fills the buffer with the vertex colors of the mesh (each color is packed in a single uint).
 
void fillVertexTexCoords (const MeshConcept auto &mesh, auto *buffer)
 Given the mesh and a pointer to a buffer, fills the buffer with the vertex texcoords of the mesh.
 
void fillWedgeTexCoords (const FaceMeshConcept auto &mesh, auto *buffer)
 Given the mesh and a pointer to a buffer, fills the buffer with the wedge texcoors of the mesh.
 
void fillTriangleIndices (const FaceMeshConcept auto &mesh, auto *buffer)
 Given the mesh and a pointer to a buffer, fills the buffer with the triangle indices of the mesh.
 
void fillTriangleNormals (const FaceMeshConcept auto &mesh, auto *buffer)
 Given the mesh and a pointer to a buffer, fills the buffer with the triangle normals of the mesh.
 
void fillTriangleColors (const FaceMeshConcept auto &mesh, auto *buffer, Color::Format fmt)
 Given the mesh and a pointer to a buffer, fills the buffer with the triangle colors of the mesh (each color is packed in a single uint).
 
void fillVertexTextureIndices (const FaceMeshConcept auto &mesh, auto *buffer)
 Given the mesh and a pointer to a buffer, fills the buffer with the vertex texture indices of the mesh.
 
void fillWedgeTextureIndices (const FaceMeshConcept auto &mesh, auto *buffer)
 Given the mesh and a pointer to a buffer, fills the buffer with the wedge texture indices of the mesh.
 
void fillEdgeIndices (const EdgeMeshConcept auto &mesh, auto *buffer)
 Given the mesh and a pointer to a buffer, fills the buffer with the edge indices of the mesh.
 
void fillEdgeNormals (const EdgeMeshConcept auto &mesh, auto *buffer)
 Given the mesh and a pointer to a buffer, fills the buffer with the edge normals of the mesh.
 
void fillEdgeColors (const EdgeMeshConcept auto &mesh, auto *buffer, Color::Format fmt)
 Given the mesh and a pointer to a buffer, fills the buffer with the edge colors of the mesh (each color is packed in a single uint).
 
void fillWireframeIndices (const FaceMeshConcept auto &mesh, auto *buffer)
 Given the mesh and a pointer to a buffer, fills the buffer with the wireframe indices of the mesh.
 
void setVertexCoordsBuffer (const MeshConcept auto &)
 Function that sets the content of vertex coordinates buffer and sends the data to the GPU.
 
void setVertexNormalsBuffer (const MeshConcept auto &)
 Function that sets the content of vertex normals buffer and sends the data to the GPU.
 
void setVertexColorsBuffer (const MeshConcept auto &)
 Function that sets the content of vertex colors buffer and sends the data to the GPU.
 
void setVertexTexCoordsBuffer (const MeshConcept auto &)
 Function that sets the content of vertex texture coordinates buffer and sends the data to the GPU.
 
void setWedgeTexCoordsBuffer (const MeshConcept auto &)
 Function that sets the content of wedge texture coordinates buffer and sends the data to the GPU.
 
void setTriangleIndicesBuffer (const FaceMeshConcept auto &)
 Function that sets the content of triangle indices buffer and sends the data to the GPU.
 
void setTriangleNormalsBuffer (const FaceMeshConcept auto &)
 Function that sets the content of triangle normals buffer and sends the data to the GPU.
 
void setTriangleColorsBuffer (const FaceMeshConcept auto &)
 Function that sets the content of triangle colors buffer and sends the data to the GPU.
 
void setVertexTextureIndicesBuffer (const FaceMeshConcept auto &)
 Function that sets the content of vertex texture indices buffer and sends the data to the GPU.
 
void setWedgeTextureIndicesBuffer (const FaceMeshConcept auto &)
 Function that sets the content of wedge texture indices buffer and sends the data to the GPU.
 
void setWireframeIndicesBuffer (const FaceMeshConcept auto &)
 Function that sets the content of wireframe indices buffer and sends the data to the GPU.
 
void setEdgeIndicesBuffer (const EdgeMeshConcept auto &)
 Function that sets the content of edge indices buffer and sends the data to the GPU.
 
void setEdgeNormalsBuffer (const EdgeMeshConcept auto &)
 Function that sets the content of edge normals buffer and sends the data to the GPU.
 
void setEdgeColorsBuffer (const EdgeMeshConcept auto &)
 Function that sets the content of edge colors buffer and sends the data to the GPU.
 
void setTextureUnits (const MeshConcept auto &)
 Function that sets the texture units from the mesh and sends the data to the GPU.
 
void setMeshUniforms (const MeshConcept auto &)
 Function that sets the mesh uniforms from the mesh.
 

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