Ocular Engine
Ocular::Core::SceneLoader Class Reference

Handles the loading of .oscene files (Ocular Scene) More...

#include <SceneLoader.hpp>

Static Public Member Functions

static bool Load (Scene *scene, File const &file)
 

Static Protected Member Functions

static bool IsValidFile (File const &file)
 

Detailed Description

Handles the loading of .oscene files (Ocular Scene)

Loads .oscene files as instances of Scene objects (not to be confused with SceneObject!).

As a Scene is not a Resource, this loader is a standalone class separate from the standard loader/saver pattern found within the Resource subsystem.

Example Scene file:

<OcularScene>
    <SceneHeader>
        <SceneTreeType>
            <Static>0</Static>
            <Dynamic>0</Dynamic>
        </SceneTreeType>
    </SceneHeader>
    <SceneTree>
        <SceneObject>
        </SceneObject>
    </SceneTree>
</OcularScene>

SceneTreeType values for <Static> and <Dynamic> correspond to the enum values defined in the SceneTreeType enum (Core/Scene/SceneTreeType.hpp)

SceneObject parameters are detailed in the SceneObjectLoader class description.

Even if they are empty, the <SceneHeader> and <SceneTree> nodes are required.

Member Function Documentation

bool Ocular::Core::SceneLoader::Load ( Scene scene,
File const &  file 
)
static

Attempts to the load the Scene from the specified .oscene file.

Parameters
[in]file
Returns
The new Scene object. Ownership of (and responsibility to destroy) this object is transferred to the method caller. May return NULL if failed to load.

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