HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UsdGeomCamera Class Reference

#include <camera.h>

+ Inheritance diagram for UsdGeomCamera:

Public Member Functions

 UsdGeomCamera (const UsdPrim &prim=UsdPrim())
 
 UsdGeomCamera (const UsdSchemaBase &schemaObj)
 
virtual USDGEOM_API ~UsdGeomCamera ()
 Destructor. More...
 
USDGEOM_API UsdAttribute GetProjectionAttr () const
 
USDGEOM_API UsdAttribute CreateProjectionAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 
USDGEOM_API UsdAttribute GetHorizontalApertureAttr () const
 
USDGEOM_API UsdAttribute CreateHorizontalApertureAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 
USDGEOM_API UsdAttribute GetVerticalApertureAttr () const
 
USDGEOM_API UsdAttribute CreateVerticalApertureAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 
USDGEOM_API UsdAttribute GetHorizontalApertureOffsetAttr () const
 
USDGEOM_API UsdAttribute CreateHorizontalApertureOffsetAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 
USDGEOM_API UsdAttribute GetVerticalApertureOffsetAttr () const
 
USDGEOM_API UsdAttribute CreateVerticalApertureOffsetAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 
USDGEOM_API UsdAttribute GetFocalLengthAttr () const
 
USDGEOM_API UsdAttribute CreateFocalLengthAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 
USDGEOM_API UsdAttribute GetClippingRangeAttr () const
 
USDGEOM_API UsdAttribute CreateClippingRangeAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 
USDGEOM_API UsdAttribute GetClippingPlanesAttr () const
 
USDGEOM_API UsdAttribute CreateClippingPlanesAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 
USDGEOM_API UsdAttribute GetFStopAttr () const
 
USDGEOM_API UsdAttribute CreateFStopAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 
USDGEOM_API UsdAttribute GetFocusDistanceAttr () const
 
USDGEOM_API UsdAttribute CreateFocusDistanceAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 
USDGEOM_API UsdAttribute GetStereoRoleAttr () const
 
USDGEOM_API UsdAttribute CreateStereoRoleAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 
USDGEOM_API UsdAttribute GetShutterOpenAttr () const
 
USDGEOM_API UsdAttribute CreateShutterOpenAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 
USDGEOM_API UsdAttribute GetShutterCloseAttr () const
 
USDGEOM_API UsdAttribute CreateShutterCloseAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 
USDGEOM_API UsdAttribute GetExposureAttr () const
 
USDGEOM_API UsdAttribute CreateExposureAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 
USDGEOM_API GfCamera GetCamera (const UsdTimeCode &time) const
 
USDGEOM_API void SetFromCamera (const GfCamera &camera, const UsdTimeCode &time)
 
- Public Member Functions inherited from UsdGeomXformable
 UsdGeomXformable (const UsdPrim &prim=UsdPrim())
 
 UsdGeomXformable (const UsdSchemaBase &schemaObj)
 
virtual USDGEOM_API ~UsdGeomXformable ()
 Destructor. More...
 
USDGEOM_API UsdAttribute GetXformOpOrderAttr () const
 
USDGEOM_API UsdAttribute CreateXformOpOrderAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 
USDGEOM_API UsdGeomXformOp AddXformOp (UsdGeomXformOp::Type const opType, UsdGeomXformOp::Precision const precision=UsdGeomXformOp::PrecisionDouble, TfToken const &opSuffix=TfToken(), bool isInverseOp=false) const
 
USDGEOM_API UsdGeomXformOp GetXformOp (UsdGeomXformOp::Type const opType, TfToken const &opSuffix=TfToken(), bool isInverseOp=false) const
 
USDGEOM_API UsdGeomXformOp AddTranslateOp (UsdGeomXformOp::Precision const precision=UsdGeomXformOp::PrecisionDouble, TfToken const &opSuffix=TfToken(), bool isInverseOp=false) const
 
USDGEOM_API UsdGeomXformOp GetTranslateOp (TfToken const &opSuffix=TfToken(), bool isInverseOp=false) const
 
USDGEOM_API UsdGeomXformOp AddScaleOp (UsdGeomXformOp::Precision const precision=UsdGeomXformOp::PrecisionFloat, TfToken const &opSuffix=TfToken(), bool isInverseOp=false) const
 
USDGEOM_API UsdGeomXformOp GetScaleOp (TfToken const &opSuffix=TfToken(), bool isInverseOp=false) const
 
