#include <sglOrthographicCamera.hpp>
Inheritance diagram for sglOrthographicCamera::
Public Methods | |
sglOrthographicCamera () | |
virtual | ~sglOrthographicCamera () |
void | setOrtho (double left, double right, double bottom, double top, double near_clip=-1.0, double far_clip=1.0) |
void | getOrtho (double &left, double &right, double &bottom, double &top, double &near_clip, double &far_clip) const |
virtual void | applyProjection () const |
virtual void | printInfo (ostream &ostrm, const char *indent_string) const |
Protected Methods | |
sglOrthographicCamera (const sglOrthographicCamera &) | |
sglOrthographicCamera& | operator= (const sglOrthographicCamera &) |
void | buildFrustum () |
Protected Attributes | |
double | m_left |
double | m_right |
double | m_bottom |
double | m_top |
Example:
sglOrthographicCamera *view_camera = new sglOrthographicCamera; view_camera->setOrtho(-10.0, 10.0, -8.0, 8.0, 1.0, 200.0); // OR (sets near/far to -1.0, 1.0) view_camera->setOrtho(-10.0, 10.0, -8.0, 8.0);
Definition at line 50 of file sglOrthographicCamera.hpp.
|
default constructor.
|
|
virtual destructor.
|
|
Set the orthographic projection parameters. These are the same as the arguments to the glOrtho command. The lower left and upper right positions on the near clip plane are defined as (left, bottom, -near) and (right, bottom, -near). The eyepoint position is at the origin. Default values of -1 and 1 for near_clip and far_clip allow this function to behave like gluOrtho2D if the user omits these two parameters.
|
|
Query the current orthographic parameters. The user passes in references to doubles to get the values. |
|
Setup the OpenGL projection matrix to match the specified frustum. This function leaves the glMatrixMode(GL_PROJECTION) in effect (current) upon return. Reimplemented from sglCamera. |
|
Output the state of this node to the specified ostream.
Reimplemented from sglCamera. |