![]() |
XII Release 0.1.0
|
A simple simulator for swinging and hanging cloth. More...
#include <ClothSheetSimulator.h>
Classes | |
struct | Node |
Public Member Functions | |
void | SimulateCloth (const xiiTime &diff) |
void | SimulateStep (const xiiSimdFloat fDiffSqr, xiiUInt32 uiMaxIterations, xiiSimdFloat fAllowedError) |
bool | HasEquilibrium (xiiSimdFloat fAllowedMovement) const |
Public Attributes | |
xiiUInt8 | m_uiWidth = 32 |
Resolution of the cloth along X. | |
xiiUInt8 | m_uiHeight = 32 |
Resolution of the cloth along Y. | |
xiiVec3 | m_vAcceleration |
Overall force acting equally upon all cloth nodes. | |
float | m_fDampingFactor = 0.995f |
Factor with which all node velocities are damped to reduce swinging. | |
xiiVec2 | m_vSegmentLength = xiiVec2(0.1f) |
The distance along x and y between each neighboring node. | |
xiiDynamicArray< Node, xiiAlignedAllocatorWrapper > | m_Nodes |
All cloth nodes. | |
A simple simulator for swinging and hanging cloth.
Uses Verlet Integration to update the cloth positions from velocities, and the "Jakobsen method" to enforce distance constraints.