group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
RigMeshSource Struct Reference

Source data for one mesh of a skinned character rig. More...

#include <RendererTypes.hpp>

Public Attributes

std::vector< ModelVertexbindPoseVertices
 Bind-pose vertices (never deformed CPU-side).
std::vector< BoneInfluenceboneInfluences
 Parallel to bindPoseVertices. Must be same size.
std::vector< uint32_t > indices
 Triangle list (3 indices per triangle).
uint32_t materialIndex = 0
 Source material index — picks this mesh's per-mesh diffuse texture.

Detailed Description

Source data for one mesh of a skinned character rig.

Game.cpp constructs a std::vector<RigMeshSource> from CharacterRig::meshes() once (at startup, after the rig FBX loads) and passes it to setSkinnedRig(). The renderer copies everything it needs to GPU buffers in that one call and never touches the CPU-side data afterwards.

All three vectors describe the same triangle mesh in bind pose:

Member Data Documentation

◆ bindPoseVertices

std::vector<ModelVertex> RigMeshSource::bindPoseVertices

Bind-pose vertices (never deformed CPU-side).

◆ boneInfluences

std::vector<BoneInfluence> RigMeshSource::boneInfluences

Parallel to bindPoseVertices. Must be same size.

◆ indices

std::vector<uint32_t> RigMeshSource::indices

Triangle list (3 indices per triangle).

◆ materialIndex

uint32_t RigMeshSource::materialIndex = 0

Source material index — picks this mesh's per-mesh diffuse texture.


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