Public Member Functions | Public Attributes | Static Public Attributes

FBCamera Class Reference

This reference page is linked to from the following overview topics: 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 1135 of file fbmodel.h.

#include <fbmodel.h>

Inheritance diagram for FBCamera:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  FBCamera (const char *pName, HIObject pObject=NULL)
  Constructor.
double *  GetMatrix (FBCameraMatrixType pType)
  Obtain the camera's transformation matrix (either Model or Projection View).

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  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.
FBPropertyVideo  BackGroundMedia
  Read Write Property: BackGround Image
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?
FBPropertyVideo  ForeGroundMedia
  Read Write Property: ForeGround Image
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  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:
pName Name of camera.
pObject For internal use only(default=NULL).

Member Function Documentation

double* GetMatrix ( FBCameraMatrixType  pType )

Obtain the camera's transformation matrix (either Model or Projection View).

Parameters:
pType Matrix type to obtain.
Returns:
Matrix of doubles (the camera's matrix in question).

Member Data Documentation

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

Definition at line 1144 of file fbmodel.h.

FBPropertyCameraFrameSizeMode FrameSizeMode

Read Write Property: Frame size standard mode.

Definition at line 1147 of file fbmodel.h.

FBPropertyCameraResolutionMode ResolutionMode

Read Write Property: Resolution standard mode.

Definition at line 1148 of file fbmodel.h.

Read Write Property: Resolution width.

Definition at line 1149 of file fbmodel.h.

Read Write Property: Resolution height.

Definition at line 1150 of file fbmodel.h.

Read Only Property: Window height.

Definition at line 1151 of file fbmodel.h.

Read Write Property: Pixel aspect ratio.

Definition at line 1152 of file fbmodel.h.

Read Write Property: Near plane distance.

Definition at line 1153 of file fbmodel.h.

Read Write Property: Far plane distance.

Definition at line 1154 of file fbmodel.h.

Read Write Property: Mouse lock for camera?

Definition at line 1155 of file fbmodel.h.

FBPropertyCameraType Type

Read Write Property: Type of camera

Definition at line 1156 of file fbmodel.h.

FBPropertyCameraApertureMode ApertureMode

Read Write Property: Aperture mode.

Definition at line 1157 of file fbmodel.h.

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

Definition at line 1158 of file fbmodel.h.

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

Definition at line 1160 of file fbmodel.h.

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

Definition at line 1161 of file fbmodel.h.

Read Write Property: Optical Center X (mm).

Definition at line 1162 of file fbmodel.h.

Read Write Property: Optical Center Y (mm).

Definition at line 1163 of file fbmodel.h.

Read Write Property: Focal Length.

Definition at line 1164 of file fbmodel.h.

FBPropertyCameraFilmBackType FilmBackType

Read Write Property: Film back standard type.

Definition at line 1166 of file fbmodel.h.

Read Write Property: Width of the film.

Definition at line 1167 of file fbmodel.h.

Read Write Property: Height of the film.

Definition at line 1168 of file fbmodel.h.

Read Write Property: Film aspect ratio.

Definition at line 1169 of file fbmodel.h.

Read Write Property: Squeeze ratio.

Definition at line 1170 of file fbmodel.h.

const double OrthoFactor [static]

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

Definition at line 1172 of file fbmodel.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 1202 of file fbmodel.h.

FBPropertyVideo BackGroundMedia

Read Write Property: BackGround Image

Definition at line 1206 of file fbmodel.h.

FBPropertyCameraViewPlaneMode ViewBackGroundPlaneMode

Read Write Property: Background plane view mode

Definition at line 1207 of file fbmodel.h.

Read Write Property: Center the background image

Definition at line 1208 of file fbmodel.h.

Read Write Property: Fit the background image

Definition at line 1209 of file fbmodel.h.

Read Write Property: Keep the background image's ratio

Definition at line 1210 of file fbmodel.h.

Read Write Property: Crop the background image

Definition at line 1211 of file fbmodel.h.

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

Definition at line 1212 of file fbmodel.h.

FBPropertyCameraDistanceMode BackGroundPlaneDistanceMode

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

Definition at line 1213 of file fbmodel.h.

Read Write Property: Opacity of foreground.

Definition at line 1216 of file fbmodel.h.

Read Write Property: Material threshold for a transparent foreground.

Definition at line 1217 of file fbmodel.h.

Read Write Property: Is the foreground transparent?

Definition at line 1218 of file fbmodel.h.

FBPropertyVideo ForeGroundMedia

Read Write Property: ForeGround Image

Definition at line 1219 of file fbmodel.h.

FBPropertyCameraViewPlaneMode ViewForeGroundPlaneMode

Read Write Property: Foreground plane view mode

Definition at line 1220 of file fbmodel.h.

Read Write Property: Center the foreground image

Definition at line 1221 of file fbmodel.h.

Read Write Property: Fit the foreground image

Definition at line 1222 of file fbmodel.h.

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

Definition at line 1223 of file fbmodel.h.

Read Write Property: Crop the foreground image

Definition at line 1224 of file fbmodel.h.

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

Definition at line 1225 of file fbmodel.h.

FBPropertyCameraDistanceMode ForeGroundPlaneDistanceMode

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

Definition at line 1226 of file fbmodel.h.

Read Write Property: Show the camera interest?

Definition at line 1229 of file fbmodel.h.

Read Write Property: Show near/far planes?

Definition at line 1230 of file fbmodel.h.

Read Write Property: Show grid?

Definition at line 1231 of file fbmodel.h.

Read Write Property: Show axis?

Definition at line 1232 of file fbmodel.h.

Read Write Property: Show time code?

Definition at line 1233 of file fbmodel.h.

Read Write Property: Display safe area?

Definition at line 1234 of file fbmodel.h.

Read Write Property: View optical center?

Definition at line 1235 of file fbmodel.h.

FBPropertyCameraSafeAreaMode SafeAreaMode

Read Write Property: Select mode for safe area.

Definition at line 1236 of file fbmodel.h.

Read Write Property: Background color for camera.

Definition at line 1238 of file fbmodel.h.

Read Write Property: Use frame color?

Definition at line 1239 of file fbmodel.h.

Read Write Property: Frame color for camera.

Definition at line 1240 of file fbmodel.h.

Read Write Property: Use anti-aliasing?

Definition at line 1244 of file fbmodel.h.

Read Write Property: Use depth of field calculations?

Definition at line 1245 of file fbmodel.h.

Read Write Property: Interactive mode?

Definition at line 1246 of file fbmodel.h.

Read Write Property: Anti-aliasing intensity.

Definition at line 1249 of file fbmodel.h.

FBPropertyCameraAntiAliasingMethod AntiAliasingMethod

Read Write Property: Anti-aliasing method.

Definition at line 1250 of file fbmodel.h.

Read Write Property: Number of samples to oversample with.

Definition at line 1251 of file fbmodel.h.

FBPropertyCameraSamplingType SamplingType

Read Write Property: Type of over sampling.

Definition at line 1252 of file fbmodel.h.

Read Write Property: Use accumulation buffer?

Definition at line 1253 of file fbmodel.h.

FBPropertyCameraFocusDistanceSource FocusDistanceSource

Read Write Property: Select source for focusing.

Definition at line 1256 of file fbmodel.h.

Read Write Property: Specfic distance for focusing.

Definition at line 1257 of file fbmodel.h.

Read Write Property: Focus Angle (rendering dof).

Definition at line 1258 of file fbmodel.h.

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

Definition at line 1261 of file fbmodel.h.

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

Definition at line 1262 of file fbmodel.h.

Read Write Property: 2D Magnifier Zoom value.

Definition at line 1263 of file fbmodel.h.

Read Write Property: 2D Magnifier X Position.

Definition at line 1264 of file fbmodel.h.

Read Write Property: 2D Magnifier Y Position.

Definition at line 1265 of file fbmodel.h.

FBPropertyModel Interest

Read Write Property: Direct camera's interest.

Definition at line 1268 of file fbmodel.h.

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

Definition at line 1269 of file fbmodel.h.

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

Definition at line 1270 of file fbmodel.h.

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

Definition at line 1271 of file fbmodel.h.

Read Write Property: Motion Blur Intensity.

Definition at line 1274 of file fbmodel.h.

Read Write Property: Enable Motion Blur.

Definition at line 1275 of file fbmodel.h.

Read Write Property: Enable Real-time Motion Blur.

Definition at line 1276 of file fbmodel.h.

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

Definition at line 1279 of file fbmodel.h.

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

Definition at line 1280 of file fbmodel.h.

Read Only Property: Camera Viewport width

Definition at line 1281 of file fbmodel.h.

Read Only Property: Camera Viewport height

Definition at line 1282 of file fbmodel.h.

List : HUDs present in this camera

Definition at line 1285 of file fbmodel.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