rigComponent 0.1.1
RigKit pack API - rigComponent
Loading...
Searching...
No Matches
rigkit::ecs::CMesh Struct Reference

Mesh as plain data: shared verts + optional n-gon faces. More...

#include <rigComponent/src/CMesh.h>

Public Attributes

std::vector< uint32_t > loops
 Concatenated n-gon vertex indices. Empty = faces are implicit triangles.
std::vector< uint32_t > loopSizes
 Vertex count per face; sum equals loops.size().
std::vector< glm::vec4 > faceColors
 One color per authored face. Ignored for line modes.
std::vector< uint8_t > facePalette
 Palette index per authored face (into CPalette). Empty => use faceColors / style.
std::vector< glm::vec2 > texcoords
 Per-vertex UVs; empty or size == positions.size().
uint32_t revision = 0
 Bump after in-place buffer edits so the GPU slot re-uploads.
int propVertexCount = 0
 Inspector mirrors for vector sizes (refreshed in GetProperties).

Detailed Description

Mesh as plain data: shared verts + optional n-gon faces.

Speaks rig.geometry.mesh. loops / loopSizes are the authored faces (a cube is 6 quads, not 12 triangles). Edges are consecutive pairs in each loop (plus close) - not a second table. Empty loops = legacy triangles from indices. Present tessellates loops to indices. Optional faceColors / facePalette are one entry per authored face. Empty means use CDrawStyle fill. Optional texcoords: one UV per vertex when set.


The documentation for this struct was generated from the following file:
  • packs/rigComponent/src/CMesh.h