Castor3D 0.12.0
Multiplatform 3D engine
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
castor3d::Scene Class Reference

#include <Scene.hpp>

Inheritance diagram for castor3d::Scene:
Inheritance graph
[legend]
Collaboration diagram for castor3d::Scene:
Collaboration graph
[legend]

Public Member Functions

C3D_API Scene (castor::String const &name, Engine &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 update (CpuUpdater &updater)
 Updates the scene before render. More...
 
C3D_API void update (GpuUpdater &updater)
 Updates the scene device dependant stuff. More...
 
C3D_API void setBackground (SceneBackgroundSPtr value)
 Sets the background for the scene. More...
 
C3D_API void merge (Scene &scene)
 Merges the content of the given scene to this scene. More...
 
C3D_API uint32_t getVertexCount () const
 Retrieves the vertices count. More...
 
C3D_API uint32_t getFaceCount () const
 Retrieves the faces count. More...
 
C3D_API SceneFlags getFlags () const
 
C3D_API bool hasShadows () const
 
C3D_API bool hasShadows (LightType lightType) const
 
C3D_API void addEnvironmentMap (SceneNode &node)
 Creates a reflection map for given node. More...
 
C3D_API void removeEnvironmentMap (SceneNode &node)
 Creates a reflection map for given node. More...
 
C3D_API bool hasEnvironmentMap (SceneNode &node) const
 
C3D_API EnvironmentMapgetEnvironmentMap () const
 
C3D_API uint32_t getEnvironmentMapIndex (SceneNode const &node) const
 
C3D_API AnimatedObjectSPtr addAnimatedTexture (TextureSourceInfo const &sourceInfo, TextureConfiguration const &config, Pass &pass)
 
C3D_API void registerLight (Light &light)
 
C3D_API void unregisterLight (Light &light)
 

Getters.

C3D_API PassTypeID getPassesType () const
 
C3D_API castor::String getPassesName () const
 
C3D_API bool needsGlobalIllumination () const
 
C3D_API bool needsGlobalIllumination (LightType ltType, GlobalIlluminationType giType) const
 
C3D_API crg::SemaphoreWaitArray getRenderTargetsSemaphores () const
 
C3D_API uint32_t getLpvGridSize () const
 
C3D_API bool hasBindless () const
 
C3D_API ashes::DescriptorSetLayout * getBindlessTexDescriptorLayout () const
 
C3D_API ashes::DescriptorPool * getBindlessTexDescriptorPool () const
 
C3D_API ashes::DescriptorSet * getBindlessTexDescriptorSet () const
 
C3D_API ashes::Buffer< ModelBufferConfiguration > const & getModelBuffer () const
 
C3D_API ashes::Buffer< BillboardUboConfiguration > const & getBillboardsBuffer () const
 
castor::BoundingBox const & getBoundingBox () const
 
SceneBackgroundSPtr getBackground () const
 
castor::RgbColour const & getBackgroundColour () const
 
SceneNodeSPtr getRootNode () const
 
SceneNodeSPtr getCameraRootNode () const
 
SceneNodeSPtr getObjectRootNode () const
 
bool hasChanged () const
 
castor::RgbColour const & getAmbientLight () const
 
Fog const & getFog () const
 
FoggetFog ()
 
FrameListener const & getListener () const
 
FrameListenergetListener ()
 
bool isInitialised () const
 
bool needsSubsurfaceScattering () const
 
bool hasOpaqueObjects () const
 
bool hasTransparentObjects () const
 
uint32_t getDirectionalShadowCascades () const
 
float getLpvIndirectAttenuation () const
 
VoxelSceneData const & getVoxelConeTracingConfig () const
 
VoxelSceneDatagetVoxelConeTracingConfig ()
 
SceneRenderNodesgetRenderNodes () const
 
LightFactorygetLightsFactory () const
 
C3D_API void setDirectionalShadowCascades (uint32_t value)
 
C3D_API void setLpvIndirectAttenuation (float value)
 
C3D_API void setPassesType (PassTypeID value)
 
void setBackgroundColour (castor::RgbColour const &value)
 
void setChanged ()
 
void setAmbientLight (castor::RgbColour const &value)
 

Public Attributes

OnSceneChanged onChanged
 
OnSceneUpdate onUpdate
 
OnBackgroundChanged onSetBackground
 

Static Public Attributes

static castor::String CameraRootNode
 
static castor::String ObjectRootNode
 
static castor::String RootNode
 

Constructor & Destructor Documentation

◆ Scene()

C3D_API castor3d::Scene::Scene ( castor::String const &  name,
Engine engine 
)

Constructor.

Parameters
[in]nameThe scene name
[in]engineThe core engine

◆ ~Scene()

C3D_API castor3d::Scene::~Scene ( )

Destructor.

Member Function Documentation

◆ addAnimatedTexture()

C3D_API AnimatedObjectSPtr castor3d::Scene::addAnimatedTexture ( TextureSourceInfo const &  sourceInfo,
TextureConfiguration const &  config,
Pass pass 
)

◆ addEnvironmentMap()

C3D_API void castor3d::Scene::addEnvironmentMap ( SceneNode node)

Creates a reflection map for given node.

Parameters
[in]nodeThe scene node from which the reflection map is generated.

◆ cleanup()

C3D_API void castor3d::Scene::cleanup ( )

Clears the maps, leaves the root nodes.

◆ getAmbientLight()

castor::RgbColour const & castor3d::Scene::getAmbientLight ( ) const
inline

◆ getBackground()

SceneBackgroundSPtr castor3d::Scene::getBackground ( ) const
inline

◆ getBackgroundColour()

castor::RgbColour const & castor3d::Scene::getBackgroundColour ( ) const
inline

◆ getBillboardsBuffer()

C3D_API ashes::Buffer< BillboardUboConfiguration > const & castor3d::Scene::getBillboardsBuffer ( ) const

◆ getBindlessTexDescriptorLayout()

C3D_API ashes::DescriptorSetLayout * castor3d::Scene::getBindlessTexDescriptorLayout ( ) const

◆ getBindlessTexDescriptorPool()

C3D_API ashes::DescriptorPool * castor3d::Scene::getBindlessTexDescriptorPool ( ) const

◆ getBindlessTexDescriptorSet()

C3D_API ashes::DescriptorSet * castor3d::Scene::getBindlessTexDescriptorSet ( ) const

◆ getBoundingBox()

castor::BoundingBox const & castor3d::Scene::getBoundingBox ( ) const
inline

◆ getCameraRootNode()

SceneNodeSPtr castor3d::Scene::getCameraRootNode ( ) const
inline

◆ getDirectionalShadowCascades()

uint32_t castor3d::Scene::getDirectionalShadowCascades ( ) const
inline

◆ getEnvironmentMap()

C3D_API EnvironmentMap & castor3d::Scene::getEnvironmentMap ( ) const
Remarks
Call hasEnvironmentMap before calling this function (since this one returns a reference to an existing EnvironmentMap).
Returns
Retrieves the reflection map for given node.
Parameters
[in]nodeThe scene node.

◆ getEnvironmentMapIndex()

C3D_API uint32_t castor3d::Scene::getEnvironmentMapIndex ( SceneNode const &  node) const
Remarks
Call hasEnvironmentMap before calling this function (since this one returns a reference to an existing EnvironmentMap).
Returns
Retrieves the reflection map for given node.
Parameters
[in]nodeThe scene node.

◆ getFaceCount()

C3D_API uint32_t castor3d::Scene::getFaceCount ( ) const

Retrieves the faces count.

Returns
The value

◆ getFlags()

C3D_API SceneFlags castor3d::Scene::getFlags ( ) const
Returns
The scene flags.

◆ getFog() [1/2]

Fog & castor3d::Scene::getFog ( )
inline

◆ getFog() [2/2]

Fog const & castor3d::Scene::getFog ( ) const
inline

◆ getLightsFactory()

LightFactory & castor3d::Scene::getLightsFactory ( ) const
inline

◆ getListener() [1/2]

FrameListener & castor3d::Scene::getListener ( )
inline

◆ getListener() [2/2]

FrameListener const & castor3d::Scene::getListener ( ) const
inline

◆ getLpvGridSize()

C3D_API uint32_t castor3d::Scene::getLpvGridSize ( ) const

◆ getLpvIndirectAttenuation()

float castor3d::Scene::getLpvIndirectAttenuation ( ) const
inline

◆ getModelBuffer()

C3D_API ashes::Buffer< ModelBufferConfiguration > const & castor3d::Scene::getModelBuffer ( ) const

◆ getObjectRootNode()

SceneNodeSPtr castor3d::Scene::getObjectRootNode ( ) const
inline

◆ getPassesName()

C3D_API castor::String castor3d::Scene::getPassesName ( ) const

◆ getPassesType()

C3D_API PassTypeID castor3d::Scene::getPassesType ( ) const

◆ getRenderNodes()

SceneRenderNodes & castor3d::Scene::getRenderNodes ( ) const
inline

◆ getRenderTargetsSemaphores()

C3D_API crg::SemaphoreWaitArray castor3d::Scene::getRenderTargetsSemaphores ( ) const

◆ getRootNode()

SceneNodeSPtr castor3d::Scene::getRootNode ( ) const
inline

◆ getVertexCount()

C3D_API uint32_t castor3d::Scene::getVertexCount ( ) const

Retrieves the vertices count.

Returns
The value

◆ getVoxelConeTracingConfig() [1/2]

VoxelSceneData & castor3d::Scene::getVoxelConeTracingConfig ( )
inline

◆ getVoxelConeTracingConfig() [2/2]

VoxelSceneData const & castor3d::Scene::getVoxelConeTracingConfig ( ) const
inline

◆ hasBindless()

C3D_API bool castor3d::Scene::hasBindless ( ) const

◆ hasChanged()

bool castor3d::Scene::hasChanged ( ) const
inline

◆ hasEnvironmentMap()

C3D_API bool castor3d::Scene::hasEnvironmentMap ( SceneNode node) const
Returns
Tells if there is a reflection map for given node.
Parameters
[in]nodeThe scene node.

◆ hasOpaqueObjects()

bool castor3d::Scene::hasOpaqueObjects ( ) const
inline

◆ hasShadows() [1/2]

C3D_API bool castor3d::Scene::hasShadows ( ) const
Returns
Tells if the scene has a shadow projecting light.

◆ hasShadows() [2/2]

C3D_API bool castor3d::Scene::hasShadows ( LightType  lightType) const
Returns
Tells if the scene has a shadow projecting light of given type.

◆ hasTransparentObjects()

bool castor3d::Scene::hasTransparentObjects ( ) const
inline

◆ initialise()

C3D_API void castor3d::Scene::initialise ( )

Initialises the scene.

◆ isInitialised()

bool castor3d::Scene::isInitialised ( ) const
inline

◆ merge()

C3D_API void castor3d::Scene::merge ( Scene scene)

Merges the content of the given scene to this scene.

Parameters
[in]sceneThe scene to merge into this one

◆ needsGlobalIllumination() [1/2]

C3D_API bool castor3d::Scene::needsGlobalIllumination ( ) const

◆ needsGlobalIllumination() [2/2]

C3D_API bool castor3d::Scene::needsGlobalIllumination ( LightType  ltType,
GlobalIlluminationType  giType 
) const

◆ needsSubsurfaceScattering()

bool castor3d::Scene::needsSubsurfaceScattering ( ) const
inline

◆ registerLight()

C3D_API void castor3d::Scene::registerLight ( Light light)

◆ removeEnvironmentMap()

C3D_API void castor3d::Scene::removeEnvironmentMap ( SceneNode node)

Creates a reflection map for given node.

Parameters
[in]nodeThe scene node from which the reflection map is generated.

◆ setAmbientLight()

void castor3d::Scene::setAmbientLight ( castor::RgbColour const &  value)
inline

◆ setBackground()

C3D_API void castor3d::Scene::setBackground ( SceneBackgroundSPtr  value)

Sets the background for the scene.

Parameters
[in]valueThe new value.

◆ setBackgroundColour()

void castor3d::Scene::setBackgroundColour ( castor::RgbColour const &  value)
inline

◆ setChanged()

void castor3d::Scene::setChanged ( )
inline

References onChanged.

◆ setDirectionalShadowCascades()

C3D_API void castor3d::Scene::setDirectionalShadowCascades ( uint32_t  value)

name Mutators.

◆ setLpvIndirectAttenuation()

C3D_API void castor3d::Scene::setLpvIndirectAttenuation ( float  value)

◆ setPassesType()

C3D_API void castor3d::Scene::setPassesType ( PassTypeID  value)

◆ unregisterLight()

C3D_API void castor3d::Scene::unregisterLight ( Light light)

◆ update() [1/2]

C3D_API void castor3d::Scene::update ( CpuUpdater updater)

Updates the scene before render.

◆ update() [2/2]

C3D_API void castor3d::Scene::update ( GpuUpdater updater)

Updates the scene device dependant stuff.

Member Data Documentation

◆ CameraRootNode

castor::String castor3d::Scene::CameraRootNode
static

The cameras root node name.

◆ ObjectRootNode

castor::String castor3d::Scene::ObjectRootNode
static

The objects root node name.

◆ onChanged

OnSceneChanged castor3d::Scene::onChanged
mutable

The signal raised when the scene has changed.

Referenced by setChanged().

◆ onSetBackground

OnBackgroundChanged castor3d::Scene::onSetBackground
mutable

The signal raised when the scene background has changed.

◆ onUpdate

OnSceneUpdate castor3d::Scene::onUpdate
mutable

The signal raised when the scene is updating.

◆ RootNode

castor::String castor3d::Scene::RootNode
static

The root node name.


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