USDGEOM_API UsdGeomXformOp AddRotateXOp (UsdGeomXformOp::Precision const precision=UsdGeomXformOp::PrecisionFloat, TfToken const &opSuffix=TfToken(), bool isInverseOp=false) const
 
USDGEOM_API UsdGeomXformOp GetRotateXOp (TfToken const &opSuffix=TfToken(), bool isInverseOp=false) const
 
USDGEOM_API UsdGeomXformOp AddRotateYOp (UsdGeomXformOp::Precision const precision=UsdGeomXformOp::PrecisionFloat, TfToken const &opSuffix=TfToken(), bool isInverseOp=false) const
 
USDGEOM_API UsdGeomXformOp GetRotateYOp (TfToken const &opSuffix=TfToken(), bool isInverseOp=false) const
 
USDGEOM_API UsdGeomXformOp AddRotateZOp (UsdGeomXformOp::Precision const precision=UsdGeomXformOp::PrecisionFloat, TfToken const &opSuffix=TfToken(), bool isInverseOp=false) const
 
USDGEOM_API UsdGeomXformOp GetRotateZOp (TfToken const &opSuffix=TfToken(), bool isInverseOp=false) const
 
USDGEOM_API UsdGeomXformOp AddRotateXYZOp (UsdGeomXformOp::Precision const precision=UsdGeomXformOp::PrecisionFloat, TfToken const &opSuffix=TfToken(), bool isInverseOp=false) const
 
USDGEOM_API UsdGeomXformOp GetRotateXYZOp (TfToken const &opSuffix=TfToken(), bool isInverseOp=false) const
 
USDGEOM_API UsdGeomXformOp AddRotateXZYOp (UsdGeomXformOp::Precision const precision=UsdGeomXformOp::PrecisionFloat, TfToken const &opSuffix=TfToken(), bool isInverseOp=false) const
 
USDGEOM_API UsdGeomXformOp GetRotateXZYOp (TfToken const &opSuffix=TfToken(), bool isInverseOp=false) const
 
USDGEOM_API UsdGeomXformOp AddRotateYXZOp (UsdGeomXformOp::Precision const precision=UsdGeomXformOp::PrecisionFloat, TfToken const &opSuffix=TfToken(), bool isInverseOp=false) const
 
USDGEOM_API UsdGeomXformOp GetRotateYXZOp (TfToken const &opSuffix=TfToken(), bool isInverseOp=false) const
 
USDGEOM_API UsdGeomXformOp AddRotateYZXOp (UsdGeomXformOp::Precision const precision=UsdGeomXformOp::PrecisionFloat, TfToken const &opSuffix=TfToken(), bool isInverseOp=false) const
 
USDGEOM_API UsdGeomXformOp GetRotateYZXOp (TfToken const &opSuffix=TfToken(), bool isInverseOp=false) const
 
USDGEOM_API UsdGeomXformOp AddRotateZXYOp (UsdGeomXformOp::Precision const precision=UsdGeomXformOp::PrecisionFloat, TfToken const &opSuffix=TfToken(), bool isInverseOp=false) const
 
USDGEOM_API UsdGeomXformOp GetRotateZXYOp (TfToken const &opSuffix=TfToken(), bool isInverseOp=false) const
 
USDGEOM_API UsdGeomXformOp AddRotateZYXOp (UsdGeomXformOp::Precision const precision=UsdGeomXformOp::PrecisionFloat, TfToken const &opSuffix=TfToken(), bool isInverseOp=false) const
 
USDGEOM_API UsdGeomXformOp GetRotateZYXOp (TfToken const &opSuffix=TfToken(), bool isInverseOp=false) const
 
USDGEOM_API UsdGeomXformOp AddOrientOp (UsdGeomXformOp::Precision const precision=UsdGeomXformOp::PrecisionFloat, TfToken const &opSuffix=TfToken(), bool isInverseOp=false) const
 
USDGEOM_API UsdGeomXformOp GetOrientOp (TfToken const &opSuffix=TfToken(), bool isInverseOp=false) const
 
USDGEOM_API UsdGeomXformOp AddTransformOp (UsdGeomXformOp::Precision const precision=UsdGeomXformOp::PrecisionDouble, TfToken const &opSuffix=TfToken(), bool isInverseOp=false) const
 
