Blender V2.61 - r43446
Public Member Functions | Protected Attributes

SimulationObject Class Reference

#include <simulation_object.h>

Inheritance diagram for SimulationObject:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 SimulationObject ()
virtual ~SimulationObject ()
void copyElbeemSettings (elbeemSimulationSettings *settings)
void initGeoTree ()
void freeGeoTree ()
int geoInitGetPointType (ntlVec3Gfx org, int &OId)
bool geoInitCheckPointInside (ntlVec3Gfx org, int flags, int &OId)
double getCurrentTime (void)
virtual void setGeoStart (ntlVec3Gfx set)
virtual void setGeoEnd (ntlVec3Gfx set)
void setPanic (bool set)
bool getPanic (void)
int initializeLbmSimulation (ntlRenderGlobals *glob)
void setFrameNum (int num)
virtual int postGeoConstrInit (ntlRenderGlobals *glob)
virtual int initializeShader ()
virtual void notifyShaderOfDump (int dumptype, int frameNr, char *frameNrStr, string outfilename)
virtual void draw (void)
virtual vector
< ntlGeometryObject * >
::iterator 
getObjectsBegin ()
virtual vector
< ntlGeometryObject * >
::iterator 
getObjectsEnd ()
virtual void step (void)
virtual void prepareVisualization (void)
virtual void drawDebugDisplay ()
virtual void drawInteractiveDisplay ()
virtual void setMousePos (int x, int y, ntlVec3Gfx org, ntlVec3Gfx dir)
virtual void setMouseClick ()
double getStartTime (void)
double getFrameTime (int frame)
double getTimestep (void)
LbmSolverInterfacegetSolver ()
 access solver
void setDebugDisplay (int disp)
int getDebugDisplay ()
void initParametrizer (Parametrizer *set)
ParametrizergetParametrizer ()
int checkCallerStatus (int status, int frame)
virtual ntlVec3GfxgetBBStart ()
virtual ntlVec3GfxgetBBEnd ()

Protected Attributes

double mTime
ntlVec3Gfx mGeoStart
ntlVec3Gfx mGeoEnd
ntlTreempGiTree
vector< ntlGeometryObject * > * mpGiObjects
ntlRenderGlobalsmpGlob
bool mPanic
int mDebugType
LbmSolverInterfacempLbm
ParametrizermpParam
ParticleTracermpParts
bool mShowSurface
bool mShowParticles
int mDebDispSetting
CellIdentifierInterfacemSelectedCid
elbeemSimulationSettingsmpElbeemSettings

Detailed Description

interface for different simluation models to visualize

Definition at line 47 of file simulation_object.h.


Constructor & Destructor Documentation

SimulationObject::SimulationObject ( )

Constructor

Definition at line 35 of file simulation_object.cpp.

References mpParam, and mTime.

SimulationObject::~SimulationObject ( ) [virtual]

Destructor

Definition at line 59 of file simulation_object.cpp.

References debMsgStd, DM_MSG, mpElbeemSettings, mpGiTree, mpLbm, mpParam, and mpParts.


Member Function Documentation

int SimulationObject::checkCallerStatus ( int  status,
int  frame 
)
void SimulationObject::copyElbeemSettings ( elbeemSimulationSettings settings)
virtual void SimulationObject::draw ( void  ) [inline, virtual]

simluation interface: draw the simulation with OpenGL

Definition at line 95 of file simulation_object.h.

void SimulationObject::drawDebugDisplay ( ) [virtual]
void SimulationObject::drawInteractiveDisplay ( ) [virtual]

GUI - display interactive info

Reimplemented from ntlGeometryClass.

Definition at line 392 of file simulation_object.cpp.

References LbmSolverInterface::debugDisplayNode(), FLUIDDISPGrid, ntlGeometryClass::getVisible(), mpLbm, and mSelectedCid.

void SimulationObject::freeGeoTree ( )

destroy tree etc. when geometry init done

Definition at line 93 of file simulation_object.cpp.

References mpGiTree, and NULL.

bool SimulationObject::geoInitCheckPointInside ( ntlVec3Gfx  org,
int  flags,
int &  OId 
)

check for a certain flag type at position org

