Rasterfarm-SDK
Loading...
Searching...
No Matches
Scene Class Referenceabstract

#include <scene.h>

Inheritance diagram for Scene:
DynamicType Display Engine::Raster::ReflectionMap Frustum Ortho Physical ShadowMap

Classes

struct  SortOpaqueObjects
 
struct  SortTransparentObjects
 

Public Types

typedef List< GeometricBase * > GeometricBaseList
 

Public Member Functions

 Scene (const Matrix4f &projectionMatrix, float nearZClip, float farZClip)
 
virtual ~Scene ()
 
virtual void renderMaterialLists ()=0
 
virtual void clearMaterialLists ()=0
 
virtual void addMaterialList (const Surface::MaterialList &pMaterialList)=0
 
virtual void removeGeometricObject (GeometricBase *pObject)
 
virtual void removeGeometricObject (Node *pObject)
 
virtual void createModel ()
 
virtual void addMaterials ()
 
void queueGeometricObject (GeometricBase *pObject)
 
void queueGeometricObject (Node *pObject)
 
bool hasFrameBuffer (FrameBuffer *pFrameBuffer)
 
void addFrameBuffer (FrameBuffer *pFrameBuffer)
 
void removeFrameBuffer (FrameBuffer *pFrameBuffer)
 
bool inDisplayArea (GeometricBase *pObject)
 
bool inDisplayArea ()
 
const Matrix4fgetModel (GeometricBase *pObject)
 
const UnorderedMap< Node *, Matrix4f > & getNodeModel () const
 
Primitive3D::AABoundingBox getAABoundingBox ()
 
Primitive3D::AABoundingBox getAABoundingBox (GeometricBase *pObject)
 
Primitive3D::AABoundingBox getNDCAABoundingBox ()
 
Primitive3D::AABoundingBox getNDCAABoundingBox (GeometricBase *pObject)
 
uint getGeometricObjectSize ()
 
const GeometricBaseListgetGeometricObject ()
 
void updateCamera ()
 
void renderMaterialList (Surface::MaterialList &pList, Surface::MaterialSortFunction sortFunction, float clipFactor=1.0f)
 
void renderMaterial (Surface::Material *pMaterial)
 
void setCamera (Camera *pCamera)
 
Camera * getCamera ()
 
const Matrix4fgetProjectionMatrix ()
 
const Matrix4fgetViewMatrix ()
 
float getNearZClip ()
 
float getFarZClip ()
 
bool hasGeometricObject (GeometricBase *pObject)
 
Vertex4f project (const Vertex3f &vertex)
 
Vertex3f unProject (const Vertex4f &vertex)
 
Vertex3f localToNdc (Vertex3f point)
 
Vertex3f ndcToLocal (Vertex3f point, float w)
 
- Public Member Functions inherited from DynamicType
 DynamicType ()
 
template<class C >
void addType ()
 
TypeID getDerivedTypeId () const
 
template<class C >
const bool isType () const
 
template<class C >
const C * cast () const
 
template<class C >
C * cast ()
 
template<class FROM , class TO >
TO * cast ()
 
template<class FROM , class TO >
const TO * cast () const
 

Protected Member Functions

virtual void addGeometricObject (GeometricBase *pObject)
 

Protected Attributes

float nearZClip
 
float farZClip
 
Matrix4f view
 
Matrix4f projectionMatrix
 
Camera * pCamera
 
GeometricBaseList pGeometricObject
 
UnorderedMap< Node *, Matrix4fnodeModel
 
List< FrameBuffer * > pFrameBuffer
 

Friends

class Engine::Application
 
struct Surface::Material::Initializer
 

Member Typedef Documentation

◆ GeometricBaseList

Constructor & Destructor Documentation

◆ Scene()

Scene::Scene ( const Matrix4f & projectionMatrix,
float nearZClip,
float farZClip )

◆ ~Scene()

virtual Scene::~Scene ( )
virtual

Member Function Documentation

◆ addFrameBuffer()

void Scene::addFrameBuffer ( FrameBuffer * pFrameBuffer)

◆ addGeometricObject()

virtual void Scene::addGeometricObject ( GeometricBase * pObject)
protectedvirtual

Raster & Render the GeometricObject in this Scene.

Parameters
TheGeometricBase object containing at least 1 Material.

Reimplemented in Engine::Raster::ReflectionMap, Physical, and ShadowMap.

◆ addMaterialList()

virtual void Scene::addMaterialList ( const Surface::MaterialList & pMaterialList)
pure virtual

◆ addMaterials()

virtual void Scene::addMaterials ( )
virtual

Reimplemented in ShadowMap.

◆ clearMaterialLists()

virtual void Scene::clearMaterialLists ( )
pure virtual

◆ createModel()

virtual void Scene::createModel ( )
virtual

◆ getAABoundingBox() [1/2]

Primitive3D::AABoundingBox Scene::getAABoundingBox ( )

◆ getAABoundingBox() [2/2]

Primitive3D::AABoundingBox Scene::getAABoundingBox ( GeometricBase * pObject)

◆ getCamera()

Camera * Scene::getCamera ( )
inline

◆ getFarZClip()