USDGEOM_API UsdGeomXformOp GetTransformOp (TfToken const &opSuffix=TfToken(), bool isInverseOp=false) const
 
USDGEOM_API bool SetResetXformStack (bool resetXform) const
 
USDGEOM_API bool GetResetXformStack () const
 
USDGEOM_API bool SetXformOpOrder (std::vector< UsdGeomXformOp > const &orderedXformOps, bool resetXformStack=false) const
 
USDGEOM_API std::vector
< UsdGeomXformOp
GetOrderedXformOps (bool *resetsXformStack) const
 
USDGEOM_API bool ClearXformOpOrder () const
 Clears the local transform stack. More...
 
USDGEOM_API UsdGeomXformOp MakeMatrixXform () const
 
USDGEOM_API bool TransformMightBeTimeVarying () const
 
USDGEOM_API bool TransformMightBeTimeVarying (const std::vector< UsdGeomXformOp > &ops) const
 
USDGEOM_API bool GetTimeSamples (std::vector< double > *times) const
 
USDGEOM_API bool GetTimeSamplesInInterval (const GfInterval &interval, std::vector< double > *times) const
 
USDGEOM_API bool GetLocalTransformation (GfMatrix4d *transform, bool *resetsXformStack, const UsdTimeCode time=UsdTimeCode::Default()) const
 
USDGEOM_API bool GetLocalTransformation (GfMatrix4d *transform, bool *resetsXformStack, const std::vector< UsdGeomXformOp > &ops, const UsdTimeCode time=UsdTimeCode::Default()) const
 
- Public Member Functions inherited from UsdGeomImageable
 UsdGeomImageable (const UsdPrim &prim=UsdPrim())
 
 UsdGeomImageable (const UsdSchemaBase &schemaObj)
 
virtual USDGEOM_API ~UsdGeomImageable ()
 Destructor. More...
 
USDGEOM_API UsdAttribute GetVisibilityAttr () const
 
USDGEOM_API UsdAttribute CreateVisibilityAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 
USDGEOM_API UsdAttribute GetPurposeAttr () const
 
USDGEOM_API UsdAttribute CreatePurposeAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 
USDGEOM_API UsdRelationship GetProxyPrimRel () const
 
USDGEOM_API UsdRelationship CreateProxyPrimRel () const
 
USDGEOM_API void MakeVisible (const UsdTimeCode &time=UsdTimeCode::Default()) const
 
USDGEOM_API void MakeInvisible (const UsdTimeCode &time=UsdTimeCode::Default()) const
 
USDGEOM_API TfToken ComputeVisibility (UsdTimeCode const &time=UsdTimeCode::Default()) const
 
USDGEOM_API UsdAttribute GetPurposeVisibilityAttr (const TfToken &purpose=UsdGeomTokens->default_) const
 
USDGEOM_API TfToken ComputeEffectiveVisibility (const TfToken &purpose=UsdGeomTokens->default_, const UsdTimeCode &time=UsdTimeCode::Default()) const
 
USDGEOM_API PurposeInfo ComputePurposeInfo () const
 
USDGEOM_API PurposeInfo ComputePurposeInfo (const PurposeInfo &parentPurposeInfo) const
 
USDGEOM_API TfToken ComputePurpose () const
 
USDGEOM_API UsdPrim ComputeProxyPrim (UsdPrim *renderPrim=NULL) const
 
USDGEOM_API bool SetProxyPrim (const UsdPrim &proxy) const
 
USDGEOM_API bool SetProxyPrim (const UsdSchemaBase &proxy) const
 
USDGEOM_API GfBBox3d ComputeWorldBound (UsdTimeCode const &time, TfToken const &purpose1=TfToken(), TfToken const &purpose2=TfToken(), TfToken const &purpose3=TfToken(), TfToken const &purpose4=TfToken()) const
 
USDGEOM_API GfBBox3d ComputeLocalBound (UsdTimeCode const &time, TfToken const &purpose1=TfToken(), TfToken const &purpose2=TfToken(), TfToken const &purpose3=TfToken(), TfToken const &purpose4=TfToken()) const
 
USDGEOM_API GfBBox3d ComputeUntransformedBound (UsdTimeCode const &time, TfToken const &purpose1=TfToken(), TfToken const &purpose2=TfToken(), TfToken const &purpose3=TfToken(), TfToken const &purpose4=TfToken()) const
 
