Skip to content

raisim::VisualMesh ​

struct · #include <raisim/server/Visuals.hpp>

Inherits: raisim::Visuals

Visual mesh created by RaisimServer::addVisualMesh(), either from a file or from raw arrays.

Public member functions ​

updateMesh ​

cpp
void updateMesh(
    const std::vector<float> &vertexArray,
    const std::vector<uint8_t> &colorArray)

Replace the vertex positions and colors of a mesh created from raw arrays. The triangle indices are kept, so the vertex count should not change. Once called, the vertex and color arrays are sent with every frame.

Parameters

ParameterDescription
vertexArray (in)vertex positions (x, y, z per vertex)
colorArray (in)per-vertex RGB colors (0-255), same size as vertexArray

isUpdated ​

cpp
bool isUpdated() const

Returns true once updateMesh() has been called. The flag is never cleared.

Inherited members ​

From raisim::Visuals: color, getOrientation, getPosition, glow, lock, lockMutex, material, name, setBoxSize, setCapsuleSize, setColor, setCylinderSize, setOrientation, setPosition, setSphereSize, shadow, size, try_lock, type, unlock, unlockMutex

RaiSim — physics for robotics and AI.