73 uint04 constraint_iterations;
89 return particles[y *
size[X] + x];
92 return particles[y *
size[X] + x];
94 const RGBColor& getColor(
uint04 index)
96 return m_colors[index];
98 void setColor(
uint04 index, RGBColor color)
100 m_colors[index] = color;
104 return y *
size[X] + x;
106 Vector<2, uint04> get2DIndex(
uint04 index)
const
108 return Vector<2, uint04>(index %
size[X], index /
size[X]);
110 Vector<3, fltp04> getNormalAt(
const Vector<2, uint04>& index)
const;
118 inline Buffer<fltp04>& getHeightvals() {
122 Particle& getParticle1d(
uint04 index) {
123 return particles[index];
125 [[nodiscard]]
const Buffer<Particle>& getParticles()
const
130 Cloth(
const Vector<3, fltp04>&
origin_pos,
const Vector<2, uint04>&
size,
const Vector<2, fltp04>& step,
fltp04 smoothThreshold
132 void adjustParticleByNeighbor(Particle& p1, Particle& p2);
143 void addForce(
const Vector<3, fltp04> direction);
145 void terrCollision();
147 void movableFilter();
150 Buffer<uint04> findUnmovablePoint(Buffer<Vector<2, uint04>> connected);
152 void handle_slop_connected(
const Buffer<uint04>& edgePoints,
const Buffer<Vector<2, uint04>>& connected,
const Buffer<Buffer<uint04>>& neibors);
Used with CSF Cloth, The particle class represents a particle of mass that can move around in 3D spac...