VisuTwin Canvas
C++ 3D Engine — Metal Backend
Loading...
Searching...
No Matches
visutwin::canvas::Mesh Class Reference

GPU-resident geometry defined by vertex/index buffers and one or more Primitives. More...

#include <scene/mesh.h>

Inheritance diagram for visutwin::canvas::Mesh:
[legend]

Public Member Functions

const BoundingBoxaabb () const
int aabbVer () const
std::shared_ptr< IndexBuffergetIndexBuffer (const size_t style=0) const
Primitive getPrimitive (const size_t style=0) const
std::shared_ptr< VertexBuffergetVertexBuffer () const
void setAabb (const BoundingBox &bounds)
void setIndexBuffer (const std::shared_ptr< IndexBuffer > &ib, const size_t style=0)
void setPrimitive (const Primitive &p, const size_t style=0)
void setVertexBuffer (const std::shared_ptr< VertexBuffer > &vb)
Public Member Functions inherited from visutwin::canvas::RefCountedObject
void decRefCount ()
void incRefCount ()
int refCount () const

Detailed Description

GPU-resident geometry defined by vertex/index buffers and one or more Primitives.

A Mesh holds VertexBuffer and optional IndexBuffer data plus Primitive descriptors that control draw call parameters (type, base, count). Two APIs are available: a simple API (setPositions, setUvs, etc.) for convenience, and direct buffer manipulation for full control. Meshes are reference-counted and shared across MeshInstance objects.

Definition at line 78 of file mesh.h.

Member Function Documentation

◆ aabb()

const BoundingBox & visutwin::canvas::Mesh::aabb ( ) const
inline

Definition at line 83 of file mesh.h.

◆ aabbVer()

int visutwin::canvas::Mesh::aabbVer ( ) const
inline

Definition at line 81 of file mesh.h.

◆ getIndexBuffer()

std::shared_ptr< IndexBuffer > visutwin::canvas::Mesh::getIndexBuffer ( const size_t style = 0) const
inline

Definition at line 117 of file mesh.h.

◆ getPrimitive()

Primitive visutwin::canvas::Mesh::getPrimitive ( const size_t style = 0) const
inline

Definition at line 122 of file mesh.h.

◆ getVertexBuffer()

std::shared_ptr< VertexBuffer > visutwin::canvas::Mesh::getVertexBuffer ( ) const
inline

Definition at line 115 of file mesh.h.

Referenced by visutwin::canvas::shouldRenderShadowMeshInstance().

◆ setAabb()

void visutwin::canvas::Mesh::setAabb ( const BoundingBox & bounds)
inline

Definition at line 85 of file mesh.h.

◆ setIndexBuffer()

void visutwin::canvas::Mesh::setIndexBuffer ( const std::shared_ptr< IndexBuffer > & ib,
const size_t style = 0 )
inline

Definition at line 97 of file mesh.h.

◆ setPrimitive()

void visutwin::canvas::Mesh::setPrimitive ( const Primitive & p,
const size_t style = 0 )
inline

Definition at line 106 of file mesh.h.

◆ setVertexBuffer()

void visutwin::canvas::Mesh::setVertexBuffer ( const std::shared_ptr< VertexBuffer > & vb)
inline

Definition at line 91 of file mesh.h.


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