USDGEOM_API GfMatrix4d ComputeLocalToWorldTransform (UsdTimeCode const &time) const
 
USDGEOM_API GfMatrix4d ComputeParentToWorldTransform (UsdTimeCode const &time) const
 
- Public Member Functions inherited from UsdTyped
 UsdTyped (const UsdPrim &prim=UsdPrim())
 
 UsdTyped (const UsdSchemaBase &schemaObj)
 
virtual USD_API ~UsdTyped ()
 Destructor. More...
 
- Public Member Functions inherited from UsdSchemaBase
bool IsConcrete () const
 
bool IsTyped () const
 
bool IsAPISchema () const
 Returns whether this is an API schema or not. More...
 
bool IsAppliedAPISchema () const
 
bool IsMultipleApplyAPISchema () const
 
UsdSchemaKind GetSchemaKind () const
 Returns the kind of schema this class is. More...
 
USD_API UsdSchemaBase (const UsdPrim &prim=UsdPrim())
 Construct and store prim as the held prim. More...
 
USD_API UsdSchemaBase (const UsdSchemaBase &otherSchema)
 Construct and store for the same prim held by otherSchema. More...
 
virtual USD_API ~UsdSchemaBase ()
 Destructor. More...
 
USD_API operator bool () const
 
UsdPrim GetPrim () const
 Return this schema object's held prim. More...
 
SdfPath GetPath () const
 Shorthand for GetPrim()->GetPath(). More...
 
USD_API const UsdPrimDefinitionGetSchemaClassPrimDefinition () const
 

Static Public Member Functions

static USDGEOM_API const
TfTokenVector
GetSchemaAttributeNames (bool includeInherited=true)
 
static USDGEOM_API UsdGeomCamera Get (const UsdStagePtr &stage, const SdfPath &path)
 
static USDGEOM_API UsdGeomCamera Define (const UsdStagePtr &stage, const SdfPath &path)
 
- Static Public Member Functions inherited from UsdGeomXformable
static USDGEOM_API const
TfTokenVector
GetSchemaAttributeNames (bool includeInherited=true)
 
static USDGEOM_API UsdGeomXformable Get (const UsdStagePtr &stage, const SdfPath &path)
 
static USDGEOM_API bool GetTimeSamples (std::vector< UsdGeomXformOp > const &orderedXformOps, std::vector< double > *times)
 
static USDGEOM_API bool GetTimeSamplesInInterval (std::vector< UsdGeomXformOp > const &orderedXformOps, const GfInterval &interval, std::vector< double > *times)
 
static USDGEOM_API bool GetLocalTransformation (GfMatrix4d *transform, std::vector< UsdGeomXformOp > const &ops, const UsdTimeCode time)
 
static USDGEOM_API bool IsTransformationAffectedByAttrNamed (const TfToken &attrName)
 
- Static Public Member Functions inherited from UsdGeomImageable
static USDGEOM_API const
TfTokenVector
GetSchemaAttributeNames (bool includeInherited=true)
 
static USDGEOM_API UsdGeomImageable Get (const UsdStagePtr &stage, const SdfPath &path)
 
static USDGEOM_API const
TfTokenVector
GetOrderedPurposeTokens ()
 
- Static Public Member Functions inherited from UsdTyped
static USD_API const
TfTokenVector
GetSchemaAttributeNames (bool includeInherited=true)
 
static USD_API UsdTyped Get (const UsdStagePtr &stage, const SdfPath &path)
 
- Static Public Member Functions inherited from UsdSchemaBase
static const TfTokenVectorGetSchemaAttributeNames (bool includeInherited=true)
 

Static Public Attributes

static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped
 
- Static Public Attributes inherited from UsdGeomXformable
static const UsdSchemaKind schemaKind = UsdSchemaKind::AbstractTyped
 
- Static Public Attributes inherited from UsdGeomImageable
static const UsdSchemaKind schemaKind = UsdSchemaKind::AbstractTyped
 
- Static Public Attributes inherited from UsdTyped
static const UsdSchemaKind schemaKind = UsdSchemaKind::AbstractBase
 
- Static Public Attributes inherited from UsdSchemaBase
static const UsdSchemaKind schemaKind = UsdSchemaKind::AbstractBase
 

Protected Member Functions

USDGEOM_API UsdSchemaKind _GetSchemaKind () const override
 
