Soft2D
A 2D multi-material continuum physics engine designed for real-time applications.
Loading...
Searching...
No Matches
S2Particle Struct Reference

#include <soft2d_core.h>

Public Attributes

uint32_t id
 
S2Vec2 position
 Particle's position. This value is read-only.
 
S2Vec2 velocity
 Particle's velocity. This value is read-only.
 
uint32_t tag
 
S2Bool is_removed
 

Detailed Description

Structure S2Particle

Represents a particle in soft2d. Users could access particle attributes via this structure. This structure is primarily used in s2_manipulate_particles_in_trigger().

Member Data Documentation

◆ id

uint32_t S2Particle::id

The persistent and unique ID of a particle during the simulation. This value is read-only.

◆ is_removed

S2Bool S2Particle::is_removed

This is a helper allowing users to conveniently remove a particle. True tells the engine to remove this particle at the next step, False means not remove. The default value of this property is False. This value can be modified by users.

◆ tag

uint32_t S2Particle::tag

Particle's custom tag, mainly for user use. This value can be modified by users.


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