int SimulationObject::geoInitGetPointType ( ntlVec3Gfx  org,
int &  OId 
)

get fluid init type at certain position

virtual ntlVec3Gfx* SimulationObject::getBBEnd ( ) [inline, virtual]

Reimplemented from ntlGeometryClass.

Definition at line 189 of file simulation_object.h.

References mGeoEnd.

virtual ntlVec3Gfx* SimulationObject::getBBStart ( ) [inline, virtual]

get bounding box of fluid for GUI

Reimplemented from ntlGeometryClass.

Definition at line 188 of file simulation_object.h.

References mGeoStart.

double SimulationObject::getCurrentTime ( void  ) [inline]

get current (max) simulation time

Definition at line 72 of file simulation_object.h.

References mTime.

Referenced by ntlWorld::singleStepSims().

int SimulationObject::getDebugDisplay ( ) [inline]

Definition at line 174 of file simulation_object.h.

References mDebugType.

double SimulationObject::getFrameTime ( int  frame)

get time for a single animation frame

Definition at line 345 of file simulation_object.cpp.

References Parametrizer::getAniFrameTime(), and mpParam.

vector< ntlGeometryObject * >::iterator SimulationObject::getObjectsBegin ( ) [virtual]

Get start iterator for all objects

Reimplemented from ntlGeometryShader.

Definition at line 359 of file simulation_object.cpp.

References ntlGeometryShader::mObjects.

vector< ntlGeometryObject * >::iterator SimulationObject::getObjectsEnd ( ) [virtual]

Get end iterator for all objects

Reimplemented from ntlGeometryShader.

Definition at line 364 of file simulation_object.cpp.

References ntlGeometryShader::mObjects.

bool SimulationObject::getPanic ( void  ) [inline]

get sim panic flag

Definition at line 81 of file simulation_object.h.

References mPanic.

Referenced by ntlWorld::advanceSims(), and ntlWorld::singleStepSims().

Parametrizer* SimulationObject::getParametrizer ( ) [inline]

init parametrizer for anim step length

Definition at line 181 of file simulation_object.h.

References mpParam.

Referenced by ntlWorld::addDomain().

LbmSolverInterface* SimulationObject::getSolver ( ) [inline]

access solver

Definition at line 121 of file simulation_object.h.

References mpLbm.

Referenced by ntlBlenderDumper::renderScene().

double SimulationObject::getStartTime ( void  )

get current start simulation time

Definition at line 340 of file simulation_object.cpp.

References Parametrizer::getAniStart(), and mpParam.

double SimulationObject::getTimestep ( void  )

get time for a single time step in the simulation

Definition at line 349 of file simulation_object.cpp.

References Parametrizer::getTimestep(), and mpParam.

Referenced by ntlWorld::singleStepSims().

void SimulationObject::initGeoTree ( )
int SimulationObject::initializeLbmSimulation ( ntlRenderGlobals glob)

simluation interface: initialize simulation

Definition at line 112 of file simulation_object.cpp.

