60#define MAX_PARTICLE_FOR_POSTPROCESSIN 50
73 uint04 constraint_iterations;
89 return particles[y *
size[
X] + x];
92 return particles[y *
size[
X] + x];
96 return m_colors[index];
100 m_colors[index] = color;
104 return y *
size[
X] + x;
123 return particles[index];
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:56
The data and operations for performing bare earth using Cloth simulation.
Definition Cloth.h:69
Particle & getParticle(uint04 x, uint04 y)
Definition Cloth.h:88
Buffer< fltp04 > & getHeightvals()
Definition Cloth.h:118
Vector< 2, uint04 > size
Definition Cloth.h:87
Buffer< uint04 > findUnmovablePoint(Buffer< Vector< 2, uint04 > > connected)
Particle & getParticle1d(uint04 index)
Definition Cloth.h:122
void handle_slop_connected(const Buffer< uint04 > &edgePoints, const Buffer< Vector< 2, uint04 > > &connected, const Buffer< Buffer< uint04 > > &neibors)
Vector< 3, fltp04 > getNormalAt(const Vector< 2, uint04 > &index) const
Cloth(const Vector< 3, fltp04 > &origin_pos, const Vector< 2, uint04 > &size, const Vector< 2, fltp04 > &step, fltp04 smoothThreshold, fltp04 heightThreshold, uint04 rigidness, fltp04 time_step, bool use_colors)
void setColor(uint04 index, RGBColor color)
Definition Cloth.h:98
Vector< 2, uint04 > get2DIndex(uint04 index) const
Definition Cloth.h:106
Buffer< fltp04 > heightvals
Definition Cloth.h:86
const Buffer< Particle > & getParticles() const
Definition Cloth.h:125
Vertex< 3, fltp04 > origin_pos
Definition Cloth.h:84
fltp04 step_y
Definition Cloth.h:85
uint04 get1DIndex(uint04 x, uint04 y) const
Definition Cloth.h:102
void adjustParticleByNeighbor(Particle &p1, Particle &p2)
void addForce(const Vector< 3, fltp04 > direction)
const RGBColor & getColor(uint04 index)
Definition Cloth.h:94
fltp04 step_x
Definition Cloth.h:85
uint04 getSize()
Definition Cloth.h:113
const Particle & getParticle(uint04 x, uint04 y) const
Definition Cloth.h:91
Used with CSF Cloth, The particle class represents a particle of mass that can move around in 3D spac...
Definition Particle.h:69
Represents a color in the RGB space with optional alpha transparency.
Definition RGBColor.h:54
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
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
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:96
@ Y
Definition BaseValues.hpp:169
@ X
Definition BaseValues.hpp:167