Public Member Functions | Public Attributes | Static Public Attributes

FBCamera Class Reference

This reference page is linked to from the following overview topics: MotionBuilder 2014, Scene Elements, FBModel - Transformation Data and the Scene Graph, FBCamera - Cameras.


Search for all occurrences

Detailed Description

Creates custom cameras and manages system cameras.

When you look at a scene in the MotionBuilder Viewer, you are using a camera view.

There are two types of cameras:

The SystemCamera property indicates whether a given camera is a producer or a custom camera.

When you create a camera you should make it visible with the show property (inherited from FBModel).

Use FBCameraSwitcher to get and set the current camera. For usage, see the Python sample CameraSwitcher.py.

To see how to create a camera with a marker as an interest, see the Python sample code in FBCamera.py. For usage in C++, see the manipcamera sample.

Definition at line 205 of file fbcamera.h.

#include <fbcamera.h>

Inheritance diagram for FBCamera:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 FBCamera (const char *pName, HIObject pObject=NULL)
 Constructor.
K_DEPRECATED_2014 double * GetMatrix (FBCameraMatrixType pType)
 Obtains the camera's matrix.
void GetCameraMatrix (FBMatrix &pMatrix, FBCameraMatrixType pType, FBEvaluateInfo *pEvalInfo=NULL)
 Obtains the camera's matrix.
FBVector4d InverseProjection (int pX, int pY, double pDistanceFromCamera, bool pRelativeToViewport=false)
 Returns the world coordinates based on screen coordinates and input distance from the camera.

Public Attributes

FBPropertyBool SystemCamera
 Read Only Property: Indicate if this a producer (default or system) camera or a custom (user-created) camera.
FBPropertyCameraFrameSizeMode FrameSizeMode
 Read Write Property: Frame size standard mode.
FBPropertyCameraResolutionMode ResolutionMode
 Read Write Property: Resolution standard mode.
FBPropertyDouble ResolutionWidth
 Read Write Property: Resolution width.
FBPropertyDouble ResolutionHeight
 Read Write Property: Resolution height.
FBPropertyDouble WindowWidth
 Read Only Property: Window width.
FBPropertyDouble WindowHeight
 Read Only Property: Window height.
FBPropertyDouble PixelAspectRatio
 Read Write Property: Pixel aspect ratio.
FBPropertyDouble NearPlaneDistance
 Read Write Property: Near plane distance.
FBPropertyDouble FarPlaneDistance
 Read Write Property: Far plane distance.
FBPropertyBool MouseLockCamera
 Read Write Property: Mouse lock for camera?
FBPropertyCameraType Type
 Read Write Property: Type of camera
FBPropertyCameraApertureMode ApertureMode
 Read Write Property: Aperture mode.
FBPropertyAnimatableDouble FieldOfView
 Read Write Property: Field of View (used when in horizontal or vertical aperture modes).
FBPropertyAnimatableDouble FieldOfViewX
 Read Write Property: Field of View X angle (used in horizontal and vertical aperture mode).
FBPropertyAnimatableDouble FieldOfViewY
 Read Write Property: Field of View Y angle (used in horizontal and vertical aperture mode).
FBPropertyAnimatableDouble OpticalCenterX
 Read Write Property: Optical Center X (mm).
FBPropertyAnimatableDouble OpticalCenterY
 Read Write Property: Optical Center Y (mm).
FBPropertyAnimatableDouble FocalLength
 Read Write Property: Focal Length.
FBPropertyCameraFilmBackType FilmBackType
 Read Write Property: Film back standard type.
FBPropertyDouble FilmSizeWidth
 Read Write Property: Width of the film.
FBPropertyDouble FilmSizeHeight
 Read Write Property: Height of the film.
FBPropertyDouble FilmAspectRatio
 Read Write Property: Film aspect ratio.
FBPropertyDouble SqueezeRatio
 Read Write Property: Squeeze ratio.
FBPropertyDouble OrthoZoom
 Read Write Property: Zoom factor of an orthographic camera.
FBPropertyTexture BackGroundTexture
 Read Write Property: Background Texture
FBPropertyVideo BackGroundMedia
FBPropertyCameraViewPlaneMode ViewBackGroundPlaneMode
 Read Write Property: Background plane view mode
FBPropertyBool BackGroundImageCenter
 Read Write Property: Center the background image
FBPropertyBool BackGroundImageFit
 Read Write Property: Fit the background image
FBPropertyBool BackGroundImageKeepRatio
 Read Write Property: Keep the background image's ratio
FBPropertyBool BackGroundImageCrop
 Read Write Property: Crop the background image
FBPropertyDouble BackGroundPlaneDistance
 Read Write Property: Set the distance for the background plane.
FBPropertyCameraDistanceMode BackGroundPlaneDistanceMode
 Read Write Property: Select mode for the background plane's distance.
FBPropertyAnimatableDouble ForeGroundAlpha
 Read Write Property: Opacity of foreground.
FBPropertyDouble ForeGroundMaterialThreshold
 Read Write Property: Material threshold for a transparent foreground.
FBPropertyBool ForeGroundTransparent
 Read Write Property: Is the foreground transparent?
FBPropertyTexture ForeGroundTexture
 Read Write Property: ForeGround Texture
FBPropertyVideo ForeGroundMedia
FBPropertyCameraViewPlaneMode ViewForeGroundPlaneMode
 Read Write Property: Foreground plane view mode
FBPropertyBool ForeGroundImageCenter
 Read Write Property: Center the foreground image
FBPropertyBool ForeGroundImageFit
 Read Write Property: Fit the foreground image
FBPropertyBool ForeGroundImageKeepRatio
 Read Write Property: Keep the foreground image's ratio?
FBPropertyBool ForeGroundImageCrop
 Read Write Property: Crop the foreground image
FBPropertyDouble ForeGroundPlaneDistance
 Read Write Property: Set the distance for the foreground plane.
FBPropertyCameraDistanceMode ForeGroundPlaneDistanceMode
 Read Write Property: Select mode for the foreground plane's distance.
FBPropertyBool ViewCameraInterest
 Read Write Property: Show the camera interest?
FBPropertyBool ViewNearFarPlane
 Read Write Property: Show near/far planes?
FBPropertyBool ViewShowName
 Read Write Property: Show name?
FBPropertyBool ViewShowGrid
 Read Write Property: Show grid?
FBPropertyBool ViewShowAxis
 Read Write Property: Show axis?
FBPropertyBool ViewShowTimeCode
 Read Write Property: Show time code?
FBPropertyBool ViewDisplaySafeArea
 Read Write Property: Display safe area?
FBPropertyBool ViewOpticalCenter
 Read Write Property: View optical center?
FBPropertyCameraSafeAreaMode SafeAreaMode
 Read Write Property: Select mode for safe area.
FBPropertyAnimatableColor BackGroundColor
 Read Write Property: Background color for camera.
FBPropertyBool UseFrameColor
 Read Write Property: Use frame color?
FBPropertyColor FrameColor
 Read Write Property: Frame color for camera.
FBPropertyBool UseAntiAliasing
 Read Write Property: Use anti-aliasing?
FBPropertyBool UseDepthOfField
 Read Write Property: Use depth of field calculations?
FBPropertyBool InteractiveMode
 Read Write Property: Interactive mode?
FBPropertyDouble AntiAliasingIntensity
 Read Write Property: Anti-aliasing intensity.
FBPropertyCameraAntiAliasingMethod AntiAliasingMethod
 Read Write Property: Anti-aliasing method.
FBPropertyInt NumberOfSamples
 Read Write Property: Number of samples to oversample with.
FBPropertyCameraSamplingType SamplingType
 Read Write Property: Type of over sampling.
FBPropertyBool UseAccumulationBuffer
 Read Write Property: Use accumulation buffer?
FBPropertyCameraFocusDistanceSource FocusDistanceSource
 Read Write Property: Select source for focusing.
FBPropertyDouble FocusSpecificDistance
 Read Write Property: Specfic distance for focusing.
FBPropertyDouble FocusAngle
 Read Write Property: Focus Angle (rendering dof).
FBPropertyBool Use2DMagnifier
 Read Write Property: Enable/Disable the 2D Magnifier.
FBPropertyBool Display2DMagnifierFrame
 Read Write Property: Enable/Disable the drawing of the 2D Magnifier frame box.
FBPropertyAnimatableDouble MagnifierZoom
 Read Write Property: 2D Magnifier Zoom value.
FBPropertyAnimatableDouble MagnifierPosX
 Read Write Property: 2D Magnifier X Position.
FBPropertyAnimatableDouble MagnifierPosY
 Read Write Property: 2D Magnifier Y Position.
FBPropertyModel Interest
 Read Write Property: Direct camera's interest.
FBPropertyAnimatableDouble Roll
 Read Write Property: Camera's roll on it's Z axis.
FBPropertyAnimatableDouble TurnTable
 Read Write Property: Camera's rotation around its interest.
