iWaveOcean
3ds Max ocean simulation plugin
Simulator Class Reference

#include <Simulator.h>

Public Member Functions

 Simulator (iWaveOcean *geom)
 
void BeginSimulation (HWND hDlg)
 
void Cancel ()
 
void Reset ()
 
int GetSimulatedStartFrame () const
 
int GetSimulatedFrameCount () const
 
GridGetSimulatedGrid (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
 

Detailed Description

Manages the cached geometry for a frame-by-frame simulation that renders a grid mesh, and shows a progress dialog while simulating.

Constructor & Destructor Documentation

Simulator::Simulator ( iWaveOcean geom)

Creates a new Simulator for the specified geometry object.

Member Function Documentation

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.

Parameters
hDlgthe 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.

Parameters
framethe 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.


The documentation for this class was generated from the following files: