iWaveOcean
3ds Max ocean simulation plugin
|
#include <Simulator.h>
Public Member Functions | |
Simulator (iWaveOcean *geom) | |
void | BeginSimulation (HWND hDlg) |
void | Cancel () |
void | Reset () |
int | GetSimulatedStartFrame () const |
int | GetSimulatedFrameCount () const |
Grid * | GetSimulatedGrid (int frame) |
IOResult | Load (ILoad *iload) |
IOResult | Save (ISave *isave) |
bool | LoadExternal (ExternalFile &file) |
void | BeginSelectExternalFile (HWND hDlg) |
void | UseNativeStorage () |
bool | IsUsingExternalStorage () const |
std::wstring | GetExternalFileName () const |
void | ErrorDialog (HWND hDlg, std::wstring main, std::wstring detail) const |
Manages the cached geometry for a frame-by-frame simulation that renders a grid mesh, and shows a progress dialog while simulating.
Simulator::Simulator | ( | iWaveOcean * | geom | ) |
Creates a new Simulator for the specified geometry object.
void Simulator::BeginSimulation | ( | HWND | hDlg | ) |
Begins a simulation. If the previous simulation has not yet ended, does nothing. Calling this method from multiple threads is not supported; it is not thread-safe.
hDlg | the dialog that will be the parent of the status dialog |
void Simulator::Cancel | ( | ) |
Asks the running simulation to cancel and immediately returns control to the caller without waiting for the simulation to cancel. Does nothing if no simulation is running.
int Simulator::GetSimulatedFrameCount | ( | ) | const |
Gets the number of simulated frames in the simulation.
Grid * Simulator::GetSimulatedGrid | ( | int | frame | ) |
Gets the deformed grid as calculated by the simulation at a specified frame. Returns a flat plane if no cached frames are available. If the index is outside of the simulated range but there are frames available, chooses the closest frame.
frame | the frame number to get the simulated grid for |
int Simulator::GetSimulatedStartFrame | ( | ) | const |
Gets the first frame number in the simulation.
void Simulator::Reset | ( | ) |
Removes all the cached geometry of the simulation.