FBPropertyBool DisplayTurnTableIcon
 Read Write Property: Enable/Disable the drawing of the Turn Table icon.
FBPropertyAnimatableDouble MotionBlurIntensity
 Read Write Property: Motion Blur Intensity.
FBPropertyBool UseMotionBlur
 Read Write Property: Enable Motion Blur.
FBPropertyBool UseRealTimeMotionBlur
 Read Write Property: Enable Real-time Motion Blur.
FBPropertyInt CameraViewportX
  Read Only Property: Camera Viewport start position's X value
FBPropertyInt CameraViewportY
  Read Only Property: Camera Viewport start position's Y value
FBPropertyInt CameraViewportWidth
  Read Only Property: Camera Viewport width
FBPropertyInt CameraViewportHeight
  Read Only Property: Camera Viewport height
FBPropertyListHUD HUDs
  List : HUDs present in this camera

Static Public Attributes

static const double OrthoFactor
 Constant scale factor to be used with OrthoZoom for orthographic cameras.

Constructor & Destructor Documentation

FBCamera ( const char *  pName,
HIObject  pObject = NULL 
)

Constructor.

Parameters:
pNameName of camera.
pObjectFor internal use only(default=NULL).

Member Function Documentation

K_DEPRECATED_2014 double* GetMatrix ( FBCameraMatrixType  pType)

Obtains the camera's matrix.

