blaze.collision.shapes.fluidParticle
- class
FluidParticle
: blaze.collision.shapes.shape.Shape;
- A fluid particle
- this(bVec2 position, float restitution, float friction);
- Constructor
- void
updatePressure
();
- Updates the pressure using a modified ideal gas state equation
(see the paper "Smoothed particles: A new paradigm for animating highly
deformable bodies." by Desbrun)
- void
update
(TimeStep step, bVec2 gravity);
- Updates the particle.
- AABB
aabb
();
- Returns:
the axis aligned bounding box associated with the shape, in
reference to the parent body's transform
- void
updateAABB
();
- Update the AABB
- bVec2
worldCenter
();
- Returns:
The particles position in world coordinates
- void
setMass
(float mass);
- Params:
float mass |
the new mass of the particle |
- void
addNeighbor
(uint ID);
- Adds a neighbor to the neighbor list
- void
addForce
(bVec2 force);
- Applies a force to the particle
Params:
bVec2 force |
the force to apply |
- bool
containsPoint
(bVec2 v);
- Returns:
false. A particle can't contain a point
- float
calculateInertia
(float m, bVec2 offset);
- Calculates the inertia
Params:
float m |
ignored |
bVec2 offset |
ignored |
Returns:
0.0f
- void
applyImpulse
(bVec2 penetration, bVec2 penetrationNormal, float rest, float fric);
- Applies an impulse to the particle
Params:
bVec2 penetration |
the distance and direction of penetration |
bVec2 penetrationNormal |
penetration, but with a length of 1.0 |
float rest |
the coefficient of restitution |
float fric |
the coefficient of friction |
- void
computeSweptAABB
(bXForm xf1, bXForm xf2);
- Updates the AABB
- void
triangulate
();
- Does nothing
- void
updateSweepRadius
(bVec2 center);
- Does nothing
- void
computeMass
(ref MassData massData);
- Does nothing
- void
computeAABB
(ref AABB aabb, bXForm xf);
- Does nothing
- SegmentCollide
testSegment
(bXForm xf, ref float lambda, ref bVec2 normal, Segment segment, float maxLambda);
- Returns:
SegmentCollide.MISS
- bool
testPoint
(bXForm xf, bVec2 p);
- Returns:
false
- bVec2
support
(bXForm xf, bVec2 d);
- Returns:
a zero vector
|