Skip to content

raisim::DeformableObject::MeshParticleOptions ​

struct · #include <raisim/object/deformable/DeformableObject.hpp>

How particles are generated from an OBJ mesh (see loadObj(const std::string&, const std::vector<unsigned int>&, const Material&, const MeshBuildOptions&)).

Public types ​

Mode ​

cpp
enum class Mode

Particle generation mode.

EnumeratorDescription
SurfaceResample the surface so that no triangle edge is longer than spacing.
FilledSurface resampling plus interior particles (requires a closed mesh), with the mass lumped by volume. With a positive Material::youngsModulus the particles are tetrahedralized and the object is an elastic solid (the interior particles lie on a body-centered cubic lattice). Otherwise the interior particles lie on a regular grid and every one of them is connected to all particles within sqrt(3) * spacing (its lattice neighbors and the nearby surface particles) by distance constraints.

Public attributes ​

mode ​

cpp
Mode mode

Particle generation mode.

scale ​

cpp
double scale

Uniform scale applied to the mesh vertices.

spacing ​

cpp
double spacing

Target particle spacing (m) for surface resampling and the interior fill.

maxFillParticles ​

cpp
size_t maxFillParticles

Upper bound on the number of interior particles for Filled mode.

RaiSim — physics for robotics and AI.