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 ModeParticle generation mode.
| Enumerator | Description |
|---|---|
Surface | Resample the surface so that no triangle edge is longer than spacing. |
Filled | Surface 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 modeParticle generation mode.
scale
cpp
double scaleUniform scale applied to the mesh vertices.
spacing
cpp
double spacingTarget particle spacing (m) for surface resampling and the interior fill.
maxFillParticles
cpp
size_t maxFillParticlesUpper bound on the number of interior particles for Filled mode.