![]() |
Plasma Engine
2.0
|
A simple simulator for swinging and hanging cloth. More...
#include <ClothSheetSimulator.h>
Classes | |
| struct | Node |
Public Member Functions | |
| void | SimulateCloth (const plTime &diff) |
| void | SimulateStep (const plSimdFloat fDiffSqr, plUInt32 uiMaxIterations, plSimdFloat fAllowedError) |
| bool | HasEquilibrium (plSimdFloat fAllowedMovement) const |
Public Attributes | |
| plUInt8 | m_uiWidth = 32 |
| Resolution of the cloth along X. | |
| plUInt8 | m_uiHeight = 32 |
| Resolution of the cloth along Y. | |
| plVec3 | 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. | |
| plVec2 | m_vSegmentLength = plVec2(0.1f) |
| The distance along x and y between each neighboring node. | |
| plDynamicArray< Node, plAlignedAllocatorWrapper > | 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.