User Tools

Site Tools


DzBasicCamera

A basic camera.

More...

Inherits :

Inherited By : DzShaderCamera

Properties

Constructors

DAZ Script
DzBasicCamera ( DzCamera::CameraType type=DzCamera::PERSPECTIVE_CAMERA, Boolean isViewCamera=false )

Methods

DAZ Script
BooleanapplyDimensionsPreset ( String preset )
DzVec3cursorToRay ( Number x, Number y )
DzVec3cursorToScene ( Number x, Number y, Number z )
DzFloatPropertygetApertureBladeRotationAngleControl ()
DzIntPropertygetApertureNumBladesControl ()
DzBoolPropertygetDepthOfFieldChannel ()
BooleangetDimensionsPreset ( String preset, DzSettings settings )
DzBoolPropertygetDisplayPersistenceChannel ()
DzColorPropertygetDofColorChannel ()
DzColorPropertygetDofOverlayColorChannel ()
DzFloatPropertygetDofOverlayOpacityChannel ()
DzBoolPropertygetDofVisibilityChannel ()
DzBoolPropertygetFarDofVisibilityChannel ()
DzFloatPropertygetFocalDistChannel ()
DzFloatPropertygetFocalLengthChannel ()
DzFloatPropertygetFocalPointScaleChannel ()
DzColorPropertygetFovColorChannel ()
DzFloatPropertygetFovLengthChannel ()
DzFloatPropertygetFovOpacityChannel ()
DzFloatPropertygetFrameWidthChannel ()
DzFloatPropertygetFStopChannel ()
DzFloatPropertygetHeadlampIntensityControl ()
DzFloatPropertygetLensDistortionK1Control ()
DzFloatPropertygetLensDistortionK2Control ()
DzFloatPropertygetLensDistortionK3Control ()
DzFloatPropertygetLensDistortionScaleControl ()
DzEnumPropertygetLensDistortionTypeControl ()
DzFloatPropertygetLensRadialBiasControl ()
DzFloatPropertygetLensShiftXControl ()
DzFloatPropertygetLensShiftYControl ()
DzFloatPropertygetLensStereoOffsetControl ()
DzFloatPropertygetLensThicknessControl ()
DzBoolPropertygetNearDofVisibilityChannel ()
DzFloatPropertygetSightLineOpacityChannel ()
BooleanisAtDefaultSceneCameraValues ()
BooleanisDefaultSceneCamera ()
voidsetIsDefaultSceneCamera ( Boolean yesNo )
voidsetType ( DzCamera::CameraType type )

Signals

Detailed Description

This is the basic camera implementation for DAZ Studio. It supplies commonly-used features like focal length adjustment and depth of field alteration.

Properties


Number : currentViewHeight

Holds the current height of the view. (Read Only)


Number : currentViewWidth

Holds the current width of the view. (Read Only)


Boolean : depthOfField

Holds whether or not the camera performs depth of field calculations.


Number : fStop

Holds the f/stop of the camera.


Boolean : isPerspective

Holds whether or the camera is a perspective or orthographic view.


Boolean : useActiveViewport

Holds whether or not the local dimensions will use the active viewport when enabled. (since 4.9.3.108)

Constructors


DzBasicCamera( DzCamera::CameraType type=DzCamera::PERSPECTIVE_CAMERA, Boolean isViewCamera=false )

Create a camera of the given type.

Parameter(s):

  • 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 and is non-animatable. If false, the camera is a normal camera that is a member of the scene.

Example:

// 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 );

Methods


Boolean : applyDimensionsPreset( String preset )

Applies the settings in a dimensions preset.

Parameter(s):

  • preset - The name of the preset to retrieve the settings for. An empty string is interpreted to mean “Custom.”

Return Value:

  • if preset was found, otherwise false.

Since:

  • 4.9.3.108

DzVec3 : cursorToRay( Number x, Number y )

A ray through the scene for a perspective view.

Parameter(s):

  • x - The x position of the cursor in the viewport.
  • y - The y position of the cursor in the viewport.

Return Value:

  • A directional vector that defines a ray that intersects the camera's center point.

DzVec3 : cursorToScene( Number x, Number y, Number z )

Calculates a location in the scene based on an x, y position in the viewport and distance from the camera.

Parameter(s):

  • 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.

Return Value:

  • A positional vector that represents the resulting location in the scene.

DzFloatProperty : getApertureBladeRotationAngleControl()

Return Value:

  • The angle of the aperture blades for the camera.

Since:

  • 4.9.3.121

DzIntProperty : getApertureNumBladesControl()

Return Value:

  • The number of aperture blades for the camera.

Since:

  • 4.9.3.121

DzBoolProperty : getDepthOfFieldChannel()

Return Value:

  • The depth of field property for the camera.

Boolean : getDimensionsPreset( String preset, DzSettings settings )

Retrieves the settings of a dimensions preset.

Parameter(s):

  • preset - The name of the preset to retrieve the settings for. An empty string is interpreted to mean “Custom.”
  • settings - The settings object that the settings will be assigned to.

Return Value:

  • if preset was found, otherwise false.

Since:

  • 4.9.3.108

DzBoolProperty : getDisplayPersistenceChannel()

Return Value:

  • The Display Persistence property for the camera.

