Rasterfarm-SDK
Loading...
Searching...
No Matches
Ortho Class Reference

#include <ortho.h>

Inheritance diagram for Ortho:
Display Scene DynamicType ShadowMap

Classes

class  Attribute
 

Public Member Functions

 Ortho (const Attribute &attribute=Attribute(), float nearZClip=0.0f, float farZClip=100.0f)
 
const AttributegetAttribute ()
 
Matrix4f createFullView (GeometricBase *pObject)
 
- Public Member Functions inherited from Display
 Display (const Matrix4f &projectionMatrix, float nearZClip, float farZClip)
 
virtual void addMaterialList (const Surface::MaterialList &pMaterial)
 
virtual void renderMaterialLists ()
 
virtual void clearMaterialLists ()
 
void addPreprocessor (Scene *pScene)
 
void removePreprocessor (Scene *pScene)
 
- Public Member Functions inherited from Scene
 Scene (const Matrix4f &projectionMatrix, float nearZClip, float farZClip)
 
virtual ~Scene ()
 
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
 

Static Public Member Functions

static Matrix4f createMatrix (float left, float right, float bottom, float top, float nearZClip, float farZClip)
 
static Matrix4f createMatrix (float aspectRatio=Application::getAspectRatio(), float scale=1.0f, float nearZClip=0.0f, float farZClip=1.0f)
 
static Matrix4f createFullView (Primitive2D::AABoundingBox box, Matrix4f projectionMatrix)
 

Protected Attributes

Attribute attribute
 
- Protected Attributes inherited from Scene
float nearZClip
 
float farZClip
 
Matrix4f view
 
Matrix4f projectionMatrix
 
Camera * pCamera
 
GeometricBaseList pGeometricObject
 
UnorderedMap< Node *, Matrix4fnodeModel
 
List< FrameBuffer * > pFrameBuffer
 

Additional Inherited Members

- Public Types inherited from Scene
typedef List< GeometricBase * > GeometricBaseList
 
- Public Attributes inherited from Display
Surface::MaterialList pOpaqueMaterialList
 
Surface::MaterialList pTransparentMaterialList
 
Application::SceneList pPreprocessor
 
- Protected Member Functions inherited from Scene
virtual void addGeometricObject (GeometricBase *pObject)
 

Constructor & Destructor Documentation

◆ Ortho()

Ortho::Ortho ( const Attribute & attribute = Attribute(),
float nearZClip = 0.0f,
float farZClip = 100.0f )

Member Function Documentation

◆ createFullView() [1/2]

Matrix4f Ortho::createFullView ( GeometricBase * pObject)

Calculate the view-transform needed to rasterize an object in full-view, constrained to the Scene's projection. The transform returned is the translation needed to center the object for optimal view.

Parameters
Apointer to the GeometricObject for computation of transform.
Returns
The tranformation-matrix(translation) for rasterizing the object in full-view.

◆ createFullView() [2/2]

static Matrix4f Ortho::createFullView ( Primitive2D::AABoundingBox box,
Matrix4f projectionMatrix )
static

Calculate the view-transform needed to rasterize an axis-alligned bounding-box in full-view, constrained to the Scene's projection. The transform returned is the translation needed to center the object for optimal view.

Parameters
Anaxis-alligned bounding-box for computation of transform.
Returns
The tranformation-matrix(translation) for rasterizing the object in full-view.

◆ createMatrix() [1/2]

static Matrix4f Ortho::createMatrix ( float aspectRatio = Application::getAspectRatio(),
float scale = 1.0f,
float nearZClip = 0.0f,
float farZClip = 1.0f )
static

Ortho transform on object's current matrix. NOTE: Ortho transform doesn't calculate z-Depth perspective.

Parameters
Aspectof the matrix, width-to-height ratio.
Thescale of the matrix.
nearZx+ limit.
nearZx- limit.
Returns
resulting matrix.

◆ createMatrix() [2/2]

static Matrix4f Ortho::createMatrix ( float left,
float right,
float bottom,
float top,
float nearZClip,
float farZClip )
static

Ortho transform on object's current matrix. NOTE: Ortho transform doesn't calculate z-Depth perspective.

Parameters
Left-xclip-plane, value must != right-x.
Right-xclip-plane, value must != left-x.
Bottom-yclip-plane, value must != top-y.
Top-yclip-plane, value must != bottom-y.
Near-zclip-plane, value must be > 0.
Far-zclip-plane, value must be > near-z.
Returns
Resulting matrix.

◆ getAttribute()

const Attribute & Ortho::getAttribute ( )
inline

Member Data Documentation

◆ attribute

Attribute Ortho::attribute
protected

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