Blender V2.61 - r43446
|
#include <ntl_world.h>
Definition at line 26 of file ntl_world.h.
ntlWorld::ntlWorld | ( | ) |
ntlWorld::ntlWorld | ( | string | filename, |
bool | commandlineMode | ||
) |
Constructor
Definition at line 45 of file ntl_world.cpp.
References errFatal, finishWorldInit(), getRenderGlobals(), initDefaults(), mpGlob, mpOpenGLRenderer, parseFile(), setPointers(), and SIMWORLD_INITERROR.
ntlWorld::~ntlWorld | ( | void | ) | [virtual] |
Destructor
Definition at line 237 of file ntl_world.cpp.
References debMsgStd, DM_NOTIFY, ntlRenderGlobals::getRenderScene(), ntlRenderGlobals::getSimScene(), mpGlob, mpLightList, mpOpenGLRenderer, mpPropList, and mpSims.
int ntlWorld::addDomain | ( | elbeemSimulationSettings * | simSettings | ) |
add domain for API init
Definition at line 73 of file ntl_world.cpp.
References ntlScene::addGeoClass(), elbeemSimulationSettings::aniFrameTime, elbeemSimulationSettings::animStart, elbeemSimulationSettings::channelFrameTime, elbeemSimulationSettings::channelGravity, elbeemSimulationSettings::channelSizeFrameTime, elbeemSimulationSettings::channelSizeGravity, elbeemSimulationSettings::channelSizeViscosity, elbeemSimulationSettings::channelViscosity, SimulationObject::copyElbeemSettings(), elbeemSimulationSettings::geoSize, elbeemSimulationSettings::geoStart, ntlRenderGlobals::getAniFrames(), SimulationObject::getParametrizer(), ntlRenderGlobals::getRenderScene(), ntlRenderGlobals::getSims(), ntlRenderGlobals::getSimScene(), globalDomainCounter, elbeemSimulationSettings::gravity, elbeemSimulationSettings::gstar, INIT_CHANNEL_FLOAT, INIT_CHANNEL_VEC, Parametrizer::initAniFrameTimeChannel(), Parametrizer::initGravityChannel(), Parametrizer::initViscosityChannel(), mpGlob, elbeemSimulationSettings::noOfFrames, elbeemSimulationSettings::outputPath, elbeemSimulationSettings::realsize, elbeemSimulationSettings::resolutionxyz, ntlRenderGlobals::setAniFrames(), Parametrizer::setAniFrameTimeChannel(), Parametrizer::setAniStart(), Parametrizer::setDomainSize(), SimulationObject::setGeoEnd(), SimulationObject::setGeoStart(), Parametrizer::setGravity(), ntlGeometryClass::setName(), Parametrizer::setNormalizedGStar(), ntlRenderGlobals::setOutFilename(), Parametrizer::setSize(), Parametrizer::setViscosity(), and elbeemSimulationSettings::viscosity.
Referenced by elbeemAddDomain().
int ntlWorld::advanceSims | ( | int | framenum | ) |
advance simulations by time frame time
Definition at line 398 of file ntl_world.cpp.
References debMsgStd, DM_MSG, credits_svn_gen::e, errMsg, getElbeemState(), SimulationObject::getPanic(), getTime(), getTimeString(), ntlGeometryClass::getVisible(), i, LBM_TIME_EPSILON, mFirstSim, mpSims, mSimulationTime, SimulationObject::prepareVisualization(), setStopRenderVisualization(), SIMWORLD_STOP, singleStepSims(), and warnMsg.
Referenced by finishWorldInit(), renderAnimation(), and renderVisualization().
void ntlWorld::finishWorldInit | ( | ) |
common world contruction stuff once the scene is set up
Definition at line 170 of file ntl_world.cpp.
References advanceSims(), ntlScene::buildScene(), debMsgStd, DM_MSG, DM_WARNING, ntlRenderGlobals::getRenderScene(), ntlRenderGlobals::getSimScene(), ntlRenderGlobals::getSingleFrameMode(), getTime(), getTimeString(), i, isSimworldOk(), mFirstSim, mpGlob, mpSims, mSimulationTime, setElbeemState(), and SIMWORLD_INITED.
Referenced by elbeemSimulate(), and ntlWorld().
ntlOpenGLRenderer* ntlWorld::getOpenGLRenderer | ( | ) | [inline] |
ntlRenderGlobals* ntlWorld::getRenderGlobals | ( | void | ) | [inline] |
Definition at line 68 of file ntl_world.h.
References mpGlob.
Referenced by elbeemAddMesh(), and ntlWorld().
vector<SimulationObject*>* ntlWorld::getSimulations | ( | void | ) | [inline] |
&get simulation object vector (debugging)
Definition at line 79 of file ntl_world.h.
References mpSims.
double ntlWorld::getSimulationTime | ( | void | ) | [inline] |
Definition at line 72 of file ntl_world.h.
References mSimulationTime.
bool ntlWorld::getSingleStepDebug | ( | void | ) | [inline] |
Definition at line 76 of file ntl_world.h.
References mSingleStepDebug.
bool ntlWorld::getStopRenderVisualization | ( | ) | [inline] |
should the rendering viz thread be stopped?
Definition at line 56 of file ntl_world.h.
References mStopRenderVisualization.
Referenced by renderAnimation(), and renderVisualization().
void ntlWorld::initDefaults | ( | ) |
default init for all contructors
Definition at line 138 of file ntl_world.cpp.
References GET_GLOBAL_DEFAULT_MATERIAL, mFirstSim, mFrameCnt, mpGlob, mpLightList, mpOpenGLRenderer, mpPropList, mpSims, mSimulationTime, mSingleStepDebug, mStopRenderVisualization, mThreadRunning, NULL, ntlRenderGlobals::setLightList(), ntlRenderGlobals::setMaterials(), ntlRenderGlobals::setRenderScene(), ntlRenderGlobals::setSims(), and ntlRenderGlobals::setSimScene().
Referenced by ntlWorld().
int ntlWorld::renderAnimation | ( | void | ) |
render a whole animation (command line mode)
Definition at line 267 of file ntl_world.cpp.
References advanceSims(), debMsgStd, DM_NOTIFY, ntlRenderGlobals::getAniFrames(), getElbeemState(), getStopRenderVisualization(), mFirstSim, mFrameCnt, mpGlob, mpSims, mThreadRunning, renderScene(), setElbeemState(), SIMWORLD_INITED, and SIMWORLD_STOP.
Referenced by elbeemContinueSimulation(), and elbeemSimulate().
int ntlWorld::renderScene | ( | void | ) | [virtual] |
render scene (a single pictures)
DEBUG!
Reimplemented in ntlBlenderDumper.
Definition at line 503 of file ntl_world.cpp.
References ntlScene::cleanupScene(), cross(), debMsgStd, debugOutInter, DM_MSG, DM_NOTIFY, equal(), errMsg, errorOut, fabs(), ntlRenderGlobals::getAADepth(), ntlRenderGlobals::getAniCount(), ntlRenderGlobals::getAniFrames(), ntlRenderGlobals::getAspect(), ntlRenderGlobals::getCounterSceneInter(), ntlRenderGlobals::getCounterShades(), ntlRenderGlobals::getDebugOut(), ntlRenderGlobals::getDebugPixelX(), ntlRenderGlobals::getDebugPixelY(), ntlRenderGlobals::getEye(), ntlRenderGlobals::getFovy(), ntlRenderGlobals::getFrameSkip(), ntlRenderGlobals::getLookat(), getNormalized(), ntlRenderGlobals::getOutFilename(), ntlRenderGlobals::getRenderScene(), ntlRenderGlobals::getResX(), ntlRenderGlobals::getResY(), ntlRenderGlobals::getSingleFrameFilename(), ntlRenderGlobals::getSingleFrameMode(), getTime(), getTimeString(), ntlRenderGlobals::getUpVec(), glob_mpactive, glob_mpindex, i, M_PI, mpGlob, mSimulationTime, norm(), normalize(), ntlScene::prepareScene(), ntlRenderGlobals::setAniCount(), ntlRenderGlobals::setCounterSceneInter(), ntlRenderGlobals::setCounterShades(), ntlRenderGlobals::setDebugOut(), KDL::tan(), simple_enum_gen::w, and writePng().
Referenced by renderAnimation().
int ntlWorld::renderVisualization | ( | bool | multiThreaded | ) |
render a whole animation (visualization mode)
Definition at line 314 of file ntl_world.cpp.
References advanceSims(), debMsgStd, DM_MSG, DM_NOTIFY, getElbeemState(), getStopRenderVisualization(), getTime(), getTimeString(), i, isSimworldOk(), mFirstSim, mFrameCnt, mpOpenGLRenderer, mpSims, mSimulationTime, mSingleStepDebug, mThreadRunning, setStopRenderVisualization(), SIMWORLD_INITED, singleStepSims(), and warnMsg.
void ntlWorld::setRenderGlobals | ( | ntlRenderGlobals * | set | ) | [inline] |
void ntlWorld::setSimulationTime | ( | double | set | ) | [inline] |
void ntlWorld::setSingleFrameOut | ( | string | singleframeFilename | ) |
set single frame rendering to filename
Definition at line 258 of file ntl_world.cpp.
References mpGlob, ntlRenderGlobals::setSingleFrameFilename(), and ntlRenderGlobals::setSingleFrameMode().
void ntlWorld::setSingleStepDebug | ( | bool | set | ) | [inline] |
set&get single step debug mode
Definition at line 75 of file ntl_world.h.
References mSingleStepDebug.
void ntlWorld::setStopRenderVisualization | ( | bool | set | ) | [inline] |
set stop rend viz flag
Definition at line 54 of file ntl_world.h.
References mStopRenderVisualization.
Referenced by advanceSims(), and renderVisualization().
void ntlWorld::singleStepSims | ( | double | targetTime | ) |
advance simulations by a single step
Definition at line 466 of file ntl_world.cpp.
References errMsg, SimulationObject::getCurrentTime(), SimulationObject::getPanic(), SimulationObject::getTimestep(), ntlGeometryClass::getVisible(), i, LBM_TIME_EPSILON, mFirstSim, mpOpenGLRenderer, mpSims, mSimulationTime, and SimulationObject::step().
Referenced by advanceSims(), renderVisualization(), and singleStepVisualization().
int ntlWorld::singleStepVisualization | ( | void | ) |
render a single step for viz mode
Definition at line 373 of file ntl_world.cpp.
References mFirstSim, mpOpenGLRenderer, mSimulationTime, mThreadRunning, and singleStepSims().
int ntlWorld::mFirstSim [protected] |
first simulation that is valid
Definition at line 111 of file ntl_world.h.
Referenced by advanceSims(), finishWorldInit(), initDefaults(), renderAnimation(), renderVisualization(), singleStepSims(), and singleStepVisualization().
int ntlWorld::mFrameCnt [protected] |
count no. of frame for viz render
Definition at line 117 of file ntl_world.h.
Referenced by initDefaults(), renderAnimation(), and renderVisualization().
ntlRenderGlobals* ntlWorld::mpGlob [protected] |
global render settings needed almost everywhere
Definition at line 89 of file ntl_world.h.
Referenced by addDomain(), finishWorldInit(), getRenderGlobals(), initDefaults(), ntlWorld(), renderAnimation(), ntlBlenderDumper::renderScene(), renderScene(), setRenderGlobals(), setSingleFrameOut(), and ~ntlWorld().
vector<ntlLightObject*>* ntlWorld::mpLightList [protected] |
a list of lights in the scene (geometry is store in ntl_scene)
Definition at line 92 of file ntl_world.h.
Referenced by initDefaults(), and ~ntlWorld().
ntlOpenGLRenderer* ntlWorld::mpOpenGLRenderer [protected] |
opengl display
Definition at line 99 of file ntl_world.h.
Referenced by getOpenGLRenderer(), initDefaults(), ntlWorld(), renderVisualization(), singleStepSims(), singleStepVisualization(), and ~ntlWorld().
vector<ntlMaterial*>* ntlWorld::mpPropList [protected] |
surface materials
Definition at line 94 of file ntl_world.h.
Referenced by initDefaults(), and ~ntlWorld().
vector<SimulationObject*>* ntlWorld::mpSims [protected] |
sims list
Definition at line 96 of file ntl_world.h.
Referenced by advanceSims(), finishWorldInit(), getSimulations(), initDefaults(), renderAnimation(), renderVisualization(), singleStepSims(), and ~ntlWorld().
double ntlWorld::mSimulationTime [protected] |
remember the current simulation time
Definition at line 108 of file ntl_world.h.
Referenced by advanceSims(), finishWorldInit(), getSimulationTime(), initDefaults(), ntlBlenderDumper::renderScene(), renderScene(), renderVisualization(), setSimulationTime(), singleStepSims(), and singleStepVisualization().
bool ntlWorld::mSingleStepDebug [protected] |
single step mode for debugging
Definition at line 114 of file ntl_world.h.
Referenced by getSingleStepDebug(), initDefaults(), renderVisualization(), and setSingleStepDebug().
bool ntlWorld::mStopRenderVisualization [protected] |
stop rend viz?
Definition at line 102 of file ntl_world.h.
Referenced by getStopRenderVisualization(), initDefaults(), and setStopRenderVisualization().
bool ntlWorld::mThreadRunning [protected] |
rend viz thread currently running?
Definition at line 105 of file ntl_world.h.
Referenced by initDefaults(), renderAnimation(), renderVisualization(), and singleStepVisualization().