Slippers Engine
 
Loading...
Searching...
No Matches
Scene Class Reference

Responsible for Scene functions. More...

#include <Scene.h>

Collaboration diagram for Scene:
Collaboration graph

Protected Member Functions

template<typename C1, typename C2>
void SetCollisionPair ()
 Creates a test pair for a GameObject to collide with different typed GameObjects.
 
template<typename C1>
void SetCollisionSelf ()
 Creates a test pair for a GameObject to collide with same typed GameObjects.
 

Private Member Functions

Camera * GetCurrCam ()
 Gets Current Camera. For more information go to CameraManager.
 
Camera * GetCam2D ()
 Gets Current 2D Camera. For more information go to CameraManager.
 
void SetCurrCam (Camera *newCam)
 Changes Current Camera. For more information go to CameraManager.
 
float GetCamNearClipPersp ()
 Gets Near Clip Plane. For more information go to CameraManager.
 
float GetCamFarClipPersp ()
 Gets Far Clip Plane. For more information go to CameraManager.
 
float GetFOV ()
 Gets FOV. For more information go to CameraManager.
 
void SetCamNearClipPersp (float c)
 Sets Near Clip Plane. For more information go to CameraManager.
 
void SetCamFarClipPersp (float c)
 Sets Far Clip Plane. For more information go to CameraManager.
 
void SetFOV (float f)
 Sets FOV. For more information go to CameraManager.
 
void MoveCam (Vect up, Vect lookAt, Vect pos)
 Moves Current Camera. For more information go to CameraManager.
 
void UpdateCam ()
 Updates Current Camera. For more information go to CameraManager.
 
virtual void Initialize ()
 Function automatically called on scene starting.
 
virtual void SceneEnd ()
 Function automatically called on scene ending.
 

Detailed Description

Responsible for Scene functions.

Game objects are held by scenes. Scenes manage the back end of update, draw, draw2d, object registration, and setting up collision testing.

Member Function Documentation

◆ GetCam2D()

Camera * Scene::GetCam2D ( )
private

Gets Current 2D Camera. For more information go to CameraManager.

◆ GetCamFarClipPersp()

float Scene::GetCamFarClipPersp ( )
private

Gets Far Clip Plane. For more information go to CameraManager.

◆ GetCamNearClipPersp()

float Scene::GetCamNearClipPersp ( )
private

Gets Near Clip Plane. For more information go to CameraManager.

◆ GetCurrCam()

Camera * Scene::GetCurrCam ( )
private

Gets Current Camera. For more information go to CameraManager.

◆ GetFOV()

float Scene::GetFOV ( )
private

Gets FOV. For more information go to CameraManager.

◆ Initialize()

virtual void Scene::Initialize ( )
privatevirtual

Function automatically called on scene starting.

This function gets called whenever a scene is started or swapped to. This is a good location to create Game Objects as well as Collision Pairs and Collision Selfs.

◆ MoveCam()

void Scene::MoveCam ( Vect up,
Vect lookAt,
Vect pos )
private

Moves Current Camera. For more information go to CameraManager.

◆ SceneEnd()

virtual void Scene::SceneEnd ( )
privatevirtual

Function automatically called on scene ending.

This function gets called whenever a scene is swapped from or ended. This is a good location to delete Game Objects.

◆ SetCamFarClipPersp()

void Scene::SetCamFarClipPersp ( float c)
private

Sets Far Clip Plane. For more information go to CameraManager.

◆ SetCamNearClipPersp()

void Scene::SetCamNearClipPersp ( float c)
private

Sets Near Clip Plane. For more information go to CameraManager.

◆ SetCollisionPair()

template<typename C1, typename C2>
void Scene::SetCollisionPair ( )
protected

Creates a test pair for a GameObject to collide with different typed GameObjects.

Sets up a collision testing pair between different typed GameObjects using templates. Go to Collidable for more information.

GameObjOne* objOne = new GameObjOne();
GameObjTwo* objTwo = new GameObjTwo();
void SetCollisionPair()
Creates a test pair for a GameObject to collide with different typed GameObjects.
Definition Scene.h:185
Template Parameters
C1
C2

◆ SetCollisionSelf()

template<typename C1>
void Scene::SetCollisionSelf ( )
protected

Creates a test pair for a GameObject to collide with same typed GameObjects.

Sets up a collision testing pair between same typed GameObjects using templates. Go to Collidable for more information.

GameObjOne* objOne = new GameObjOne();
GameObjOne* objTwo = new GameObjOne();
void SetCollisionSelf()
Creates a test pair for a GameObject to collide with same typed GameObjects.
Definition Scene.h:203
Template Parameters
C1
C2

◆ SetCurrCam()

void Scene::SetCurrCam ( Camera * newCam)
private

Changes Current Camera. For more information go to CameraManager.

◆ SetFOV()

void Scene::SetFOV ( float f)
private

Sets FOV. For more information go to CameraManager.

◆ UpdateCam()

void Scene::UpdateCam ( )
private

Updates Current Camera. For more information go to CameraManager.