nApplication Class Reference
[Application Subsystem]
#include <napplication.h>
Inheritance diagram for nApplication:

Detailed Description
A simple application wrapper class. Derive a subclass for a specialized application.(C) 2004 RadonLabs GmbH
Definition at line 38 of file napplication.h.
Public Member Functions | |
| nApplication () | |
| constructor | |
| virtual | ~nApplication () |
| destructor | |
| void | SetProjectDirectory (const nString &n) |
| set the project directory (if different from home:) | |
| const nString & | GetProjectDirectory () const |
| get project directory | |
| void | SetCompanyName (const nString &n) |
| set company name | |
| const nString & | GetCompanyName () const |
| get company name | |
| void | SetAppName (const nString &n) |
| set application name | |
| const nString & | GetAppName () const |
| get application name | |
| void | SetStartupScript (const nString &s) |
| set startup script name | |
| const nString & | GetStartupScript () const |
| get startup script name | |
| void | SetDisplayMode (const nDisplayMode2 &mode) |
| set display mode | |
| const nDisplayMode2 & | GetDisplayMode () const |
| get display mode | |
| void | SetRenderPath (const nString &p) |
| set optional render path (else autoselect) | |
| const nString & | GetRenderPath () const |
| get optional render path | |
| virtual bool | Open () |
| open the application | |
| virtual void | Close () |
| close the application | |
| bool | IsOpen () const |
| return true if currently open | |
| virtual void | Run () |
| run the application | |
| void | SetQuitRequested (bool b) |
| set the quit requested flag | |
| bool | GetQuitRequested () const |
| get the quit requested flag | |
| void | SetState (const nString &n) |
| set current application state (will be activated at beginning of next frame) | |
| nString | GetCurrentState () const |
| get current application state | |
| nAppState * | FindState (const nString &name) const |
| find app state by name | |
| nTime | GetTime () const |
| get current system time | |
| nTime | GetFrameTime () const |
| get current frame time | |
| nTime | GetStateTime () const |
| get current state time (time since last state switch) | |
| void | SetLocaleTable (const nString &s) |
| set the locale table filename | |
| const nString & | GetLocaleTable () const |
| get the locale table filename | |
| nAppCamera * | GetAppCamera () const |
| get app camera | |
Static Public Member Functions | |
| static nApplication * | Instance () |
| return instance pointer | |
Protected Member Functions | |
| nAppState * | CreateState (const nString &className, const nString &stateName) |
| create a new state object | |
| virtual nScriptServer * | CreateScriptServer () |
| create script server object, override in subclass as needed | |
| virtual nGfxServer2 * | CreateGfxServer () |
| create graphics server, override in subclass as needed | |
| virtual nInputServer * | CreateInputServer () |
| create input server, override in subclass as needed | |
| virtual nConServer * | CreateConsoleServer () |
| create console server, override in subclass as needed | |
| virtual nResourceServer * | CreateResourceServer () |
| create resource server, override in subclass as needed | |
| virtual nSceneServer * | CreateSceneServer () |
| create scene server, override in subclass as needed | |
| virtual nVariableServer * | CreateVariableServer () |
| create variable server, override in subclass as needed | |
| virtual nAnimationServer * | CreateAnimationServer () |
| create animation server, override in subclass as needed | |
| virtual nParticleServer * | CreateParticleServer () |
| create particle server, override in subclass as needed | |
| virtual nVideoServer * | CreateVideoServer () |
| create video server, override in subclass as needed | |
| virtual nGuiServer * | CreateGuiServer () |
| create gui server, override in subclass as needed | |
| virtual nShadowServer2 * | CreateShadowServer () |
| create shadow server, override in subclass as needed | |
| virtual nAudioServer3 * | CreateAudioServer () |
| create audio server, override in subclass as needed | |
| virtual nPrefServer * | CreatePrefServer () |
| create preferences server, override in subclass as needed | |
| virtual nLocaleServer * | CreateLocaleServer () |
| create the locale server, override in subclass as needed | |
| virtual nAppCamera * | CreateAppCamera () |
| create camera object, override in subclass as needed | |
| virtual void | OnUpdateTime () |
| update time values | |
| virtual void | DoStateTransition () |
| perform a state transition | |
| virtual void | DoFrame () |
| do one complete frame | |
| virtual void | OnRender3D () |
| called when 3d rendering should be performed | |
| virtual void | OnRender2D () |
| called when 2d rendering should be performed | |
| virtual void | OnFrameBefore () |
| called before nSceneServer::RenderScene() | |
| virtual void | OnFrameRendered () |
| called after nSceneServer::RenderScene() | |
Constructor & Destructor Documentation
|
|
constructor
Definition at line 33 of file napplication_main.cc. |
|
|
destructor
Definition at line 51 of file napplication_main.cc. |
Member Function Documentation
|
|
return instance pointer
Definition at line 201 of file napplication.h. |
|
|
set the project directory (if different from home:)
Definition at line 222 of file napplication.h. |
|
|
get project directory
Definition at line 232 of file napplication.h. |
|
|
set company name
Definition at line 242 of file napplication.h. |
|
|
get company name
Definition at line 252 of file napplication.h. |
|
|
set application name
Definition at line 262 of file napplication.h. |
|
|
get application name
Definition at line 272 of file napplication.h. |
|
|
set startup script name
Definition at line 282 of file napplication.h. |
|
|
get startup script name
Definition at line 292 of file napplication.h. |
|
|
set display mode
Definition at line 302 of file napplication.h. |
|
|
get display mode
Definition at line 312 of file napplication.h. |
|
|
set optional render path (else autoselect)
Definition at line 322 of file napplication.h. |
|
|
get optional render path
Definition at line 332 of file napplication.h. |
|
|
open the application Open the application. This will initialize the Nebula2 runtime, load the startup script, and invoke the script functions OnStartup, OnGraphicsStartup, OnGuiStartup and OnMapInput.
Reimplemented in nAppOpenALDemo. Definition at line 69 of file napplication_main.cc. |
|
|
close the application Close the application.
Reimplemented in nAppOpenALDemo. Definition at line 190 of file napplication_main.cc. |
|
|
return true if currently open
Definition at line 212 of file napplication.h. |
|
|
run the application Run the application, this method will return when the application should quit. Definition at line 254 of file napplication_main.cc. |
|
|
set the quit requested flag
Definition at line 372 of file napplication.h. |
|
|
get the quit requested flag
Definition at line 382 of file napplication.h. |
|
|
set current application state (will be activated at beginning of next frame) Set a new application state. The state will be activated during the next DoStateTransition(). Definition at line 328 of file napplication_main.cc. |
|
|
get current application state Returns the currently active application state. Definition at line 357 of file napplication_main.cc. |
|
|
find app state by name Find an application state by name. Definition at line 372 of file napplication_main.cc. |
|
|
get current system time
Definition at line 342 of file napplication.h. |
|
|
get current frame time
Definition at line 352 of file napplication.h. |
|
|
get current state time (time since last state switch)
Definition at line 362 of file napplication.h. |
|
|
set the locale table filename
Definition at line 392 of file napplication.h. |
|
|
get the locale table filename
Definition at line 400 of file napplication.h. |
|
|
get app camera Retrives application camera.
Definition at line 413 of file napplication.h. |
|
||||||||||||
|
create a new state object Create a new application state object of the given class and name, and link it into the app state pool. Definition at line 384 of file napplication_main.cc. |
|
|
create script server object, override in subclass as needed
Reimplemented in nAppOpenALDemo. Definition at line 481 of file napplication_main.cc. |
|
|
create graphics server, override in subclass as needed
Definition at line 490 of file napplication_main.cc. |
|
|
create input server, override in subclass as needed
Definition at line 499 of file napplication_main.cc. |
|
|
create console server, override in subclass as needed
Definition at line 508 of file napplication_main.cc. |
|
|
create resource server, override in subclass as needed
Definition at line 517 of file napplication_main.cc. |
|
|
create scene server, override in subclass as needed
Definition at line 526 of file napplication_main.cc. |
|
|
create variable server, override in subclass as needed
Definition at line 535 of file napplication_main.cc. |
|
|
create animation server, override in subclass as needed
Definition at line 544 of file napplication_main.cc. |
|
|
create particle server, override in subclass as needed
Definition at line 553 of file napplication_main.cc. |
|
|
create video server, override in subclass as needed
Definition at line 562 of file napplication_main.cc. |
|
|
create gui server, override in subclass as needed
Definition at line 571 of file napplication_main.cc. |
|
|
create shadow server, override in subclass as needed
Definition at line 580 of file napplication_main.cc. |
|
|
create audio server, override in subclass as needed
Reimplemented in nAppOpenALDemo. Definition at line 598 of file napplication_main.cc. |
|
|
create preferences server, override in subclass as needed
Definition at line 607 of file napplication_main.cc. |
|
|
create the locale server, override in subclass as needed
Definition at line 616 of file napplication_main.cc. |
|
|
create camera object, override in subclass as needed
Definition at line 589 of file napplication_main.cc. |
|
|
update time values Update time values. Definition at line 281 of file napplication_main.cc. |
|
|
perform a state transition Perform a state transition. Definition at line 304 of file napplication_main.cc. |
|
|
do one complete frame Do one complete frame. Definition at line 401 of file napplication_main.cc. |
|
|
called when 3d rendering should be performed Perform 3d rendering. This calls the OnRender3d() method of the current app state object. Usually, all that needs to be done is to attach Nebula2 scene graph nodes to the scene server. Definition at line 459 of file napplication_main.cc. |
|
|
called when 2d rendering should be performed Perform 2d rendering. This calls the OnRender2d() method of the current app state object. Definition at line 471 of file napplication_main.cc. |
|
|
called before nSceneServer::RenderScene()
Definition at line 625 of file napplication_main.cc. |
|
|
called after nSceneServer::RenderScene()
Definition at line 635 of file napplication_main.cc. |
The documentation for this class was generated from the following files: