Constraint
Base class for defining particle constraints.
Constraint
( size, itemSize, [indexOffset]
)
src/constraints/Constraint.js:17
-
size
IntNumber of indices to be stored
-
itemSize
IntNumber of particles per constraint relation
-
[indexOffset]
IntNumber of indices to save at beginning of index array
applyConstraint
( index, p0, p1
)
protected
src/constraints/Constraint.js:90
Apply constraint to one set of particles defining a constrint relation.
Called _count
times per relaxation loop.
-
index
IntConstraint set index
-
p0
Float32Array (Vec3)Reference to
ParticleSystem.positions
-
p1
Float32Array (Vec3)Reference to
ParticleSystem.positionsPrev
setIndices
( indices, [a]
)
src/constraints/Constraint.js:73
Set particle indices with Array
or list of arguments
.
-
indices
Int | ArraySingle or many particle indices
-
[a]
Int (*..n)Particle index
_count
Int
private
src/constraints/Constraint.js:37
Number of constraint relations managed by this instance
_offset
Int
private
src/constraints/Constraint.js:55
Number of indices to save at beginning of index array