| Linderdaum Engine: clVisualScene Class Reference | ![]() |
Basic editable scene. More...
#include <VisualScene.h>
Public Member Functions | |
| clVisualScene () | |
| virtual | ~clVisualScene () |
| virtual void | AfterConstruction () |
| virtual void | Event_TIMER (LEvent Event, const LEventArgs &Args) |
| virtual void | Event_KEY (LEvent Event, const LEventArgs &Args) |
| void | Register () |
| Register Timer/Click/Key events for this scene. | |
| void | Unregister () |
| Unregister Timer/Click/Key handlers. | |
| virtual bool | BeginLoad () |
| Custom preparation for the loading process. | |
| virtual bool | EndLoad () |
| Custom termination of the loading process. | |
| virtual void | Clear () |
| Clear the scene by removing every entity. | |
| std::string | GetLastError () const |
| void | RenderDebug (const LMatrix4 &Proj, const LMatrix4 &View) |
| And kind of debugging information. | |
| void | RenderAuxBuffers (const LMatrix4 &Proj, const LMatrix4 &View) |
| And kind of offscreen helpers. | |
| void | Render () |
| clVisualObject * | PickObject (float x, float y) |
| Pick object using current mouse coordinates. | |
| clVisualObject * | FindObject (const std::string &_ID) |
| void | SetActiveCamera (int Idx) |
| Select active camera. | |
| int | GetActiveCamera () const |
| Get active camera index. | |
| LMatrix4 | GetCurrentView () |
| Get current viewing transfomation or identity if no camera is selected. | |
| LMatrix4 | GetCurrentProjection () |
| Get current projection or identity if no camera is selected. | |
| int | GetNumVolumes () const |
| int | GetNumParticles () const |
| int | GetNumCameras () const |
| int | GetNumLights () const |
| int | GetNumRenderables () const |
| int | GetNumModifiers () const |
| clVisualVolume * | GetVolume (int i) const |
| clVisualParticles * | GetParticles (int i) const |
| clVisualRenderable * | GetRenderable (int i) const |
| clVisualLight * | GetLight (int i) const |
| clVisualCamera * | GetCamera (int i) const |
| clVisualModifier * | GetModifier (int i) const |
| void | SetVolume (int i, clVisualVolume *Vol) |
| void | SetParticles (int i, clVisualParticles *Part) |
| void | SetRenderable (int i, clVisualRenderable *Rnd) |
| void | SetCamera (int i, clVisualCamera *Cam) |
| void | SetLight (int i, clVisualLight *L) |
| void | SetModifier (int i, clVisualModifier *Mod) |
| int | GetObjectIndex (clVisualObject *Obj) const |
| int | GetCameraIndex (clVisualCamera *Cam) const |
| int | GetLightIndex (clVisualLight *L) const |
| int | GetRenderableIndex (clVisualRenderable *R) const |
| int | GetModifierIndex (clVisualModifier *M) const |
| clVisualSpotLight * | AddSpotLight () |
| clVisualPointLight * | AddPointLight () |
| clVisualDirectionalLight * | AddDirectionalLight () |
| clVisualCamera * | AddCamera (const LMatrix4 &Projection, const LMatrix4 &Transform, iCameraPositioner *Pos) |
| Add a new camera with optional positioner. | |
| clVisualGeom * | AddGeom (clGeom *G, clMaterial *Mat, const LMatrix4 &Transform) |
| Add a new geom with overridden material (can be null) and initial LocalTransform. | |
| clVisualParticles * | AddParticles () |
| void | AddModifier (clVisualModifier *Mod) |
| void | AddLight (clVisualLight *L) |
| void | RemoveLight (clVisualLight *L) |
| void | RemoveCamera (clVisualCamera *Cam) |
| If the camera coincides with the ActiveCamera, then ActiveCamera is set to -1. | |
| void | RemoveRenderable (clVisualRenderable *R) |
| void | RemoveGeom (clVisualGeom *G) |
| void | RemoveVolume (clVisualVolume *V) |
| void | RemoveParticles (clVisualParticles *PP) |
| void | RemoveModifier (clVisualModifier *Mod) |
| clTranslateGizmo * | AddTranslateGizmoPropMtx (const std::string &ObjID, const std::string &PropID) |
| Link translation gizmo to some mtx property. | |
| clTranslateGizmo * | AddTranslateGizmoPropVec (const std::string &ObjID, const std::string &PropID) |
| Link translation gizmo to some mtx property. | |
| clTranslateGizmo * | AddTranslateGizmoVarMtx (const std::string &VarName) |
| clTranslateGizmo * | AddTranslateGizmoVarVec (const std::string &VarName) |
| clRotateGizmo * | AddRotateGizmoPropMtx (const std::string &ObjID, const std::string &PropID) |
| Link rotation gizmo to some mtx property. | |
| clRotateGizmo * | AddRotateGizmoPropVec (const std::string &ObjID, const std::string &PropID) |
| clRotateGizmo * | AddRotateGizmoPropQuat (const std::string &ObjID, const std::string &PropID) |
| clRotateGizmo * | AddRotateGizmoVarMtx (const std::string &VarName) |
| clRotateGizmo * | AddRotateGizmoVarVec (const std::string &VarName) |
| clRotateGizmo * | AddRotateGizmoVarQuat (const std::string &VarName) |
| void | AddSubObject (clVisualObject *SubObject) |
| Workaround for non-working subobjects (from iObject) | |
| void | RemoveSubObject (clVisualObject *SubObject) |
| void | ClearSubObjects () |
| int | GetNumSubObjects () const |
| clVisualObject * | GetObject (int i) |
| clVisualObject * | GetObjectConst (int i) const |
| clScene * | GetDebugScene () const |
| clScene * | GetScene () const |
| virtual void | Update (float DT) |
| virtual void | HandleKey (int Key, bool State) |
| clRenderingTechnique * | GetTechnique () const |
Public Attributes | |
| std::vector< clVisualParticles * > | FParticles |
| Auxillary cameras list. | |
| std::vector< clVisualVolume * > | FVolumes |
| std::vector< clVisualCamera * > | FCameras |
| std::vector< clVisualLight * > | FLights |
| std::vector< clVisualRenderable * > | FVisuals |
| std::vector< clVisualModifier * > | FModifiers |
Private Member Functions | |
| void | AddToScenes () |
| void | RemoveFromScenes () |
Private Attributes | |
| LEventSubscriber::LEventHandler | FTimerHandler |
| Local timer/key event handlers. | |
| LEventSubscriber::LEventHandler | FKeyHandler |
| clScene * | FDebugScene |
| Debug scene. | |
| clScene * | FScene |
| Real scene. | |
| clRenderingTechnique * | FTechnique |
| std::vector< clVisualObject * > | FObjects |
| List of visual objects in this scene (resides in FSubObjects by now) | |
| std::string | FLastError |
| Last error message. | |
| int | FActiveCamera |
| Currenttly used camera. | |
Basic editable scene.
| clVisualScene::clVisualScene | ( | ) |
PROBLEMS :
| clVisualScene::~clVisualScene | ( | ) | [virtual] |
| clVisualCamera * clVisualScene::AddCamera | ( | const LMatrix4 & | Projection, |
| const LMatrix4 & | Transform, | ||
| iCameraPositioner * | Pos | ||
| ) |
Add a new camera with optional positioner.
| clVisualDirectionalLight * clVisualScene::AddDirectionalLight | ( | ) |
| clVisualGeom * clVisualScene::AddGeom | ( | clGeom * | G, |
| clMaterial * | Mat, | ||
| const LMatrix4 & | Transform | ||
| ) |
Add a new geom with overridden material (can be null) and initial LocalTransform.
| void clVisualScene::AddLight | ( | clVisualLight * | L | ) |
| void clVisualScene::AddModifier | ( | clVisualModifier * | Mod | ) |
| clVisualParticles * clVisualScene::AddParticles | ( | ) |
| clVisualPointLight * clVisualScene::AddPointLight | ( | ) |
| clRotateGizmo * clVisualScene::AddRotateGizmoPropMtx | ( | const std::string & | ObjID, |
| const std::string & | PropID | ||
| ) |
Link rotation gizmo to some mtx property.
| clRotateGizmo * clVisualScene::AddRotateGizmoPropQuat | ( | const std::string & | ObjID, |
| const std::string & | PropID | ||
| ) |
| clRotateGizmo * clVisualScene::AddRotateGizmoPropVec | ( | const std::string & | ObjID, |
| const std::string & | PropID | ||
| ) |
| clRotateGizmo * clVisualScene::AddRotateGizmoVarMtx | ( | const std::string & | VarName | ) |
| clRotateGizmo * clVisualScene::AddRotateGizmoVarQuat | ( | const std::string & | VarName | ) |
| clRotateGizmo * clVisualScene::AddRotateGizmoVarVec | ( | const std::string & | VarName | ) |
| clVisualSpotLight * clVisualScene::AddSpotLight | ( | ) |
| void clVisualScene::AddSubObject | ( | clVisualObject * | SubObject | ) |
Workaround for non-working subobjects (from iObject)
| void clVisualScene::AddToScenes | ( | ) | [private] |
| clTranslateGizmo * clVisualScene::AddTranslateGizmoPropMtx | ( | const std::string & | ObjID, |
| const std::string & | PropID | ||
| ) |
Link translation gizmo to some mtx property.
| clTranslateGizmo * clVisualScene::AddTranslateGizmoPropVec | ( | const std::string & | ObjID, |
| const std::string & | PropID | ||
| ) |
Link translation gizmo to some mtx property.
| clTranslateGizmo * clVisualScene::AddTranslateGizmoVarMtx | ( | const std::string & | VarName | ) |
| clTranslateGizmo * clVisualScene::AddTranslateGizmoVarVec | ( | const std::string & | VarName | ) |
| void clVisualScene::AfterConstruction | ( | ) | [virtual] |
Reimplemented from iObject.
| bool clVisualScene::BeginLoad | ( | ) | [virtual] |
Custom preparation for the loading process.
Reimplemented from iObject.
| void clVisualScene::Clear | ( | ) | [virtual] |
Clear the scene by removing every entity.
| void clVisualScene::ClearSubObjects | ( | ) | [inline] |
| bool clVisualScene::EndLoad | ( | ) | [virtual] |
Custom termination of the loading process.
Reimplemented from iObject.
| void clVisualScene::Event_KEY | ( | LEvent | Event, |
| const LEventArgs & | Args | ||
| ) | [virtual] |
| void clVisualScene::Event_TIMER | ( | LEvent | Event, |
| const LEventArgs & | Args | ||
| ) | [virtual] |
Redirect to update
| clVisualObject * clVisualScene::FindObject | ( | const std::string & | _ID | ) |
| int clVisualScene::GetActiveCamera | ( | ) | const [inline] |
Get active camera index.
| clVisualCamera* clVisualScene::GetCamera | ( | int | i | ) | const [inline] |
| int clVisualScene::GetCameraIndex | ( | clVisualCamera * | Cam | ) | const |
| LMatrix4 clVisualScene::GetCurrentProjection | ( | ) |
Get current projection or identity if no camera is selected.
| LMatrix4 clVisualScene::GetCurrentView | ( | ) |
Get current viewing transfomation or identity if no camera is selected.
| clScene* clVisualScene::GetDebugScene | ( | ) | const [inline] |
| std::string clVisualScene::GetLastError | ( | ) | const [inline] |
| clVisualLight* clVisualScene::GetLight | ( | int | i | ) | const [inline] |
| int clVisualScene::GetLightIndex | ( | clVisualLight * | L | ) | const |
| clVisualModifier* clVisualScene::GetModifier | ( | int | i | ) | const [inline] |
| int clVisualScene::GetModifierIndex | ( | clVisualModifier * | M | ) | const |
| int clVisualScene::GetNumCameras | ( | ) | const [inline] |
| int clVisualScene::GetNumLights | ( | ) | const [inline] |
| int clVisualScene::GetNumModifiers | ( | ) | const [inline] |
| int clVisualScene::GetNumParticles | ( | ) | const [inline] |
| int clVisualScene::GetNumRenderables | ( | ) | const [inline] |
| int clVisualScene::GetNumSubObjects | ( | ) | const [inline] |
| int clVisualScene::GetNumVolumes | ( | ) | const [inline] |
| clVisualObject* clVisualScene::GetObject | ( | int | i | ) | [inline] |
| clVisualObject* clVisualScene::GetObjectConst | ( | int | i | ) | const [inline] |
| int clVisualScene::GetObjectIndex | ( | clVisualObject * | Obj | ) | const |
| clVisualParticles* clVisualScene::GetParticles | ( | int | i | ) | const [inline] |
| clVisualRenderable* clVisualScene::GetRenderable | ( | int | i | ) | const [inline] |
| int clVisualScene::GetRenderableIndex | ( | clVisualRenderable * | R | ) | const |
| clScene* clVisualScene::GetScene | ( | ) | const [inline] |
| clRenderingTechnique* clVisualScene::GetTechnique | ( | ) | const [inline] |
| clVisualVolume* clVisualScene::GetVolume | ( | int | i | ) | const [inline] |
| void clVisualScene::HandleKey | ( | int | Key, |
| bool | State | ||
| ) | [virtual] |
| clVisualObject * clVisualScene::PickObject | ( | float | x, |
| float | y | ||
| ) |
Pick object using current mouse coordinates.
| void clVisualScene::Register | ( | ) |
Register Timer/Click/Key events for this scene.
| void clVisualScene::RemoveCamera | ( | clVisualCamera * | Cam | ) |
If the camera coincides with the ActiveCamera, then ActiveCamera is set to -1.
| void clVisualScene::RemoveFromScenes | ( | ) | [private] |
| void clVisualScene::RemoveGeom | ( | clVisualGeom * | G | ) |
| void clVisualScene::RemoveLight | ( | clVisualLight * | L | ) |
| void clVisualScene::RemoveModifier | ( | clVisualModifier * | Mod | ) |
| void clVisualScene::RemoveParticles | ( | clVisualParticles * | PP | ) |
| void clVisualScene::RemoveRenderable | ( | clVisualRenderable * | R | ) |
| void clVisualScene::RemoveSubObject | ( | clVisualObject * | SubObject | ) |
| void clVisualScene::RemoveVolume | ( | clVisualVolume * | V | ) |
| void clVisualScene::Render | ( | ) |
The rendering (by now) consists of some stages: 1) Render the volumes to separate buffers 2) Render the "RenderScene" to its internal buffer 3) Render the "DebugScene" to its internal buffer 4) Compose each render target into the final buffer 5) Render final buffer as a fullscreen rect with no depthtest and no z-writes 6) Render the debug information, usually done with Canvas/TextOut
FIX IT!!!
And kind of offscreen helpers.
And kind of debugging information.
| void clVisualScene::SetActiveCamera | ( | int | Idx | ) | [inline] |
Select active camera.
| void clVisualScene::SetCamera | ( | int | i, |
| clVisualCamera * | Cam | ||
| ) | [inline] |
| void clVisualScene::SetLight | ( | int | i, |
| clVisualLight * | L | ||
| ) | [inline] |
| void clVisualScene::SetModifier | ( | int | i, |
| clVisualModifier * | Mod | ||
| ) | [inline] |
| void clVisualScene::SetParticles | ( | int | i, |
| clVisualParticles * | Part | ||
| ) | [inline] |
| void clVisualScene::SetRenderable | ( | int | i, |
| clVisualRenderable * | Rnd | ||
| ) | [inline] |
| void clVisualScene::SetVolume | ( | int | i, |
| clVisualVolume * | Vol | ||
| ) | [inline] |
| void clVisualScene::Unregister | ( | ) |
Unregister Timer/Click/Key handlers.
| void clVisualScene::Update | ( | float | DT | ) | [virtual] |
int clVisualScene::FActiveCamera [private] |
Currenttly used camera.
| std::vector<clVisualCamera*> clVisualScene::FCameras |
clScene* clVisualScene::FDebugScene [private] |
Debug scene.
std::string clVisualScene::FLastError [private] |
Last error message.
| std::vector<clVisualLight*> clVisualScene::FLights |
| std::vector<clVisualModifier*> clVisualScene::FModifiers |
std::vector<clVisualObject*> clVisualScene::FObjects [private] |
List of visual objects in this scene (resides in FSubObjects by now)
| std::vector<clVisualParticles*> clVisualScene::FParticles |
Auxillary cameras list.
clScene* clVisualScene::FScene [private] |
Real scene.
clRenderingTechnique* clVisualScene::FTechnique [private] |
Local timer/key event handlers.
| std::vector<clVisualRenderable*> clVisualScene::FVisuals |
| std::vector<clVisualVolume*> clVisualScene::FVolumes |