#include <Inventor/nodes/SoOrthographicCamera.h>
Inheritance diagram for SoOrthographicCamera::
Public Methods | |
SoOrthographicCamera (void) | |
virtual void | scaleHeight (float scalefactor) |
virtual SbViewVolume | getViewVolume (float useaspectratio=0.0f) const |
Static Public Methods | |
void | initClass (void) |
Public Attributes | |
SoSFFloat | height |
Protected Methods | |
virtual | ~SoOrthographicCamera () |
virtual void | viewBoundingBox (const SbBox3f &box, float aspect, float slack) |
Orthographic rendering will not give a particularly realistic impression of the scene, but is for various reasons widely used in applications for Computer Aided Design.
|
Constructor. |
|
Destructor. |
|
Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system. Reimplemented from SoCamera. |
|
Scale SoOrthographicCamera::height by multiplying with scalefactor. Reimplemented from SoCamera. |
|
Returns total view volume covered by the camera under the current settings. This view volume is not adjusted to account for viewport mapping. If you want the same view volume as the one used during rendering, you should do something like this:
SbViewVolume vv; float aspectratio = myviewport.getViewportAspectRatio(); switch (camera->viewportMapping.getValue()) { case SoCamera::CROP_VIEWPORT_FILL_FRAME: case SoCamera::CROP_VIEWPORT_LINE_FRAME: case SoCamera::CROP_VIEWPORT_NO_FRAME: vv = camera->getViewVolume(0.0f); break; case SoCamera::ADJUST_CAMERA: vv = camera->getViewVolume(aspectratio); if (aspectratio < 1.0f) vv.scale(1.0f / aspectratio); break; case SoCamera::LEAVE_ALONE: vv = camera->getViewVolume(0.0f); break; default: assert(0 && "unknown viewport mapping"); break; } Also, for the CROPPED viewport mappings, the viewport might be changed if the viewport aspect ratio is not equal to the camera aspect ratio. See SoCamera::getView() to see how this is done. Reimplemented from SoCamera. |
|
Convenience method for setting up the camera definition to cover the given bounding box with the given aspect ratio. Multiplies the exact dimensions with a slack factor to have some space between the rendered model and the borders of the rendering area. If you define your own camera node class, be aware that this method should not set the orientation field of the camera, only the position, focal distance and near and far clipping planes. Reimplemented from SoCamera. |
|
Height of viewport in world-space scale. Defaults to 2.0 units. |