# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NL3D::CNELU Class Reference

3d Engine Utilities. More...

#include <nelu.h>

List of all members.

Static Public Methods

bool initDriver (uint w, uint h, uint bpp=32, bool windowed=true, void *systemWindow=NULL, bool offscreen=false) throw (EDru)
 Init all that we need for a single GL window: create / init / openWindow / activate a IDriver. More...

void initScene (CViewport viewport=CViewport())
 Init all that we need for a Scene. More...

void initEventServer ()
 Init all that we need for a window message processing: a server. More...

void releaseDriver ()
 Release / delete the driver. More...

void releaseScene ()
 Release the scene. More...

void releaseEventServer ()
 Release the event server and the asynclistener. More...

void screenshot ()
 Check if you press F12 and if yes, take a screenshot. More...

bool init (uint w, uint h, CViewport viewport=CViewport(), uint bpp=32, bool windowed=true, void *systemWindow=NULL, bool offscreen=false) throw (EDru)
 Init the registry, and init all NELU NL3D::registerSerial3d(). More...

void release ()
 Delete all: releaseEventServer(); releaseScene() releaseDriver(). More...

void clearBuffers (NLMISC::CRGBA col=NLMISC::CRGBA(0, 0, 0, 0))
 Shortcut to clear ZBuffer and color buffer of CNELU::Driver. More...

void swapBuffers ()
 Shortcut to swapBuffers of CNELU::Driver. More...


Static Public Attributes

const float DefLx = 0.26f
const float DefLy = 0.2f
const float DefLzNear = 0.15f
const float DefLzFar = 1000.0f
IDriverDriver = NULL
CScene Scene
CShapeBankShapeBank
CRefPtr< CCameraCamera
NLMISC::CEventServer EventServer
NLMISC::CEventListenerAsync AsyncListener


Detailed Description

3d Engine Utilities.

Simple Open / Close framework. Designed to work only with a mono-threaded / mono-scene / single-windowed app.

If your app want to register other Models with basics CScene traversals, it could use CNELU, and register his models/observers after, or even before CNELU::init3d().

If your app want to add funky traversals, it MUST NOT use CNELU (see CScene for more information...). NB: actually it may use yet initDriver() and initEventServer() but not initScene()...

Author:
Lionel Berenguier , Nevrax France
Date:
2000

Definition at line 60 of file nelu.h.


Member Function Documentation

void NL3D::CNELU::clearBuffers NLMISC::CRGBA    col = NLMISC::CRGBA(0, 0, 0, 0) [static]
 

Shortcut to clear ZBuffer and color buffer of CNELU::Driver.

Definition at line 200 of file nelu.cpp.

bool NL3D::CNELU::init uint    w,
uint    h,
CViewport    viewport = CViewport(),
uint    bpp = 32,
bool    windowed = true,
void *    systemWindow = NULL,
bool    offscreen = false
throw (EDru) [static]
 

Init the registry, and init all NELU NL3D::registerSerial3d().

Definition at line 166 of file nelu.cpp.

References NL3D::registerSerial3d, and w.

bool NL3D::CNELU::initDriver uint    w,
uint    h,
uint    bpp = 32,
bool    windowed = true,
void *    systemWindow = NULL,
bool    offscreen = false
throw (EDru) [static]
 

Init all that we need for a single GL window: create / init / openWindow / activate a IDriver.

Definition at line 57 of file nelu.cpp.

References nlwarning, and w.

void NL3D::CNELU::initEventServer   [static]
 

Init all that we need for a window message processing: a server.

  • * - an asynclistener for get async key states.

Definition at line 121 of file nelu.cpp.

void NL3D::CNELU::initScene CViewport    viewport = CViewport() [static]
 

Init all that we need for a Scene.

  • register scene basics models,
    • init the scene, with basic Traversals,
    • create a default camera, linked to the scene, and with default frustum as specified above.
After creation, use the CNELU::Camera to manipulates the camera of scene (but you may change all you want to this camera or create/use an other camera if you want...)
Parameters:
viewport  the viewport, fullscreen by default.

Definition at line 84 of file nelu.cpp.

References DefLx, DefLy, DefLzFar, DefLzNear, and Scene.

void NL3D::CNELU::release   [static]
 

Delete all: releaseEventServer(); releaseScene() releaseDriver().

  • * - * -

Definition at line 179 of file nelu.cpp.

References releaseDriver, releaseEventServer, and releaseScene.

void NL3D::CNELU::releaseDriver   [static]
 

Release / delete the driver.

(close window etc...)

Definition at line 150 of file nelu.cpp.

Referenced by release.

void NL3D::CNELU::releaseEventServer   [static]
 

Release the event server and the asynclistener.

Definition at line 129 of file nelu.cpp.

Referenced by release.

void NL3D::CNELU::releaseScene   [static]
 

Release the scene.

Definition at line 139 of file nelu.cpp.

Referenced by release.

void NL3D::CNELU::screenshot   [static]
 

Check if you press F12 and if yes, take a screenshot.

Definition at line 186 of file nelu.cpp.

References AsyncListener, NLMISC::CEventListenerAsync::isKeyPushed, NLMISC::KeyF12, and nlinfo.

void NL3D::CNELU::swapBuffers   [static]
 

Shortcut to swapBuffers of CNELU::Driver.

Definition at line 206 of file nelu.cpp.


Member Data Documentation

CEventListenerAsync NL3D::CNELU::AsyncListener [static]
 

Definition at line 54 of file nelu.cpp.

Referenced by screenshot.

CRefPtr< CCamera > NL3D::CNELU::Camera [static]
 

Definition at line 52 of file nelu.cpp.

const float NL3D::CNELU::DefLx = 0.26f [static]
 

Definition at line 44 of file nelu.cpp.

Referenced by initScene.

const float NL3D::CNELU::DefLy = 0.2f [static]
 

Definition at line 45 of file nelu.cpp.

Referenced by initScene.

const float NL3D::CNELU::DefLzFar = 1000.0f [static]
 

Definition at line 47 of file nelu.cpp.

Referenced by initScene.

const float NL3D::CNELU::DefLzNear = 0.15f [static]
 

Definition at line 46 of file nelu.cpp.

Referenced by initScene.

IDriver * NL3D::CNELU::Driver = NULL [static]
 

Definition at line 49 of file nelu.cpp.

CEventServer NL3D::CNELU::EventServer [static]
 

Definition at line 53 of file nelu.cpp.

CScene NL3D::CNELU::Scene [static]
 

Definition at line 50 of file nelu.cpp.

Referenced by initScene.

CShapeBank * NL3D::CNELU::ShapeBank [static]
 

Definition at line 51 of file nelu.cpp.


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