Blender V2.61 - r43446
|
#include <ntl_ray.h>
Public Member Functions | |
ntlScene (ntlRenderGlobals *glob, bool del=true) | |
~ntlScene () | |
void | addGeoClass (ntlGeometryClass *geo) |
void | addGeoObject (ntlGeometryObject *geo) |
ntlGeometryObject * | getObject (int id) |
vector< ntlGeometryObject * > * | getObjects () |
vector< ntlGeometryClass * > * | getGeoClasses () |
void | buildScene (double time, bool firstInit) |
void | prepareScene (double time) |
Prepare the scene triangles and maps for raytracing. | |
void | cleanupScene (void) |
Do some memory cleaning, when frame is finished. | |
void | intersectScene (const ntlRay &r, gfxReal &distance, ntlVec3Gfx &normal, ntlTriangle *&tri, int flags) const |
ntlVec3Gfx | getVertex (int index) |
vector< ntlVec3Gfx > * | getVertexPointer (void) |
vector< ntlVec3Gfx > * | getVertexNormalPointer (void) |
vector< ntlTriangle > * | getTrianglePointer (void) |
ntlScene::ntlScene | ( | ntlRenderGlobals * | glob, |
bool | del = true |
||
) |
Default constructor
Definition at line 677 of file ntl_ray.cpp.
ntlScene::~ntlScene | ( | ) |
Default destructor
Definition at line 689 of file ntl_ray.cpp.
References errMsg, ntlRenderGlobals::getLightList(), ntlRenderGlobals::getMaterials(), and NULL.
void ntlScene::addGeoClass | ( | ntlGeometryClass * | geo | ) | [inline] |
Add an object to the scene
Definition at line 334 of file ntl_ray.h.
References ntlGeometryClass::setObjectId().
Referenced by ntlWorld::addDomain(), elbeemAddMesh(), ControlParticles::initFromMVCMesh(), and ControlParticles::initFromObject().
void ntlScene::addGeoObject | ( | ntlGeometryObject * | geo | ) | [inline] |
Add a geo object to the scene, warning - only needed for hand init
Definition at line 339 of file ntl_ray.h.
Referenced by ControlParticles::initFromMVCMesh(), and ControlParticles::initFromObject().
void ntlScene::buildScene | ( | double | time, |
bool | firstInit | ||
) |
draw scene with opengl
Build/first init the scene arrays
Definition at line 717 of file ntl_ray.cpp.
References cross(), debMsgStd, debugOut, DM_MSG, errFatal, GEOCLASSTID_OBJECT, GEOCLASSTID_SHADER, ntlRenderGlobals::getMaterials(), ntlGeometryClass::getName(), ntlGeometryClass::getObjectId(), ntlGeometryShader::getObjectsBegin(), ntlGeometryShader::getObjectsEnd(), ntlRenderGlobals::getResX(), ntlRenderGlobals::getResY(), ntlRenderGlobals::getTestMode(), ntlGeometryShader::initializeShader(), norm(), normalize(), ntlGeometryShader::postGeoConstrInit(), ntlRenderGlobals::setResX(), ntlRenderGlobals::setResY(), and SIMWORLD_INITERROR.
Referenced by ntlWorld::finishWorldInit(), ControlParticles::initFromMVCMesh(), ControlParticles::initFromObject(), and prepareScene().
void ntlScene::cleanupScene | ( | void | ) |
Do some memory cleaning, when frame is finished.
Definition at line 892 of file ntl_ray.cpp.
References NULL.
Referenced by ntlWorld::renderScene().
vector<ntlGeometryClass*>* ntlScene::getGeoClasses | ( | ) | [inline] |
Acces geo class array
Definition at line 352 of file ntl_ray.h.
References errFatal, and SIMWORLD_INITERROR.
Referenced by ntlBlenderDumper::renderScene().
ntlGeometryObject* ntlScene::getObject | ( | int | id | ) | [inline] |
Acces a certain object
Definition at line 342 of file ntl_ray.h.
References errFatal, and SIMWORLD_INITERROR.
Referenced by ntlRay::shade().
vector<ntlGeometryObject*>* ntlScene::getObjects | ( | ) | [inline] |
Acces object array
Definition at line 347 of file ntl_ray.h.
References errFatal, and SIMWORLD_INITERROR.
Referenced by SimulationObject::initGeoTree(), and LbmSolverInterface::initGeoTree().
vector<ntlTriangle>* ntlScene::getTrianglePointer | ( | void | ) | [inline] |
return pointer to vertices vector
Definition at line 379 of file ntl_ray.h.
Referenced by ntlTree::ntlTree().
ntlVec3Gfx ntlScene::getVertex | ( | int | index | ) | [inline] |
vector<ntlVec3Gfx>* ntlScene::getVertexNormalPointer | ( | void | ) | [inline] |
return pointer to vertices vector
Definition at line 377 of file ntl_ray.h.
Referenced by ntlTree::ntlTree().
vector<ntlVec3Gfx>* ntlScene::getVertexPointer | ( | void | ) | [inline] |
return pointer to vertices vector
Definition at line 375 of file ntl_ray.h.
Referenced by ntlTree::ntlTree().
void ntlScene::intersectScene | ( | const ntlRay & | r, |
gfxReal & | distance, | ||
ntlVec3Gfx & | normal, | ||
ntlTriangle *& | tri, | ||
int | flags | ||
) | const |
Intersect a ray with the scene triangles
Definition at line 906 of file ntl_ray.cpp.
References ntlRenderGlobals::getCounterSceneInter(), ntlTree::intersect(), and ntlRenderGlobals::setCounterSceneInter().
Referenced by ntlLightObject::illuminatePoint(), and ntlRay::shade().
void ntlScene::prepareScene | ( | double | time | ) |
Prepare the scene triangles and maps for raytracing.
Definition at line 873 of file ntl_ray.cpp.
References buildScene(), FSGR_STRICT_DEBUG, ntlRenderGlobals::getTreeMaxDepth(), ntlRenderGlobals::getTreeMaxTriangles(), NULL, and TRI_GEOMETRY.
Referenced by ntlWorld::renderScene().