![]() |
scg3
0.6
|
A camera with orthographic projection(composite node). More...
#include "OrthographicCamera.h"
Public Member Functions | |
| OrthographicCamera () | |
| virtual | ~OrthographicCamera () |
| void | init (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat near, GLfloat far) |
| virtual void | updateProjection () |
Public Member Functions inherited from scg::Camera | |
| Camera () | |
| virtual | ~Camera () |
| virtual const glm::mat4 & | getProjection () |
| virtual const glm::mat4 & | getViewTransform (RenderState *renderState) |
| const glm::vec3 & | getPosition () const |
| Camera * | setPosition (const glm::vec3 &position) |
| const glm::quat & | getOrientation () const |
| Camera * | setOrientation (const glm::quat &orientation) |
| const glm::vec3 & | getViewDirection () const |
| GLfloat | getCenterDist () const |
| virtual Camera * | setMatrix (const glm::mat4 &matrix) |
| virtual Camera * | translate (glm::vec3 translation) |
| virtual Camera * | rotateRad (GLfloat angleRad, glm::vec3 axis) |
| virtual Camera * | rotate (GLfloat angleDeg, glm::vec3 axis) |
| virtual Camera * | scale (glm::vec3 scaling) |
| Camera * | dolly (GLfloat distance) |
| Camera * | rotateAzimuthRad (GLfloat angleRad) |
| Camera * | rotateAzimuth (GLfloat angleDeg) |
| Camera * | rotateElevationRad (GLfloat angleRad) |
| Camera * | rotateElevation (GLfloat angleDeg) |
| Camera * | rotatePitchRad (GLfloat angleRad) |
| Camera * | rotatePitch (GLfloat angleDeg) |
| Camera * | rotateRollRad (GLfloat angleRad) |
| Camera * | rotateRoll (GLfloat angleDeg) |
| Camera * | rotateYawRad (GLfloat angleRad) |
| Camera * | rotateYaw (GLfloat angleDeg) |
| bool | isDrawCenter () const |
| Camera * | setDrawCenter (bool isDrawCenter) |
| void | accept (Traverser *traverser) |
| virtual void | acceptPost (Traverser *traverser) |
| virtual void | render (RenderState *renderState) |
| virtual void | renderPost (RenderState *renderState) |
Public Member Functions inherited from scg::Transformation | |
| Transformation () | |
| virtual | ~Transformation () |
| const glm::mat4 & | getMatrix () const |
Public Member Functions inherited from scg::Composite | |
| Composite () | |
| virtual | ~Composite ()=0 |
| virtual void | destroy () |
| Composite * | addChild (NodeSP child) |
| Composite * | removeChild (Node *node, bool &result) |
| Composite * | removeChild (Node *node) |
| virtual void | traverse (Traverser *traverser) |
Public Member Functions inherited from scg::Node | |
| Node () | |
| virtual | ~Node ()=0 |
| virtual void | clear () |
| int | getNCores () const |
| const std::string & | getMetaInfo (const std::string &key) const |
| void | setMetaInfo (const std::string &key, const std::string &value) |
| bool | isVisible () const |
| void | setVisible (bool isVisible=true) |
Static Public Member Functions | |
| static OrthographicCameraSP | create () |
Static Public Member Functions inherited from scg::Transformation | |
| static TransformationSP | create () |
Protected Attributes | |
| GLfloat | left_ |
| GLfloat | right_ |
| GLfloat | bottom_ |
| GLfloat | top_ |
| GLfloat | near_ |
| GLfloat | far_ |
Protected Attributes inherited from scg::Camera | |
| glm::mat4 | projection_ |
| glm::mat4 | viewTransform_ |
| glm::vec3 | eyePt_ |
| glm::vec3 | centerPt_ |
| GLfloat | centerDist_ |
| glm::vec3 | viewDir_ |
| glm::vec3 | upDir_ |
| glm::vec3 | rightDir_ |
| glm::quat | orientation_ |
| bool | isDrawCenter_ |
Protected Attributes inherited from scg::Transformation | |
| glm::mat4 | matrix_ |
Protected Attributes inherited from scg::Composite | |
| NodeSP | leftChild_ |
Protected Attributes inherited from scg::Node | |
| NodeSP | rightSibling_ |
| Composite * | parent_ |
| std::vector< CoreSP > | cores_ |
| bool | isVisible_ |
| std::unordered_map< std::string, std::string > | metaInfo_ |
Additional Inherited Members | |
Protected Member Functions inherited from scg::Camera | |
| virtual void | update_ () |
Protected Member Functions inherited from scg::Node | |
| void | addSibling_ (NodeSP sibling) |
| void | removeSibling_ (Node *node, bool &result) |
| void | processCores_ (RenderState *renderState) |
| void | postProcessCores_ (RenderState *renderState) |
A camera with orthographic projection(composite node).
See Camera base class for further information.
Initial parameters:
Definition at line 47 of file OrthographicCamera.h.
| scg::OrthographicCamera::OrthographicCamera | ( | ) |
|
virtual |
|
static |
Create shared pointer.
| void scg::OrthographicCamera::init | ( | GLfloat | left, |
| GLfloat | right, | ||
| GLfloat | bottom, | ||
| GLfloat | top, | ||
| GLfloat | near, | ||
| GLfloat | far | ||
| ) |
Initialize orthographic projection. Aspect ratio is determined in updateProjection() from current viewport dimensions, left and right borders are adjusted to comply with aspect ratio.
| left | left border |
| right | right border |
| bottom | bottom border |
| top | top border |
| near | near distance |
| far | far distance |
|
virtual |
Update projection matrix from current viewport dimensions, called by Renderer::render() (or derived class) if window has been resized.
Implements scg::Camera.
|
protected |
Definition at line 85 of file OrthographicCamera.h.
|
protected |
Definition at line 88 of file OrthographicCamera.h.
|
protected |
Definition at line 83 of file OrthographicCamera.h.
|
protected |
Definition at line 87 of file OrthographicCamera.h.
|
protected |
Definition at line 84 of file OrthographicCamera.h.
|
protected |
Definition at line 86 of file OrthographicCamera.h.