References LbmSolverInterface::advanceCell(), CellFlagType, checkBoundingBox(), checkCallerStatus(), convertCellFlagType2String(), createSolver(), debMsgStd, debugOutNnl, LbmSolverInterface::deleteCellIterator(), DM_MSG, DM_NOTIFY, elbeemSimulationSettings::domainobsPartslip, elbeemSimulationSettings::domainobsType, errFatal, errMsg, elbeemSimulationSettings::farFieldSize, FLUIDSIM_CBSTATUS_STEP, FLUIDSIM_OBSTACLE_FREESLIP, FLUIDSIM_OBSTACLE_PARTSLIP, elbeemSimulationSettings::generateParticles, elbeemSimulationSettings::generateVertexVectors, ntlGeometryClass::getAttributeList(), LbmSolverInterface::getCellFlag(), LbmSolverInterface::getDebugObjects(), LbmSolverInterface::getDumpVelocities(), LbmSolverInterface::getFirstCell(), LbmSolverInterface::getGenerateParticles(), LbmSolverInterface::getGeoEnd(), LbmSolverInterface::getGeoStart(), LbmSolverInterface::getIdString(), ntlRenderGlobals::getMaterials(), ntlGeometryClass::getName(), LbmSolverInterface::getSurfaceGeoObj(), ntlGeometryClass::getSwsAttributeList(), ntlGeometryClass::getVisible(), glob_mpnum, i, LbmSolverInterface::initDomainTrafo(), LbmSolverInterface::initializeSolverGrids(), LbmSolverInterface::initializeSolverMemory(), LbmSolverInterface::initializeSolverPostinit(), isSimworldOk(), elbeemSimulationSettings::maxRefine, elbeemSimulationSettings::mFsSurfGenSetting, mGeoEnd, ntlGeometryClass::mGeoInitId, mGeoStart, ntlGeometryShader::mObjects, ntlGeometryShader::mOutFilename, mPanic, ntlGeometryClass::mpAttrs, mpElbeemSettings, mpGlob, mpLbm, mpParam, mpParts, mShowParticles, mShowSurface, LbmSolverInterface::noEndCell(), NULL, elbeemSimulationSettings::numTracerParticles, elbeemSimulationSettings::outputPath, LbmSolverInterface::parseAttrList(), Parametrizer::parseAttrList(), elbeemSimulationSettings::previewresxyz, AttributeList::readInt(), AttributeList::readString(), elbeemSimulationSettings::resolutionxyz, ntlGeometryObject::searchMaterial(), AttributeList::setAllUsed(), LbmSolverInterface::setAttrList(), Parametrizer::setAttrList(), ntlGeometryObject::setCastShadows(), LbmSolverInterface::setDomainBound(), LbmSolverInterface::setDomainPartSlip(), LbmSolverInterface::setDumpVelocities(), LbmSolverInterface::setFarFieldSize(), LbmSolverInterface::setGenerateParticles(), LbmSolverInterface::setGeoEnd(), LbmSolverInterface::setGeoStart(), LbmSolverInterface::setIsoSubdivs(), LbmSolverInterface::setLbmInitId(), ntlGeometryClass::setName(), LbmSolverInterface::setName(), LbmSolverInterface::setParametrizer(), LbmSolverInterface::setParticleTracer(), LbmSolverInterface::setPreviewSize(), ntlGeometryObject::setReceiveShadows(), LbmSolverInterface::setRefinementDesired(), LbmSolverInterface::setRenderGlobals(), LbmSolverInterface::setSizeX(), LbmSolverInterface::setSizeY(), LbmSolverInterface::setSizeZ(), LbmSolverInterface::setSmoothing(), LbmSolverInterface::setSurfGenSettings(), LbmSolverInterface::setSwsAttrList(), SIMWORLD_INITERROR, elbeemSimulationSettings::surfaceSmoothing, elbeemSimulationSettings::surfaceSubdivs, and elbeemSimulationSettings::surfaceTrafo.

Referenced by postGeoConstrInit().

virtual int SimulationObject::initializeShader ( ) [inline, virtual]

Initialize object, should return !=0 upon error

Implements ntlGeometryShader.

Definition at line 91 of file simulation_object.h.

void SimulationObject::initParametrizer ( Parametrizer set) [inline]

init parametrizer for anim step length

Definition at line 179 of file simulation_object.h.

References mpParam.

void SimulationObject::notifyShaderOfDump ( int  dumptype,
int  frameNr,
char *  frameNrStr,
string  outfilename 
) [virtual]

notify object that dump is in progress (e.g. for field dump)

Implements ntlGeometryShader.

Definition at line 433 of file simulation_object.cpp.

References checkCallerStatus(), FLUIDSIM_CBSTATUS_NEWFRAME, mpLbm, and LbmSolverInterface::notifySolverOfDump().

virtual int SimulationObject::postGeoConstrInit ( ntlRenderGlobals glob) [inline, virtual]

Do geo etc. init

Reimplemented from ntlGeometryShader.

Definition at line 90 of file simulation_object.h.

References initializeLbmSimulation().

void SimulationObject::prepareVisualization ( void  ) [virtual]

prepare visualization of simulation for e.g. raytracing

Definition at line 332 of file simulation_object.cpp.

References mPanic, mpLbm, and LbmSolverInterface::prepareVisualization().

Referenced by ntlWorld::advanceSims().

void SimulationObject::setDebugDisplay ( int  disp) [inline]

set type of info to display

