82 #ifdef SL_USE_ENTITIES
83 SLint rootEntityID = SLScene::entities.getEntityID(
root3D);
84 if (rootEntityID == INT32_MIN &&
root3D)
86 else if (rootEntityID > -1)
87 SL_EXIT_MSG(
"Root node exists already with another ID among the entities");
134 bool forceCPUSkinning);
142 #ifdef SL_USE_ENTITIES
#define SL_EXIT_MSG(message)
vector< SLEventHandler * > SLVEventHandler
vector< SLLight * > SLVLight
STL vector of light pointers.
vector< SLMesh * > SLVMesh
deque< SLNode * > SLVNode
SLVNode typedef for a vector of SLNodes.
typedef void(SL_STDCALL *cbOnSceneLoad)(SLAssetManager *am
C-Callback function typedef for scene load function.
SLScene SLSceneView SLint sceneID
SLAnimManager is the central class for all animation handling.
Toplevel holder of the assets meshes, materials, textures and shaders.
Active or visible camera node class.
Scenegraph in Data Oriented Design with flat std::vector of SLEntity.
Wrapper around Oculus Rift Devkit 2.
An SLMesh object is a triangulated mesh, drawn with one draw call.
SLNode represents a node in a hierarchical scene graph.
Base class for all other classes.
const SLstring & name() const
The SLScene class represents the top level instance holding the scene structure.
SLVNode _selectedNodes
Vector of selected nodes. See SLMesh::selectNodeMesh.
SLVLight _lights
Vector of all lights.
SLbool _stopAnimations
Global flag for stopping all animations.
std::unique_ptr< SLGLOculus > _oculus
Oculus Rift interface.
bool onUpdate(bool renderTypeIsRT, bool voxelsAreShown, bool forceCPUSkinning)
Updates animations and AABBs.
AvgFloat & frameTimesMS()
SLSkybox * _skybox
pointer to skybox
void deselectAllNodesAndMeshes()
Deselects all nodes and its meshes.
SLfloat _loadTimeMS
time to load scene in ms
AvgFloat _frameTimesMS
Averaged total time per frame in ms.
SLfloat _frameTimeMS
Last frame time in ms.
SLCamera * nextCameraInScene(SLCamera *activeSVCam)
Returns the next camera in the scene if there is one.
virtual void registerAssetsToLoad(SLAssetLoader &al)
All assets the should be loaded in parallel must be registered in here.
AvgFloat & updateAABBTimesMS()
SLMesh * singleMeshFullSelected()
Returns the node if only one is selected. See also SLMesh::selectNodeMesh.
SLVEventHandler & eventHandlers()
AvgFloat & updateAnimTimesMS()
SLAssetManager * assetManager()
SLint numSceneCameras()
Returns the number of camera nodes in the scene.
AvgFloat _updateDODTimesMS
Averaged time for update the SLEntities graph.
AvgFloat & updateTimesMS()
SLVMesh & selectedMeshes()
SLNode * _root3D
Root node for 3D scene.
SLAssetManager * _assetManager
Pointer to the external assetManager.
void root2D(SLNode *root2D)
SLVMesh _selectedMeshes
Vector of selected meshes. See SLMesh::selectNodeMesh.
virtual void assemble(SLAssetManager *am, SLSceneView *sv)
After parallel loading of the assets the scene gets assembled in here.
void initOculus(SLstring shaderDir)
SLstring _info
scene info string
SLAnimManager & animManager()
SLfloat _fps
Averaged no. of frames per second.
void selectNodeMesh(SLNode *nodeToSelect, SLMesh *meshToSelect)
Handles the full mesh selection from double-clicks.
SLfloat elapsedTimeMS() const
AvgFloat _updateAABBTimesMS
Averaged time for update the nodes AABB in ms.
void skybox(SLSkybox *skybox)
SLVEventHandler _eventHandlers
Vector of all event handler.
SLScene(const SLstring &name)
SLNode * _root2D
Root node for 2D scene displayed in ortho projection.
void root3D(SLNode *root3D)
SLfloat _lastUpdateTimeMS
Last time after update in ms.
SLfloat elapsedTimeSec() const
SLfloat loadTimeMS() const
SLNode * singleNodeSelected()
Returns the node if only one is selected. See also SLMesh::selectNodeMesh.
AvgFloat _updateAnimTimesMS
Averaged time for update the animations in ms.
SLAnimManager _animManager
Animation manager instance.
SLVNode & selectedNodes()
AvgFloat _updateTimesMS
Averaged time for update in ms.
AvgFloat & updateDODTimesMS()
void loadTimeMS(SLfloat loadTimeMS)
SLbool stopAnimations() const
void init(SLAssetManager *am)
void stopAnimations(SLbool stop)
SceneView class represents a dynamic real time 3D view onto the scene.
Skybox node class with a SLBox mesh.
SLEntity is the Data Oriented Design version of a SLNode.