iWaveOcean
3ds Max ocean simulation plugin
|
#include <Dynamics.h>
Public Member Functions | |
Dynamics (int startFrame, float width, float length, int widthSegs, int lengthSegs, float heightScale, float dt, float alpha, float sigma, float wakePower, INode *parentNode, INode **collisionNodes, int numCollisionNodes, Grid *ambient) | |
Grid * | NextGrid () |
Represents the dynamical simulation of ocean waves using the iWave method.
Dynamics::Dynamics | ( | int | startFrame, |
float | width, | ||
float | length, | ||
int | widthSegs, | ||
int | lengthSegs, | ||
float | heightScale, | ||
float | dt, | ||
float | alpha, | ||
float | sigma, | ||
float | wakePower, | ||
INode * | parentNode, | ||
INode ** | collisionNodes, | ||
int | numCollisionNodes, | ||
Grid * | ambient | ||
) |
Constructs a new Ocean object.
startFrame | the first frame number |
width | the width of the plane |
length | the length of the plane |
widthSegs | the number of faces along the X-axis |
lengthSegs | the number of faces along the Y-axis |
heightScale | a factor that scales the height of the waves |
dt | the difference in time between frames (e.g. for 24 fps, a normal dt is 1/24) |
alpha | the wave damping factor; 0.2 <= alpha <= 0.4, suggested is 0.3 |
sigma | the Gaussian smoothing factor; sigma > 0.0, suggested is 1.0 |
wakePower | the strength of an object's wake; wavePower >= 1.0, suggested is 2.0 |
parentNode | the node hosting the wave simulation |
collisionNodes | the nodes creating collisions and dynamics in the water |
numCollisionNodes | the size of the collisionNodes array |
ambient | an ambient wave simulation |
Grid * Dynamics::NextGrid | ( | ) |
Advances the simulation one step and returns the resultant grid. The Grid returned needs to be destroyed once it is unused; the Ocean object relinquishes responsibility for this pointer.