Definition at line 173 of file simulation_object.h.

References mDebugType.

void SimulationObject::setFrameNum ( int  num)

set current frame

Definition at line 306 of file simulation_object.cpp.

References mpParam, and Parametrizer::setFrameNum().

virtual void SimulationObject::setGeoEnd ( ntlVec3Gfx  set) [inline, virtual]

set geometry generation end point

Definition at line 76 of file simulation_object.h.

References mGeoEnd.

Referenced by ntlWorld::addDomain().

virtual void SimulationObject::setGeoStart ( ntlVec3Gfx  set) [inline, virtual]

set geometry generation start point

Definition at line 74 of file simulation_object.h.

References mGeoStart.

Referenced by ntlWorld::addDomain().

void SimulationObject::setMouseClick ( ) [virtual]

GUI - notify object that mouse was clicked at last pos

Reimplemented from ntlGeometryClass.

Definition at line 424 of file simulation_object.cpp.

References LbmSolverInterface::debugPrintNodeInfo(), mpLbm, and mSelectedCid.

void SimulationObject::setMousePos ( int  x,
int  y,
ntlVec3Gfx  org,
ntlVec3Gfx  dir 
) [virtual]

GUI - handle mouse movement for selection

Reimplemented from ntlGeometryClass.

Definition at line 407 of file simulation_object.cpp.

References LbmSolverInterface::getCellAt(), mGeoEnd, mGeoStart, mpLbm, mSelectedCid, and normalize().

void SimulationObject::setPanic ( bool  set) [inline]

set sim panic flag

Definition at line 79 of file simulation_object.h.

References mPanic.

void SimulationObject::step ( void  ) [virtual]

simluation interface: advance simulation another step (whatever delta time that might be)

Definition at line 314 of file simulation_object.cpp.

References checkCallerStatus(), FLUIDSIM_CBSTATUS_STEP, Parametrizer::getCurrentAniFrameTime(), LbmSolverInterface::getPanic(), Parametrizer::getTimestep(), mPanic, mpLbm, mpParam, mTime, and LbmSolverInterface::step().

Referenced by ntlWorld::singleStepSims().


Member Data Documentation

debug display settings

Definition at line 160 of file simulation_object.h.

debug info to display

Definition at line 144 of file simulation_object.h.

Referenced by drawDebugDisplay(), getDebugDisplay(), and setDebugDisplay().

Definition at line 129 of file simulation_object.h.

Referenced by getBBEnd(), initializeLbmSimulation(), setGeoEnd(), and setMousePos().

for display - start and end vectors for geometry

Definition at line 129 of file simulation_object.h.

Referenced by getBBStart(), initializeLbmSimulation(), setGeoStart(), and setMousePos().

bool SimulationObject::mPanic [protected]

simulation panic on/off

Definition at line 141 of file simulation_object.h.

Referenced by checkCallerStatus(), getPanic(), initializeLbmSimulation(), prepareVisualization(), setPanic(), and step().

storage of API settings

Definition at line 166 of file simulation_object.h.

Referenced by checkCallerStatus(), copyElbeemSettings(), initializeLbmSimulation(), and ~SimulationObject().

object vector for geo init

Definition at line 136 of file simulation_object.h.

Referenced by initGeoTree().

geometry init id

tree object for geomerty initialization

Definition at line 134 of file simulation_object.h.

Referenced by freeGeoTree(), initGeoTree(), and ~SimulationObject().

remember globals

Definition at line 138 of file simulation_object.h.

Referenced by initGeoTree(), and initializeLbmSimulation().

particle tracing object

Definition at line 153 of file simulation_object.h.

Referenced by initializeLbmSimulation(), and ~SimulationObject().

pointer to identifier of selected node

Definition at line 163 of file simulation_object.h.

Referenced by drawInteractiveDisplay(), setMouseClick(), and setMousePos().

Definition at line 157 of file simulation_object.h.

Referenced by initializeLbmSimulation().

show parts of the simulation toggles

Definition at line 156 of file simulation_object.h.

Referenced by initializeLbmSimulation().

double SimulationObject::mTime [protected]

current time in the simulation

Definition at line 126 of file simulation_object.h.

Referenced by getCurrentTime(), SimulationObject(), and step().


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