- Protected Member Functions inherited from UsdGeomXformable
USDGEOM_API UsdSchemaKind _GetSchemaKind () const override
 
- Protected Member Functions inherited from UsdTyped
USD_API bool _IsCompatible () const override
 
- Protected Member Functions inherited from UsdSchemaBase
virtual UsdSchemaKind _GetSchemaType () const
 
const TfType_GetType () const
 
USD_API UsdAttribute _CreateAttr (TfToken const &attrName, SdfValueTypeName const &typeName, bool custom, SdfVariability variability, VtValue const &defaultValue, bool writeSparsely) const
 

Friends

class UsdSchemaRegistry
 

Detailed Description

Transformable camera.

Describes optical properties of a camera via a common set of attributes that provide control over the camera's frustum as well as its depth of field. For stereo, the left and right camera are individual prims tagged through the stereoRole attribute.

There is a corresponding class GfCamera, which can hold the state of a camera (at a particular time). UsdGeomCamera::GetCamera() and UsdGeomCamera::SetFromCamera() convert between a USD camera prim and a GfCamera.

To obtain the camera's location in world space, call the following on a UsdGeomCamera 'camera':

GfMatrix4d camXform = camera.ComputeLocalToWorldTransform(time);
Note
Cameras in USD are always "Y up", regardless of the stage's orientation (i.e. UsdGeomGetStageUpAxis()). This means that the inverse of 'camXform' (the VIEW half of the MODELVIEW transform in OpenGL parlance) will transform the world such that the camera is at the origin, looking down the -Z axis, with +Y as the up axis, and +X pointing to the right. This describes a right handed coordinate system.

Units of Measure for Camera Properties

Despite the familiarity of millimeters for specifying some physical camera properties, UsdGeomCamera opts for greater consistency with all other UsdGeom schemas, which measure geometric properties in scene units, as determined by UsdGeomGetStageMetersPerUnit(). We do make a concession, however, in that lens and filmback properties are measured in tenths of a scene unit rather than "raw" scene units. This means that with the fallback value of .01 for metersPerUnit - i.e. scene unit of centimeters - then these "tenth of scene unit" properties are effectively millimeters.

Note
If one adds a Camera prim to a UsdStage whose scene unit is not centimeters, the fallback values for filmback properties will be incorrect (or at the least, unexpected) in an absolute sense; however, proper imaging through a "default camera" with focusing disabled depends only on ratios of the other properties, so the camera is still usable. However, it follows that if even one property is authored in the correct scene units, then they all must be.
See Also
UsdGeom_LinAlgBasics

For any described attribute Fallback Value or Allowed Values below that are text/tokens, the actual token is published and defined in UsdGeomTokens. So to set an attribute to the value "rightHanded", use UsdGeomTokens->rightHanded as the value.

Definition at line 111 of file camera.h.

Constructor & Destructor Documentation

UsdGeomCamera::UsdGeomCamera ( const UsdPrim prim = UsdPrim())
inlineexplicit

Construct a UsdGeomCamera on UsdPrim prim . Equivalent to UsdGeomCamera::Get(prim.GetStage(), prim.GetPath()) for a valid prim, but will not immediately throw an error for an invalid prim

Definition at line 123 of file camera.h.

UsdGeomCamera::UsdGeomCamera ( const UsdSchemaBase schemaObj)
inlineexplicit

Construct a UsdGeomCamera on the prim held by schemaObj . Should be preferred over UsdGeomCamera(schemaObj.GetPrim()), as it preserves SchemaBase state.

Definition at line 131 of file camera.h.

virtual USDGEOM_API UsdGeomCamera::~UsdGeomCamera ( )
virtual

Destructor.

Member Function Documentation

USDGEOM_API UsdSchemaKind UsdGeomCamera::_GetSchemaKind ( ) const
overrideprotectedvirtual

Returns the kind of schema this class belongs to.

See Also
UsdSchemaKind

Reimplemented from UsdTyped.

USDGEOM_API UsdAttribute UsdGeomCamera::CreateClippingPlanesAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetClippingPlanesAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. If specified, author defaultValue as the attribute's default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

USDGEOM_API UsdAttribute UsdGeomCamera::CreateClippingRangeAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetClippingRangeAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. If specified, author defaultValue as the attribute's default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

USDGEOM_API UsdAttribute UsdGeomCamera::CreateExposureAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetExposureAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. If specified, author defaultValue as the attribute's default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

