Inheritance diagram for DzBasicCamera:
This is the basic camera implementation for DAZ Studio. It supplies commonly-used features like focal length adjustment and depth of field alteration.
DzBasicCamera::DzBasicCamera | ( | DzCamera::CameraType | type = DzCamera::PERSPECTIVE_CAMERA , |
|
Boolean | isViewCamera = false | |||
) |
Create a camera of the given type. If isViewCam is true, then the camera will be non-animatable.
type | The type of the camera | |
isViewCamera | If true, the camera is a view camera - that is, it only exists as a camera for the purpose of viewing the scene, but is not a member of the scene. If false, the camera is a normal camera that is a member of the scene. |
// Create a new orthographic camera that looks forward on the Z axis. DzCamera *cam = new DzBasicCamera( DzCamera::FRONT_CAMERA ); // Name the camera and add it to the scene cam->setName( "My Camera" ); dzScene->addNode( cam );
void DzBasicCamera::aimAt | ( | DzVec3 | pos | ) |
Rotates the camera and adjusts its focal distance so that its focal point is at the given point.
pos | The point to aim the camera at. |
Reimplemented from DzCamera.
A ray through the scene for a perspective view
x | The x position of the cursor in the viewport | |
y | The y position of the cursor in the viewport |
Calculates a location in the scene based on an x, y position in the viewport and distance from the camera.
x | The x coordinate of the cursor in the viewport | |
y | The y coordinate of the cursor in the viewport | |
z | The distance from the camera in world space at which to calculate the target point. |
void DzBasicCamera::depthOfFieldChanged | ( | ) | [signal] |
Signature: "projectionChanged()"
Emitted when the camera's depth of field setting has changed.
Translates the camera so that its view frames the given box, and sets the camera's focal point to the center of the box, given the aspect ratio of the current view (w / h)
box | The bounding box to frame in the camera's view | |
aspect | The aspect ratio of the current view. |
Reimplemented from DzCamera.
void DzBasicCamera::fStopChanged | ( | DzTimeRange | range | ) | [signal] |
Signature: "fStopChanged(const DzTimeRange&)"
Emitted when the camera's f-Stop setting has changed.
DzBoolProperty DzBasicCamera::getDepthOfFieldChannel | ( | ) |
DzBoolProperty DzBasicCamera::getDisplayPersistenceChannel | ( | ) |
DzColorProperty DzBasicCamera::getDofColorChannel | ( | ) |
DzColorProperty DzBasicCamera::getDofOverlayColorChannel | ( | ) |
DzColorProperty DzBasicCamera::getDofOverlayOpacityChannel | ( | ) |
DzBoolProperty DzBasicCamera::getDofVisibilityChannel | ( | ) |
DzBoolProperty DzBasicCamera::getFarDofVisibilityChannel | ( | ) |
DzFloatProperty DzBasicCamera::getFocalDistChannel | ( | ) |
DzFloatProperty DzBasicCamera::getFocalLengthChannel | ( | ) |
DzFloatProperty DzBasicCamera::getFocalPointScaleChannel | ( | ) |
DzColorProperty DzBasicCamera::getFovColorChannel | ( | ) |
DzFloatProperty DzBasicCamera::getFovLengthChannel | ( | ) |
DzFloatProperty DzBasicCamera::getFovOpacityChannel | ( | ) |
DzFloatProperty DzBasicCamera::getFStopChannel | ( | ) |
DzBoolProperty DzBasicCamera::getNearDofVisibilityChannel | ( | ) |
DzFloatProperty DzBasicCamera::getSightLineOpacityChannel | ( | ) |
void DzBasicCamera::reset | ( | ) |
Resets the camera to its default settings.
Reimplemented from DzCamera.
void DzBasicCamera::setType | ( | DzCamera::CameraType | type | ) |
Changes the type of the camera.
type | The new type for the camera. |
DzMainWindow *mw = dzApp->getInterface(); if( mw ){ // Get the active camera from the active viewport DzCamera *cam = mw->getViewportMgr()->getActiveViewport()->get3DViewport()->getActiveCamera(); if( cam->inherits( "DzBasicCamera" ) ){ // If the camera is a basic camera, make it a perspective view. ((DzBasicCamera*)cam)->setType( DzCamera::PERSPECTIVE_CAMERA ); } }
This property holds the current height of the view (Read Only)
This property holds the current width of the view (Read Only)
This property determines whether the camera performs depth of field calculations.
This property holds the f/stop of the camera.
This property determines whether the camera is a persective or orthographic view.