'\"! tbl | mmdoc '\"macro stdmacro .ie n \{\ . ds Cr \fB . ds Cb \fB .\} .el \{\ . ds Cr \f7 . ds Cb \f8 .\} .TH SoCamera(3IV) .SH NAME SoCamera \(em abstract base class for camera nodes .SH INHERITS FROM SoBase > SoFieldContainer > SoNode > SoCamera .SH SYNOPSIS .ps -1 \*(Cr#include .sp \*(Cr#define SO_ASPECT_SQUARE 1.00 .br \*(Cr#define SO_ASPECT_VIDEO 1.333333333 .br \*(Cr#define SO_ASPECT_35mm_ACADEMY 1.371 .br \*(Cr#define SO_ASPECT_16mm 1.369 .br \*(Cr#define SO_ASPECT_35mm_FULL 1.33333 .br \*(Cr#define SO_ASPECT_70mm 2.287 .br \*(Cr#define SO_ASPECT_CINEMASCOPE 2.35 .br \*(Cr#define SO_ASPECT_HDTV 1.777777777 .br \*(Cr#define SO_ASPECT_PANAVISION 2.361 .br \*(Cr#define SO_ASPECT_35mm 1.5 .br \*(Cr#define SO_ASPECT_VISTAVISION 2.301 .sp .in 0.5i \*(Crenum \*(CbViewportMapping\*(Cr { .in 1i .ta 25m .in 1.5i+25n .ti 1i .ta 25m .ds Pt \*(CbSoCamera::CROP_VIEWPORT_FILL_FRAME\f1 .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 1i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} Crops the viewport within the current window, so that the aspect ratio matches that of the camera. As the window size changes, the aspect ratio remains unchanged. The cropped region \&is drawn as a filled gray area. .br .in 1.5i+25n .ti 1i .ta 25m .ds Pt \*(CbSoCamera::CROP_VIEWPORT_LINE_FRAME\f1 .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 1i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} Crops the viewport, but draws a thin frame around the viewport .br .in 1.5i+25n .ti 1i .ta 25m .ds Pt \*(CbSoCamera::CROP_VIEWPORT_NO_FRAME\f1 .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 1i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} Crops the viewport, but gives no visual feedback as to the viewport dimensions within the window .br .in 1.5i+25n .ti 1i .ta 25m .ds Pt \*(CbSoCamera::ADJUST_CAMERA\f1 .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 1i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} Adjusts the camera aspect ratio and height to make it fit within the given window. (The camera's fields are not affected, just the values sent to the graphics library.) .br .in 1.5i+25n .ti 1i .ta 25m .ds Pt \*(CbSoCamera::LEAVE_ALONE\f1 .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 1i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} Do nothing. Camera image may become stretched out of proportion .br .in 0.5i \*(Cr} .sp .in 1i \f1Fields from class SoCamera: .in 0.5i .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFEnum .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbviewportMapping .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFVec3f .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbposition .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFRotation .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cborientation .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFFloat .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbaspectRatio .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFFloat .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbnearDistance .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFFloat .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbfarDistance .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFFloat .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbfocalDistance .sp .in 1i \f1Methods from class SoCamera: .in 0.5i .sp .ta 22m .in 1i+22n .ti 0.5i .ta 22m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=22n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbpointAt\*(Cr(const SbVec3f &targetPoint) .br .in 1i+22n .ti 0.5i .ta 22m .ds Pt \*(Crvirtual void .ie \w'\*(Pt'>=22n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbscaleHeight\*(Cr(float scaleFactor) .br .in 1i+22n .ti 0.5i .ta 22m .ds Pt \*(Crvirtual SbViewVolume .ie \w'\*(Pt'>=22n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetViewVolume\*(Cr(float useAspectRatio = 0.0) const .br .in 1i+22n .ti 0.5i .ta 22m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=22n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbviewAll\*(Cr(SoNode *sceneRoot, const SbViewportRegion &vpRegion, float slack = 1.0) .br .in 1i+22n .ti 0.5i .ta 22m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=22n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbviewAll\*(Cr(SoPath *path, const SbViewportRegion &vpRegion, float slack = 1.0) .br .in 1i+22n .ti 0.5i .ta 22m .ds Pt \*(CrSbViewportRegion .ie \w'\*(Pt'>=22n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetViewportBounds\*(Cr(const SbViewportRegion ®ion) const .br .in 1i+22n .ti 0.5i .ta 22m .ds Pt \*(Crstatic SoType .ie \w'\*(Pt'>=22n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetClassTypeId\*(Cr() .sp .in 1i \f1Methods from class SoNode: .in 0.5i .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetOverride\*(Cr(SbBool state) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbisOverride\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoNode * .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbcopy\*(Cr(SbBool copyConnections = FALSE) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual SbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbaffectsState\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crstatic SoNode * .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetByName\*(Cr(const SbName &name) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crstatic int .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetByName\*(Cr(const SbName &name, SoNodeList &list) .sp .in 1i \f1Methods from class SoFieldContainer: .in 0.5i .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetToDefaults\*(Cr() .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbhasDefaultValues\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbfieldsAreEqual\*(Cr(const SoFieldContainer *fc) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbcopyFieldValues\*(Cr(const SoFieldContainer *fc, SbBool copyConnections = FALSE) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbset\*(Cr(const char *fieldDataString) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbget\*(Cr(SbString &fieldDataString) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual int .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetFields\*(Cr(SoFieldList &resultList) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual SoField * .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetField\*(Cr(const SbName &fieldName) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetFieldName\*(Cr(const SoField *field, SbName &fieldName) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbisNotifyEnabled\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbenableNotify\*(Cr(SbBool flag) .sp .in 1i \f1Methods from class SoBase: .in 0.5i .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbref\*(Cr() .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbunref\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbunrefNoDelete\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbtouch\*(Cr() .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual SoType .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetTypeId\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbisOfType\*(Cr(SoType type) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual void .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetName\*(Cr(const SbName &name) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual SbName .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetName\*(Cr() const .sp .SH DESCRIPTION This is the abstract base class for all camera nodes. It defines the common methods and fields that all cameras have. Cameras are used to view a scene. When a camera is encountered during rendering, it \&sets the projection and viewing matrices and viewport appropriately; it does not draw geometry. Cameras should be placed before any shape nodes or light nodes in a scene graph; otherwise, those shapes \&or lights cannot be rendered properly. Cameras are affected by the current transformation, so you can position a camera by placing a transformation node before it in the scene graph . The default position \&and orientation of a camera is at (0,0,1) looking along the negative z-axis. .sp You can also use a node kit to create a camera; see the reference page for \*(CbSoCameraKit\f1. .SH FIELDS .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFEnum .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbviewportMapping .br .in 1i \f1Defines how to map the rendered image into the current viewport, when the aspect ratio of the camera differs from that of the viewport. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFVec3f .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbposition .br .in 1i \f1The location of the camera viewpoint. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFRotation .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cborientation .br .in 1i \f1The orientation of the camera viewpoint, defined as a rotation of the viewing direction from its default (0,0,-1) vector. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFFloat .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbaspectRatio .br .in 1i \f1The ratio of camera viewing width to height. This value must be greater than 0.0. There are several standard camera aspect ratios defined in \*(CbSoCamera.h\f1. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFFloat .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbnearDistance .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFFloat .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbfarDistance .br .in 1i \f1The distance from the camera viewpoint to the near and far clipping planes. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFFloat .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbfocalDistance .br .in 1i \f1The distance from the viewpoint to the point of focus. This is typically ignored during rendering, but may be used by some viewers to define a point of interest. .sp .in 0.5i .SH METHODS .ta 22m .in 1i+22n .ti 0.5i .ta 22m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=22n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbpointAt\*(Cr(const SbVec3f &targetPoint) .br .in 1i \f1Sets the orientation of the camera so that it points toward the given target point while keeping the "up" direction of the camera parallel to the positive y-axis. If this is not possible, it uses the positive \&z-axis as "up." .sp .in 0.5i .in 1i+22n .ti 0.5i .ta 22m .ds Pt \*(Crvirtual void .ie \w'\*(Pt'>=22n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbscaleHeight\*(Cr(float scaleFactor) .br .in 1i \f1Scales the height of the camera. Perspective cameras scale their \*(CbheightAngle\f1 fields, and orthographic cameras scale their \*(Cbheight\f1 fields. .sp .in 0.5i .in 1i+22n .ti 0.5i .ta 22m .ds Pt \*(Crvirtual SbViewVolume .ie \w'\*(Pt'>=22n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetViewVolume\*(Cr(float useAspectRatio = 0.0) const .br .in 1i \f1Returns a view volume structure, based on the camera's viewing parameters. If the \*(CruseAspectRatio\f1 argument is not 0.0 (the default), the camera uses that ratio instead of the one it has. .sp .in 0.5i .in 1i+22n .ti 0.5i .ta 22m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=22n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbviewAll\*(Cr(SoNode *sceneRoot, const SbViewportRegion &vpRegion, float slack = 1.0) .br .in 1i+22n .ti 0.5i .ta 22m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=22n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbviewAll\*(Cr(SoPath *path, const SbViewportRegion &vpRegion, float slack = 1.0) .br .in 1i \f1Sets the camera to view the scene rooted by the given node or defined by the given path. The near and far clipping planes will be positioned \*(Crslack\f1 bounding sphere radii away from the bounding box's center. A \&value of 1.0 will make the clipping planes the tightest around the bounding sphere. .sp .in 0.5i .in 1i+22n .ti 0.5i .ta 22m .ds Pt \*(CrSbViewportRegion .ie \w'\*(Pt'>=22n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetViewportBounds\*(Cr(const SbViewportRegion ®ion) const .br .in 1i \f1Returns the viewport region this camera would use to render into the given viewport region, accounting for cropping. .sp .in 0.5i .in 1i+22n .ti 0.5i .ta 22m .ds Pt \*(Crstatic SoType .ie \w'\*(Pt'>=22n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetClassTypeId\*(Cr() .br .in 1i \f1Returns type identifier for this class. .sp .in 0.5i .SH FILE FORMAT/DEFAULTS This is an abstract class. See the reference page of a derived class for the format and default values. .SH SEE ALSO \*(CbSoOrthographicCamera, SoPerspectiveCamera, SoCameraKit