Deprecated:
Use FBCamera::GetCameraMatrix() instead
Parameters:
pTypeMatrix type to obtain.
Returns:
Matrix of doubles (the camera's matrix in question).
void GetCameraMatrix ( FBMatrix pMatrix,
FBCameraMatrixType  pType,
FBEvaluateInfo pEvalInfo = NULL 
)

Obtains the camera's matrix.

Parameters:
pMatrixMatrix to fill with requested information.
pTypeCamera Matrix type to obtain.
pEvalInfoTake Display if none specified.
FBVector4d InverseProjection ( int  pX,
int  pY,
double  pDistanceFromCamera,
bool  pRelativeToViewport = false 
)

Returns the world coordinates based on screen coordinates and input distance from the camera.

Parameters:
pXScreen horizontal coordinate in pixel. When pRelativeToViewport is false, the range is between 0 and (WindowWidth - 1). When pRelativeToViewport is true, the range is between 0 to (CameraViewportWidth - 1). The coordinate starts at left of the region.
pYScreen vertical coordinate in pixel. When pRelativeToViewport is false, the range is between 0 and (WindowHeight - 1). When pRelativeToViewport is true, the range is between 0 to (CameraViewportHeight - 1). The coordinate starts at top of the region.
pDistanceFromCameraDistance from the camera to the resulting world coordinate position
pRelativeToViewporttrue indicates (pX,pY) is relative to the window; false indicates (pX,pY) is relative to the viewport of the camera.
Returns:
The world coordinates in 3D space

Member Data Documentation

Read Only Property: Indicate if this a producer (default or system) camera or a custom (user-created) camera.

Definition at line 214 of file fbcamera.h.

FBPropertyCameraFrameSizeMode FrameSizeMode

Read Write Property: Frame size standard mode.

Definition at line 217 of file fbcamera.h.

FBPropertyCameraResolutionMode ResolutionMode

Read Write Property: Resolution standard mode.

Definition at line 218 of file fbcamera.h.

Read Write Property: Resolution width.

Definition at line 219 of file fbcamera.h.

Read Write Property: Resolution height.

Definition at line 220 of file fbcamera.h.

Read Only Property: Window width.

Definition at line 221 of file fbcamera.h.

Read Only Property: Window height.

Definition at line 222 of file fbcamera.h.

Read Write Property: Pixel aspect ratio.

Definition at line 223 of file fbcamera.h.

Read Write Property: Near plane distance.

Definition at line 224 of file fbcamera.h.

Read Write Property: Far plane distance.

Definition at line 225 of file fbcamera.h.

Read Write Property: Mouse lock for camera?

Definition at line 226 of file fbcamera.h.

FBPropertyCameraType Type

Read Write Property: Type of camera

Definition at line 227 of file fbcamera.h.

FBPropertyCameraApertureMode ApertureMode

Read Write Property: Aperture mode.

Definition at line 228 of file fbcamera.h.

Read Write Property: Field of View (used when in horizontal or vertical aperture modes).

Definition at line 229 of file fbcamera.h.

Read Write Property: Field of View X angle (used in horizontal and vertical aperture mode).

Definition at line 231 of file fbcamera.h.

Read Write Property: Field of View Y angle (used in horizontal and vertical aperture mode).

Definition at line 232 of file fbcamera.h.

Read Write Property: Optical Center X (mm).

Definition at line 233 of file fbcamera.h.

Read Write Property: Optical Center Y (mm).

Definition at line 234 of file fbcamera.h.

Read Write Property: Focal Length.

Definition at line 235 of file fbcamera.h.

FBPropertyCameraFilmBackType FilmBackType

Read Write Property: Film back standard type.

Definition at line 237 of file fbcamera.h.

Read Write Property: Width of the film.

Definition at line 238 of file fbcamera.h.

Read Write Property: Height of the film.

Definition at line 239 of file fbcamera.h.

Read Write Property: Film aspect ratio.

Definition at line 240 of file fbcamera.h.

Read Write Property: Squeeze ratio.

Definition at line 241 of file fbcamera.h.

const double OrthoFactor [static]

Constant scale factor to be used with OrthoZoom for orthographic cameras.

Definition at line 243 of file fbcamera.h.

Read Write Property: Zoom factor of an orthographic camera.


OrthoZoom is only applicable if the camera has orthographic projection (i.e., Type == FBCameraType::kFBCameraTypeOrthogonal).
This value changes when the orthographic camera is zoomed in or out.
Refer to the following code if you wish to compute the left, right, top, and bottom view planes of the camera.

     double lW = mCam.CameraViewportWidth;
     double lH = mCam.CameraViewportHeight;
     double lPixelRatio = mCam.PixelAspectRatio;
     const double lFactor = mCam.OrthoZoom * FBCamera::OrthoFactor;
     if( lW < lH )
     {
        mLeftPlane   =  -lFactor * lPixelRatio;
        mRightPlane  =   lFactor * lPixelRatio;
        mBottomPlane = -(lFactor * lH) / lW;
        mTopPlane    =  (lFactor * lH) / lW;
     }
     else
     {
        lW *= lPixelRatio;
        mLeftPlane   = -(lFactor * lW) / lH;
        mRightPlane  =  (lFactor * lW) / lH;
        mBottomPlane =  -lFactor;
        mTopPlane    =   lFactor;
     }

Definition at line 273 of file fbcamera.h.

FBPropertyTexture BackGroundTexture

Read Write Property: Background Texture

Definition at line 277 of file fbcamera.h.

FBPropertyVideo BackGroundMedia
Deprecated:
Read Write Property: BackGround Image

Definition at line 278 of file fbcamera.h.

FBPropertyCameraViewPlaneMode ViewBackGroundPlaneMode

Read Write Property: Background plane view mode

Definition at line 279 of file fbcamera.h.

Read Write Property: Center the background image

Definition at line 280 of file fbcamera.h.

Read Write Property: Fit the background image

Definition at line 281 of file fbcamera.h.

Read Write Property: Keep the background image's ratio

Definition at line 282 of file fbcamera.h.

Read Write Property: Crop the background image

Definition at line 283 of file fbcamera.h.

Read Write Property: Set the distance for the background plane.

Definition at line 284 of file fbcamera.h.

FBPropertyCameraDistanceMode BackGroundPlaneDistanceMode

Read Write Property: Select mode for the background plane's distance.

Definition at line 285 of file fbcamera.h.

Read Write Property: Opacity of foreground.

Definition at line 288 of file fbcamera.h.

Read Write Property: Material threshold for a transparent foreground.

Definition at line 289 of file fbcamera.h.

Read Write Property: Is the foreground transparent?

Definition at line 290 of file fbcamera.h.

FBPropertyTexture ForeGroundTexture

Read Write Property: ForeGround Texture

Definition at line 291 of file fbcamera.h.

FBPropertyVideo ForeGroundMedia
Deprecated:
Read Write Property: ForeGround Image

Definition at line 292 of file fbcamera.h.

FBPropertyCameraViewPlaneMode ViewForeGroundPlaneMode

Read Write Property: Foreground plane view mode

Definition at line 293 of file fbcamera.h.

Read Write Property: Center the foreground image

Definition at line 294 of file fbcamera.h.

Read Write Property: Fit the foreground image

Definition at line 295 of file fbcamera.h.

Read Write Property: Keep the foreground image's ratio?

Definition at line 296 of file fbcamera.h.

Read Write Property: Crop the foreground image

Definition at line 297 of file fbcamera.h.

Read Write Property: Set the distance for the foreground plane.

Definition at line 298 of file fbcamera.h.

FBPropertyCameraDistanceMode ForeGroundPlaneDistanceMode

Read Write Property: Select mode for the foreground plane's distance.

Definition at line 299 of file fbcamera.h.

Read Write Property: Show the camera interest?

Definition at line 302 of file fbcamera.h.

Read Write Property: Show near/far planes?

Definition at line 303 of file fbcamera.h.

Read Write Property: Show name?

Definition at line 304 of file fbcamera.h.

Read Write Property: Show grid?

Definition at line 305 of file fbcamera.h.

Read Write Property: Show axis?

Definition at line 306 of file fbcamera.h.

Read Write Property: Show time code?

Definition at line 307 of file fbcamera.h.

Read Write Property: Display safe area?

Definition at line 308 of file fbcamera.h.

Read Write Property: View optical center?

Definition at line 309 of file fbcamera.h.

FBPropertyCameraSafeAreaMode SafeAreaMode

Read Write Property: Select mode for safe area.

Definition at line 310 of file fbcamera.h.

Read Write Property: Background color for camera.

Definition at line 312 of file fbcamera.h.

Read Write Property: Use frame color?

Definition at line 313 of file fbcamera.h.

Read Write Property: Frame color for camera.

Definition at line 314 of file fbcamera.h.

Read Write Property: Use anti-aliasing?

Definition at line 318 of file fbcamera.h.

Read Write Property: Use depth of field calculations?

Definition at line 319 of file fbcamera.h.

Read Write Property: Interactive mode?

Definition at line 320 of file fbcamera.h.

Read Write Property: Anti-aliasing intensity.

Definition at line 323 of file fbcamera.h.

FBPropertyCameraAntiAliasingMethod AntiAliasingMethod

Read Write Property: Anti-aliasing method.

Definition at line 324 of file fbcamera.h.

Read Write Property: Number of samples to oversample with.

Definition at line 325 of file fbcamera.h.

FBPropertyCameraSamplingType SamplingType

Read Write Property: Type of over sampling.

Definition at line 326 of file fbcamera.h.

Read Write Property: Use accumulation buffer?

Definition at line 327 of file fbcamera.h.

FBPropertyCameraFocusDistanceSource FocusDistanceSource

Read Write Property: Select source for focusing.

Definition at line 330 of file fbcamera.h.

Read Write Property: Specfic distance for focusing.

Definition at line 331 of file fbcamera.h.

Read Write Property: Focus Angle (rendering dof).

Definition at line 332 of file fbcamera.h.

Read Write Property: Enable/Disable the 2D Magnifier.

Definition at line 335 of file fbcamera.h.

Read Write Property: Enable/Disable the drawing of the 2D Magnifier frame box.

Definition at line 336 of file fbcamera.h.

Read Write Property: 2D Magnifier Zoom value.

Definition at line 337 of file fbcamera.h.

Read Write Property: 2D Magnifier X Position.

Definition at line 338 of file fbcamera.h.

Read Write Property: 2D Magnifier Y Position.

Definition at line 339 of file fbcamera.h.

FBPropertyModel Interest

Read Write Property: Direct camera's interest.

Definition at line 342 of file fbcamera.h.

Read Write Property: Camera's roll on it's Z axis.

Definition at line 343 of file fbcamera.h.

Read Write Property: Camera's rotation around its interest.

Definition at line 344 of file fbcamera.h.

Read Write Property: Enable/Disable the drawing of the Turn Table icon.

Definition at line 345 of file fbcamera.h.

Read Write Property: Motion Blur Intensity.

Definition at line 348 of file fbcamera.h.

Read Write Property: Enable Motion Blur.

Definition at line 349 of file fbcamera.h.

Read Write Property: Enable Real-time Motion Blur.

Definition at line 350 of file fbcamera.h.

Read Only Property: Camera Viewport start position's X value

Definition at line 353 of file fbcamera.h.

Read Only Property: Camera Viewport start position's Y value

Definition at line 354 of file fbcamera.h.

Read Only Property: Camera Viewport width

Definition at line 355 of file fbcamera.h.

Read Only Property: Camera Viewport height

Definition at line 356 of file fbcamera.h.

List : HUDs present in this camera

Definition at line 359 of file fbcamera.h.


The documentation for this class was generated from the following file:

FBCamera FBCamera FBCamera FBCamera FBCamera FBCamera FBCamera FBCamera FBCamera FBCamera
FBCamera FBCamera FBCamera FBCamera FBCamera FBCamera FBCamera FBCamera FBCamera FBCamera