Castor3D  ..
Classes | Public Member Functions | List of all members
Castor3D::Scene Class Reference

Scene handler class. More...

+ Inheritance diagram for Castor3D::Scene:
+ Collaboration diagram for Castor3D::Scene:

Classes

class  BinaryParser
 Sampler loader. More...
 
class  TextLoader
 Scene loader. More...
 

Public Member Functions

C3D_API Scene (Castor::String const &p_name, Engine &p_engine)
 Constructor. More...
 
C3D_API ~Scene ()
 Destructor. More...
 
C3D_API void Initialise ()
 Initialises the scene. More...
 
C3D_API void Cleanup ()
 Clears the maps, leaves the root nodes. More...
 
C3D_API void RenderBackground (Castor::Size const &p_size)
 Renders the scene background. More...
 
C3D_API void Update ()
 Updates the scene before render. More...
 
C3D_API bool SetBackgroundImage (Castor::Path const &p_pathFile)
 Sets the background image for the scene. More...
 
C3D_API bool ImportExternal (Castor::String const &p_fileName, Importer &p_importer)
 Imports a scene from an foreign file. More...
 
C3D_API MeshSPtr ImportMesh (Castor::Path const &p_fileName, Importer &p_importer, Parameters const &p_parameters)
 Mesh import Function. More...
 
C3D_API void Merge (SceneSPtr p_scene)
 Merges the content of the given scene to this scene. More...
 
C3D_API void AddOverlay (OverlaySPtr p_overlay)
 Adds an overlay to the list. More...
 
C3D_API uint32_t GetVertexCount () const
 Retrieves the vertices count. More...
 
C3D_API uint32_t GetFaceCount () const
 Retrieves the faces count. More...
 
void SetBackgroundColour (Castor::Colour const &p_clrNew)
 Sets the background colour. More...
 
Castor::Colour const & GetBackgroundColour () const
 Retrieves the background colour. More...
 
SceneNodeSPtr GetRootNode () const
 Retrieves the root node. More...
 
SceneNodeSPtr GetCameraRootNode () const
 Retrieves the cameras root node. More...
 
SceneNodeSPtr GetObjectRootNode () const
 Retrieves the objects root node. More...
 
TextureSPtr GetBackgroundImage () const
 Retrieves the scene background image. More...
 
bool HasChanged () const
 Retrieves the scene change status. More...
 
void SetChanged ()
 Sets the scene changed status to true. More...
 
Castor::Colour const & GetAmbientLight () const
 
void SetAmbientLight (Castor::Colour const &p_value)
 Sets the ambient light colour. More...
 

Detailed Description

Scene handler class.

Author
Sylvain DOREMUS
Version
0.1
Date
09/02/2010
Remarks
A scene is a collection of lights, scene nodes and geometries.
It has at least one camera to render it

Constructor & Destructor Documentation

◆ Scene()

C3D_API Castor3D::Scene::Scene ( Castor::String const &  p_name,
Engine p_engine 
)

Constructor.

Parameters
[in]p_nameThe scene name
[in]p_engineThe core engine

◆ ~Scene()

C3D_API Castor3D::Scene::~Scene ( )

Destructor.

Member Function Documentation

◆ AddOverlay()

C3D_API void Castor3D::Scene::AddOverlay ( OverlaySPtr  p_overlay)

Adds an overlay to the list.

Parameters
[in]p_overlayThe overlay to add

◆ Cleanup()

C3D_API void Castor3D::Scene::Cleanup ( )

Clears the maps, leaves the root nodes.

◆ GetAmbientLight()

Castor::Colour const& Castor3D::Scene::GetAmbientLight ( ) const
inline
Returns
The ambient light colour

◆ GetBackgroundColour()

Castor::Colour const& Castor3D::Scene::GetBackgroundColour ( ) const
inline

Retrieves the background colour.

Returns
The colour

◆ GetBackgroundImage()

TextureSPtr Castor3D::Scene::GetBackgroundImage ( ) const
inline

Retrieves the scene background image.

Returns
The value

◆ GetCameraRootNode()

SceneNodeSPtr Castor3D::Scene::GetCameraRootNode ( ) const
inline

Retrieves the cameras root node.

Returns
The value

◆ GetFaceCount()

C3D_API uint32_t Castor3D::Scene::GetFaceCount ( ) const

Retrieves the faces count.

Returns
The value

◆ GetObjectRootNode()

SceneNodeSPtr Castor3D::Scene::GetObjectRootNode ( ) const
inline

Retrieves the objects root node.

Returns
The value

◆ GetRootNode()

SceneNodeSPtr Castor3D::Scene::GetRootNode ( ) const
inline

Retrieves the root node.

Returns
The value

◆ GetVertexCount()

C3D_API uint32_t Castor3D::Scene::GetVertexCount ( ) const

Retrieves the vertices count.

Returns
The value

◆ HasChanged()

bool Castor3D::Scene::HasChanged ( ) const
inline

Retrieves the scene change status.

Returns
The value

◆ ImportExternal()

C3D_API bool Castor3D::Scene::ImportExternal ( Castor::String const &  p_fileName,
Importer p_importer 
)

Imports a scene from an foreign file.

Parameters
[in]p_fileNamefile to read from
[in]p_importerThe importer, which is in charge of loading the scene
Returns
true if successful, false if not

◆ ImportMesh()

C3D_API MeshSPtr Castor3D::Scene::ImportMesh ( Castor::Path const &  p_fileName,
Importer p_importer,
Parameters const &  p_parameters 
)

Mesh import Function.

Parameters
[in]p_fileNameThe location of the file to import.
[in]p_importerThe importer.
[in]p_parametersImport configuration parameters.
Returns
The imported Mesh

◆ Initialise()

C3D_API void Castor3D::Scene::Initialise ( )

Initialises the scene.

◆ Merge()

C3D_API void Castor3D::Scene::Merge ( SceneSPtr  p_scene)

Merges the content of the given scene to this scene.

Parameters
[in]p_sceneThe scene to merge into this one

◆ RenderBackground()

C3D_API void Castor3D::Scene::RenderBackground ( Castor::Size const &  p_size)

Renders the scene background.

Parameters
[in]p_sizeThe target dimensions.

◆ SetAmbientLight()

void Castor3D::Scene::SetAmbientLight ( Castor::Colour const &  p_value)
inline

Sets the ambient light colour.

Parameters
[in]p_valueThe new value.

◆ SetBackgroundColour()

void Castor3D::Scene::SetBackgroundColour ( Castor::Colour const &  p_clrNew)
inline

Sets the background colour.

Parameters
[in]p_clrNewThe new colour

◆ SetBackgroundImage()

C3D_API bool Castor3D::Scene::SetBackgroundImage ( Castor::Path const &  p_pathFile)

Sets the background image for the scene.

Parameters
[in]p_pathFileThe image file path

◆ SetChanged()

void Castor3D::Scene::SetChanged ( )
inline

Sets the scene changed status to true.

◆ Update()

C3D_API void Castor3D::Scene::Update ( )

Updates the scene before render.


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