36#define SimpleParticle 1
41#define MAX_INF 9999999999.0f
42#define MIN_INF -9999999999.0f
62 const fltp04 singleMove1[15] = { 0, 0.3f, 0.51f, 0.657f, 0.7599f, 0.83193f, 0.88235f, 0.91765f, 0.94235f, 0.95965f, 0.97175f, 0.98023f, 0.98616f, 0.99031f, 0.99322f };
63 const fltp04 doubleMove1[15] = { 0, 0.3f, 0.42f, 0.468f, 0.4872f, 0.4949f, 0.498f, 0.4992f, 0.4997f, 0.4999f, 0.4999f, 0.5f, 0.5f, 0.5f, 0.5f };
111 (*this)[
Z] += ((*this)[
Z] -
old_pos) * local_damping + acceleration[
Z] * time;
115 (*this) += ((*this) -
old_pos) * (1.0f - DAMPING) + acceleration * time;
120#ifndef SimpleParticle
121 void resetAcceleration()
125 void addForce(
const Vector<3, fltp04>& f)
127 acceleration += f / mass;
139#ifndef SimpleParticle
#define SimpleParticle
Definition Particle.h:36
Used with CSF Cloth, The particle class represents a particle of mass that can move around in 3D spac...
Definition Particle.h:69
bool isMovable() const
Definition Particle.h:96
void makeUnmovable()
Definition Particle.h:130
void timeStep(fltp04 time, const Vector< 3, fltp04 > &acceleration)
Definition Particle.h:106
Particle(const Vector< 3, fltp04 > &pos)
Definition Particle.h:71
bool movable
Definition Particle.h:149
fltp04 old_pos
Definition Particle.h:145
Particle()
Definition Particle.h:84
A fixed-size array with better performance compared to dynamic containers.
Definition Vector.hpp:60
A vertex or point. A specific type of Vector used primarily for spacial location information.
Definition Vertex.hpp:48
const fltp04 singleMove1[15]
Definition Particle.h:62
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
Definition BaseValues.hpp:127
constexpr fltp04 damping_factor
Definition Particle.h:40
const fltp04 doubleMove1[15]
Definition Particle.h:63
@ Z
Definition BaseValues.hpp:171
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved 'invali...
Definition BaseValues.hpp:233