USDGEOM_API UsdAttribute UsdGeomCamera::CreateFocalLengthAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetFocalLengthAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. If specified, author defaultValue as the attribute's default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

USDGEOM_API UsdAttribute UsdGeomCamera::CreateFocusDistanceAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetFocusDistanceAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. If specified, author defaultValue as the attribute's default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

USDGEOM_API UsdAttribute UsdGeomCamera::CreateFStopAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetFStopAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. If specified, author defaultValue as the attribute's default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

USDGEOM_API UsdAttribute UsdGeomCamera::CreateHorizontalApertureAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetHorizontalApertureAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. If specified, author defaultValue as the attribute's default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

USDGEOM_API UsdAttribute UsdGeomCamera::CreateHorizontalApertureOffsetAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetHorizontalApertureOffsetAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. If specified, author defaultValue as the attribute's default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

USDGEOM_API UsdAttribute UsdGeomCamera::CreateProjectionAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetProjectionAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. If specified, author defaultValue as the attribute's default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

USDGEOM_API UsdAttribute UsdGeomCamera::CreateShutterCloseAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetShutterCloseAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. If specified, author defaultValue as the attribute's default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

USDGEOM_API UsdAttribute UsdGeomCamera::CreateShutterOpenAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetShutterOpenAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. If specified, author defaultValue as the attribute's default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

USDGEOM_API UsdAttribute UsdGeomCamera::CreateStereoRoleAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetStereoRoleAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. If specified, author defaultValue as the attribute's default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

USDGEOM_API UsdAttribute UsdGeomCamera::CreateVerticalApertureAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetVerticalApertureAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. If specified, author defaultValue as the attribute's default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

USDGEOM_API UsdAttribute UsdGeomCamera::CreateVerticalApertureOffsetAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetVerticalApertureOffsetAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. If specified, author defaultValue as the attribute's default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

static USDGEOM_API UsdGeomCamera UsdGeomCamera::Define ( const UsdStagePtr &  stage,
const SdfPath path 
)
static

Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined()) on this stage.

If a prim adhering to this schema at path is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema's prim type name for the prim at path at the current EditTarget. Author SdfPrimSpec s with specifier == SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors.

The given path must be an absolute prim path that does not contain any variant selections.

If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget's namespace) issue an error and return an invalid UsdPrim.

Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget.

static USDGEOM_API UsdGeomCamera UsdGeomCamera::Get ( const UsdStagePtr &  stage,
const SdfPath path 
)
static

Return a UsdGeomCamera holding the prim adhering to this schema at path on stage. If no prim exists at path on stage, or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following:

UsdGeomCamera(stage->GetPrimAtPath(path));
USDGEOM_API GfCamera UsdGeomCamera::GetCamera ( const UsdTimeCode time) const

Creates a GfCamera object from the attribute values at time.

USDGEOM_API UsdAttribute UsdGeomCamera::GetClippingPlanesAttr ( ) const

Additional, arbitrarily oriented clipping planes. A vector (a,b,c,d) encodes a clipping plane that cuts off (x,y,z) with a * x + b * y + c * z + d * 1 < 0 where (x,y,z) are the coordinates in the camera's space.

Declaration float4[] clippingPlanes = []
C++ Type VtArray<GfVec4f>
Usd Type SdfValueTypeNames->Float4Array
USDGEOM_API UsdAttribute UsdGeomCamera::GetClippingRangeAttr ( ) const

Near and far clipping distances in scene units; see Units of Measure for Camera Properties .

Declaration float2 clippingRange = (1, 1000000)
C++ Type GfVec2f
Usd Type SdfValueTypeNames->Float2
USDGEOM_API UsdAttribute UsdGeomCamera::GetExposureAttr ( ) const

Exposure adjustment, as a log base-2 value. The default of 0.0 has no effect. A value of 1.0 will double the image-plane intensities in a rendered image; a value of -1.0 will halve them.

Declaration float exposure = 0
C++ Type float
Usd Type SdfValueTypeNames->Float
USDGEOM_API UsdAttribute UsdGeomCamera::GetFocalLengthAttr ( ) const

Perspective focal length in tenths of a scene unit; see Units of Measure for Camera Properties .

Declaration float focalLength = 50
C++ Type float
Usd Type SdfValueTypeNames->Float
USDGEOM_API UsdAttribute UsdGeomCamera::GetFocusDistanceAttr ( ) const

