Skip to content

raisin::PhysicsMeshSnapshot ​

struct · #include <rayrai/PhysicsSnapshot.hpp>

Complete dynamic mesh. Its vertices are in immutable blocks, of blocks[0]->size() vertices each except the last, which may be shorter. A capture shares the blocks an edit left alone with the previous frame, and the indices until the topology changes, so a renderer uploads the blocks that differ from the ones it has.

Public member functions ​

vertexCount ​

cpp
size_t vertexCount() const

vertex ​

cpp
const Vertex &vertex(size_t index) const

vertices ​

cpp
std::vector<Vertex> vertices() const

All vertices, in one array.

Public attributes ​

revision ​

cpp
uint64_t revision

topologyRevision ​

cpp
uint64_t topologyRevision

blocks ​

cpp
std::vector<std::shared_ptr<const std::vector<Vertex>>> blocks

indices ​

cpp
std::shared_ptr<const std::vector<unsigned int>> indices

samples ​

cpp
glm::uvec2 samples

RaiSim — physics for robotics and AI.