DzColorProperty : getDofColorChannel()

Return Value:

  • The DOF Color property for the camera.

DzColorProperty : getDofOverlayColorChannel()

Return Value:

  • The DOF Overlay Color property for the camera.

DzFloatProperty : getDofOverlayOpacityChannel()

Return Value:

  • The DOF Overlay Opacity property for the camera.

DzBoolProperty : getDofVisibilityChannel()

Return Value:

  • The DOF Visibility property for the camera.

DzBoolProperty : getFarDofVisibilityChannel()

Return Value:

  • The Far DOF Visibility property for the camera.

DzFloatProperty : getFocalDistChannel()

Return Value:

  • The depth of field property for this camera.

DzFloatProperty : getFocalLengthChannel()

Return Value:

  • The focal length property for this camera.

DzFloatProperty : getFocalPointScaleChannel()

Return Value:

  • The Focal Point Scale property for the camera.

DzColorProperty : getFovColorChannel()

Return Value:

  • The FOV Color property for the camera.

DzFloatProperty : getFovLengthChannel()

Return Value:

  • The FOV Length property for the camera.

DzFloatProperty : getFovOpacityChannel()

Return Value:

  • The FOV Opacity property for the camera.

DzFloatProperty : getFrameWidthChannel()

Return Value:

  • The frame size property for this camera.

Since:

  • 4.6.4.67

DzFloatProperty : getFStopChannel()

Return Value:

  • The f/stop property for this camera.

DzFloatProperty : getHeadlampIntensityControl()

Return Value:

  • The Headlamp Intensity property for the camera.

Since:

  • 4.7.1.94

DzFloatProperty : getLensDistortionK1Control()

Return Value:

  • The camera lens k1 for the camera.

See Also:

Since:

  • 4.9.3.121

DzFloatProperty : getLensDistortionK2Control()

Return Value:

  • The camera lens k2 for the camera.

See Also:

Since:

  • 4.9.3.121

DzFloatProperty : getLensDistortionK3Control()

Return Value:

  • The camera lens k3 for the camera.

See Also:

Since:

  • 4.9.3.121

DzFloatProperty : getLensDistortionScaleControl()

Return Value:

  • The camera distortion scale for the camera.

Since:

  • 4.9.3.121

DzEnumProperty : getLensDistortionTypeControl()

Return Value:

  • The camera lens distortion type for the camera.
	"none" ? no distortion.
 
	"spherical" ? Conventional spherical camera mapping.
 
	"cylindrical" ? Conventional cylindrical camera mapping.
 
	"poly3" ? Third order radial distortion model: rd = ru * (1 - k1 + k1 * ru2)
 
	"inv_poly3" ? Third order inverse radial distortion model: ru = rd * (1 - k1 + k1 * rd2)
 
	"poly5" ? Fifth order radial distortion model: rd = ru * (1 + k1 * ru2 + k2 * ru4)
 
	"inv_poly5" ? Fifth order inverse radial distortion model: ru = rd * (1 + k1 * rd2 + k2 * rd4)
 
	"ptlens" ? Fourth order radial distortion model: rd = ru * (1 - k1 - k2 - k3 + k1 * ru + k2 * ru2 + k3 * ru3)
 
	"inv_ptlens" ? Fourth order inverse radial distortion model: ru = rd * (1 - k1 - k2 - k3 + k1 * rd + k2 * rd2 + k3 * rd3)

See Also:

Since:

  • 4.9.3.121

DzFloatProperty : getLensRadialBiasControl()

Return Value:

  • The camera lens radial bias property for the camera.

Since:

  • 4.9.3.121

DzFloatProperty : getLensShiftXControl()

Return Value:

  • The camera lens shift x property for the camera in mm.

Since:

  • 4.9.3.121

DzFloatProperty : getLensShiftYControl()

TODO: Add description.


DzFloatProperty : getLensStereoOffsetControl()

TODO: Add description.


DzFloatProperty : getLensThicknessControl()

Return Value:

  • The camera lens thickness property for the camera. Thickness is in mm.

Since:

  • 4.8.0.16

DzBoolProperty : getNearDofVisibilityChannel()

Return Value:

  • The Near DOF Visibility property for the camera.

DzFloatProperty : getSightLineOpacityChannel()

Return Value:

  • The Sight Line Opacity property for the camera.

Boolean : isAtDefaultSceneCameraValues()

Return Value:

  • true if this camera is at default scene camera values, otherwise false.

Boolean : isDefaultSceneCamera()

Return Value:

  • true if this camera is the default scene camera, otherwise false.

void : setIsDefaultSceneCamera( Boolean yesNo )

Parameter(s):

  • yesNo - If true, sets this camera as the default scene camera.

Attention:

  • Assigning more than one camera as the default scene camera will not be preserved across save/load sequences.

void : setType( DzCamera::CameraType type )

Changes the type of the camera.

Parameter(s):

  • type - The new type for the camera.

Signals


void : depthOfFieldChanged()

Signature:“projectionChanged()”

Emitted when the camera's depth of field setting has changed.


void : fStopChanged( DzTimeRange range )

Signature:“fStopChanged(const DzTimeRange&)”

Emitted when the camera's f-Stop setting has changed.