Distance from the camera to the focus plane in scene units; see Units of Measure for Camera Properties .

Declaration float focusDistance = 0
C++ Type float
Usd Type SdfValueTypeNames->Float
USDGEOM_API UsdAttribute UsdGeomCamera::GetFStopAttr ( ) const

Lens aperture. Defaults to 0.0, which turns off focusing.

Declaration float fStop = 0
C++ Type float
Usd Type SdfValueTypeNames->Float
USDGEOM_API UsdAttribute UsdGeomCamera::GetHorizontalApertureAttr ( ) const

Horizontal aperture in tenths of a scene unit; see Units of Measure for Camera Properties . Default is the equivalent of the standard 35mm spherical projector aperture.

Declaration float horizontalAperture = 20.955
C++ Type float
Usd Type SdfValueTypeNames->Float
USDGEOM_API UsdAttribute UsdGeomCamera::GetHorizontalApertureOffsetAttr ( ) const

Horizontal aperture offset in the same units as horizontalAperture. Defaults to 0.

Declaration float horizontalApertureOffset = 0
C++ Type float
Usd Type SdfValueTypeNames->Float
USDGEOM_API UsdAttribute UsdGeomCamera::GetProjectionAttr ( ) const
Declaration token projection = "perspective"
C++ Type TfToken
Usd Type SdfValueTypeNames->Token
Allowed Values perspective, orthographic
static USDGEOM_API const TfTokenVector& UsdGeomCamera::GetSchemaAttributeNames ( bool  includeInherited = true)
static

Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved.

USDGEOM_API UsdAttribute UsdGeomCamera::GetShutterCloseAttr ( ) const

Frame relative shutter close time, analogous comments from shutter:open apply. A value greater or equal to shutter:open should be authored, otherwise there is no exposure and a renderer should produce a black image.

Declaration double shutter:close = 0
C++ Type double
Usd Type SdfValueTypeNames->Double
USDGEOM_API UsdAttribute UsdGeomCamera::GetShutterOpenAttr ( ) const

Frame relative shutter open time in UsdTimeCode units (negative value indicates that the shutter opens before the current frame time). Used for motion blur.

Declaration double shutter:open = 0
C++ Type double
Usd Type SdfValueTypeNames->Double
USDGEOM_API UsdAttribute UsdGeomCamera::GetStereoRoleAttr ( ) const

If different from mono, the camera is intended to be the left or right camera of a stereo setup.

Declaration uniform token stereoRole = "mono"
C++ Type TfToken
Usd Type SdfValueTypeNames->Token
Variability SdfVariabilityUniform
Allowed Values mono, left, right
USDGEOM_API UsdAttribute UsdGeomCamera::GetVerticalApertureAttr ( ) const

Vertical aperture in tenths of a scene unit; see Units of Measure for Camera Properties . Default is the equivalent of the standard 35mm spherical projector aperture.

Declaration float verticalAperture = 15.2908
C++ Type float
Usd Type SdfValueTypeNames->Float
USDGEOM_API UsdAttribute UsdGeomCamera::GetVerticalApertureOffsetAttr ( ) const

Vertical aperture offset in the same units as verticalAperture. Defaults to 0.

Declaration float verticalApertureOffset = 0
C++ Type float
Usd Type SdfValueTypeNames->Float
USDGEOM_API void UsdGeomCamera::SetFromCamera ( const GfCamera camera,
const UsdTimeCode time 
)

Write attribute values from camera for time. These attributes will be updated:

  • projection
  • horizontalAperture
  • horizontalApertureOffset
  • verticalAperture
  • verticalApertureOffset
  • focalLength
  • clippingRange
  • clippingPlanes
  • fStop
  • focalDistance
  • xformOpOrder and xformOp:transform
Note
This will clear any existing xformOpOrder and replace it with a single xformOp:transform entry. The xformOp:transform property is created or updated here to match the transform on camera . This operation will fail if there are stronger xform op opinions in the composed layer stack that are stronger than that of the current edit target.

Friends And Related Function Documentation

friend class UsdSchemaRegistry
friend

Definition at line 195 of file camera.h.

Member Data Documentation

const UsdSchemaKind UsdGeomCamera::schemaKind = UsdSchemaKind::ConcreteTyped
static

Compile time constant representing what kind of schema this class is.

See Also
UsdSchemaKind

Definition at line 117 of file camera.h.


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