KarmaEngine
Game Engine for practical learning and research purposes
Loading...
Searching...
No Matches
Karma::Scene Class Reference

Class for organizing and containing Scene relevant data. More...

#include <Scene.h>

Public Member Functions

 Scene ()
 A constructor.
 
 ~Scene ()
 Destructor.
 
void AddVertexArray (std::shared_ptr< VertexArray > vertexArray)
 Add a VertexArray (Mesh + Material) to the list of renderable VertexArrays.
 
void AddCamera (std::shared_ptr< Camera > camera)
 Add Camera.
 
void SetClearColor (const glm::vec4 &clearColor)
 Set the m_ClearColor variable.
 
void SetRenderWindow (void *window)
 Set the Window in which the Scene is to be rendered.
 
void SetWindowToRenderWithinResize (bool bStatus)
 Sets the status of the m_WindowResize true if resize is done so that necessary reset and reallocation of resources can be done.
 
std::shared_ptr< VertexArrayGetRenderableVertexArray () const
 Getter for the VertexArray.
 
std::shared_ptr< CameraGetSceneCamera () const
 Getter for the Camera being used for the scene.
 
const glm::vec4 & GetClearColor () const
 Getter for the m_ClearColor.
 
const std::vector< std::shared_ptr< VertexArray > > & GetAllVertexArrays () const
 Get the list of VertexArrays.
 
const std::vector< std::shared_ptr< Camera > > & GetAllCameras () const
 Get the list of all Cameras.
 
void * GetRenderingWindow () const
 Getter for the window in which the scene is rendered.
 
bool GetWindowToRenderWithinResizeStatus () const
 Getter for the status of wether the window resize is to be handled.
 

Detailed Description

Class for organizing and containing Scene relevant data.

Constructor & Destructor Documentation

◆ Scene()

Karma::Scene::Scene ( )

A constructor.

Since
Karma 1.0.0

◆ ~Scene()

Karma::Scene::~Scene ( )

Destructor.

Since
Karma 1.0.0

Member Function Documentation

◆ AddCamera()

void Karma::Scene::AddCamera ( std::shared_ptr< Camera > camera)

Add Camera.

Parameters
cameraThe Camera to be added
Since
Karma 1.0.0

◆ AddVertexArray()

void Karma::Scene::AddVertexArray ( std::shared_ptr< VertexArray > vertexArray)

Add a VertexArray (Mesh + Material) to the list of renderable VertexArrays.

Parameters
vertexArrayAdding Mesh + Material to be rendered
Since
Karma 1.0.0

◆ GetAllCameras()

const std::vector< std::shared_ptr< Camera > > & Karma::Scene::GetAllCameras ( ) const
inline

Get the list of all Cameras.

Since
Karma 1.0.0

◆ GetAllVertexArrays()

const std::vector< std::shared_ptr< VertexArray > > & Karma::Scene::GetAllVertexArrays ( ) const
inline

Get the list of VertexArrays.

Since
Karma 1.0.0

◆ GetClearColor()

const glm::vec4 & Karma::Scene::GetClearColor ( ) const
inline

Getter for the m_ClearColor.

Since
Karma 1.0.0

◆ GetRenderableVertexArray()

std::shared_ptr< VertexArray > Karma::Scene::GetRenderableVertexArray ( ) const

Getter for the VertexArray.

Since
Karma 1.0.0

◆ GetRenderingWindow()

void * Karma::Scene::GetRenderingWindow ( ) const
inline

Getter for the window in which the scene is rendered.

Since
Karma 1.0.0

◆ GetSceneCamera()

std::shared_ptr< Camera > Karma::Scene::GetSceneCamera ( ) const

Getter for the Camera being used for the scene.

Since
Karma 1.0.0

◆ GetWindowToRenderWithinResizeStatus()

bool Karma::Scene::GetWindowToRenderWithinResizeStatus ( ) const
inline

Getter for the status of wether the window resize is to be handled.

Since
Karma 1.0.0

◆ SetClearColor()

void Karma::Scene::SetClearColor ( const glm::vec4 & clearColor)
inline

Set the m_ClearColor variable.

Parameters
clearColorThis color to be set
Since
Karma 1.0.0

◆ SetRenderWindow()

void Karma::Scene::SetRenderWindow ( void * window)
inline

Set the Window in which the Scene is to be rendered.

Could be a KGGuiWindow if rendering in the Editor. For standalone game, maybe Window can be used.

Parameters
windowThe window for rendering
See also
KarmaGuiMesa::Draw3DModelExhibitorMesa
Since
Karma 1.0.0

◆ SetWindowToRenderWithinResize()

void Karma::Scene::SetWindowToRenderWithinResize ( bool bStatus)
inline

Sets the status of the m_WindowResize true if resize is done so that necessary reset and reallocation of resources can be done.

Parameters
bStatusTrue if resize is done and rendering resources are to be reallocated
Since
Karma 1.0.0

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