float Scene::getFarZClip ( )
inline

◆ getGeometricObject()

const GeometricBaseList & Scene::getGeometricObject ( )
inline

◆ getGeometricObjectSize()

uint Scene::getGeometricObjectSize ( )
inline

◆ getModel()

const Matrix4f & Scene::getModel ( GeometricBase * pObject)

◆ getNDCAABoundingBox() [1/2]

Primitive3D::AABoundingBox Scene::getNDCAABoundingBox ( )

◆ getNDCAABoundingBox() [2/2]

Primitive3D::AABoundingBox Scene::getNDCAABoundingBox ( GeometricBase * pObject)

◆ getNearZClip()

float Scene::getNearZClip ( )
inline

◆ getNodeModel()

const UnorderedMap< Node *, Matrix4f > & Scene::getNodeModel ( ) const
inline

◆ getProjectionMatrix()

const Matrix4f & Scene::getProjectionMatrix ( )
inline

◆ getViewMatrix()

const Matrix4f & Scene::getViewMatrix ( )
inline

◆ hasFrameBuffer()

bool Scene::hasFrameBuffer ( FrameBuffer * pFrameBuffer)

◆ hasGeometricObject()

bool Scene::hasGeometricObject ( GeometricBase * pObject)

◆ inDisplayArea() [1/2]

bool Scene::inDisplayArea ( )
Returns
True if this Scene is inside the display-area(bounds).

◆ inDisplayArea() [2/2]

bool Scene::inDisplayArea ( GeometricBase * pObject)
Returns
True if this GeometricBase object is inside the display-area(bounds).

◆ localToNdc()

Vertex3f Scene::localToNdc ( Vertex3f point)

Converts local(model) space coordinate to normalized-device coordinate.

◆ ndcToLocal()

Vertex3f Scene::ndcToLocal ( Vertex3f point,
float w )

Converts a normalized-device coordinate to local(model) space coordinate.

◆ project()

Vertex4f Scene::project ( const Vertex3f & vertex)

Transform a given vertex to clip-space for this view and projection.

Returns
The respective device(screen)-space coordinate for this Scene.

◆ queueGeometricObject() [1/2]

void Scene::queueGeometricObject ( GeometricBase * pObject)

Queue a GeometricObject to be added to this Scene, when all the objects Materials are initialized. This is a non-atomic operation.

Parameters
TheGeometricBase object containing at least 1 Material.

◆ queueGeometricObject() [2/2]

void Scene::queueGeometricObject ( Node * pObject)

Queue the Node object's GeometricBase children to be added to this Scene.

Parameters
TheGeometricBase object containing at least 1 Material.

◆ removeFrameBuffer()

void Scene::removeFrameBuffer ( FrameBuffer * pFrameBuffer)

◆ removeGeometricObject() [1/2]

virtual void Scene::removeGeometricObject ( GeometricBase * pObject)
virtual
Parameters
TheGeometricBase object containing at least 1 Material.

Reimplemented in Engine::Raster::ReflectionMap, Physical, and ShadowMap.

◆ removeGeometricObject() [2/2]

virtual void Scene::removeGeometricObject ( Node * pObject)
virtual

Remove the Node object's GeometricBase children from this Scene.

Parameters
TheGeometricBase object containing at least 1 Material.

◆ renderMaterial()

void Scene::renderMaterial ( Surface::Material * pMaterial)

◆ renderMaterialList()

void Scene::renderMaterialList ( Surface::MaterialList & pList,
Surface::MaterialSortFunction sortFunction,
float clipFactor = 1.0f )

◆ renderMaterialLists()

virtual void Scene::renderMaterialLists ( )
pure virtual

◆ setCamera()

void Scene::setCamera ( Camera * pCamera)

◆ unProject()

Vertex3f Scene::unProject ( const Vertex4f & vertex)

Undo a transform from clip-space for a given vertex for this view and projection.

Returns
The respective local-space coordinate from this Scene.

◆ updateCamera()

void Scene::updateCamera ( )

Friends And Related Symbol Documentation

◆ Engine::Application

friend class Engine::Application
friend

◆ Surface::Material::Initializer

friend struct Surface::Material::Initializer
friend

Member Data Documentation

◆ farZClip

float Scene::farZClip
protected

Far (Z-) clip plane. This is used to create the projection matrix.

◆ nearZClip

float Scene::nearZClip
protected

Near (Z+) clip plane. This is used to create the projection matrix.

◆ nodeModel

UnorderedMap< Node *, Matrix4f > Scene::nodeModel
protected

The composed model-matrix for each node.

◆ pCamera

Camera* Scene::pCamera
protected

Pointer to the scene camera.

◆ pFrameBuffer

List< FrameBuffer * > Scene::pFrameBuffer
protected

◆ pGeometricObject

GeometricBaseList Scene::pGeometricObject
protected

The nodes containing geometry and materials to render.

◆ projectionMatrix

Matrix4f Scene::projectionMatrix
protected

The projection applied to the corresponding object models and view.

◆ view

Matrix4f Scene::view
protected

The view for this scene. If no Camera exists for this scene pCamera will hold the address of view.


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