This document is for a version of USD that is under development. See this page for the current release.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
camera.h
Go to the documentation of this file.
1//
2// Copyright 2016 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef USDGEOM_GENERATED_CAMERA_H
8#define USDGEOM_GENERATED_CAMERA_H
9
11
12#include "pxr/pxr.h"
13#include "pxr/usd/usdGeom/api.h"
15#include "pxr/usd/usd/prim.h"
16#include "pxr/usd/usd/stage.h"
18
19#include "pxr/base/gf/camera.h"
20
21#include "pxr/base/vt/value.h"
22
23#include "pxr/base/gf/vec3d.h"
24#include "pxr/base/gf/vec3f.h"
26
27#include "pxr/base/tf/token.h"
28#include "pxr/base/tf/type.h"
29
30PXR_NAMESPACE_OPEN_SCOPE
31
32class SdfAssetPath;
33
34// -------------------------------------------------------------------------- //
35// CAMERA //
36// -------------------------------------------------------------------------- //
37
94{
95public:
99 static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped;
100
105 explicit UsdGeomCamera(const UsdPrim& prim=UsdPrim())
106 : UsdGeomXformable(prim)
107 {
108 }
109
113 explicit UsdGeomCamera(const UsdSchemaBase& schemaObj)
114 : UsdGeomXformable(schemaObj)
115 {
116 }
117
119 USDGEOM_API
120 virtual ~UsdGeomCamera();
121
125 USDGEOM_API
126 static const TfTokenVector &
127 GetSchemaAttributeNames(bool includeInherited=true);
128
138 USDGEOM_API
139 static UsdGeomCamera
140 Get(const UsdStagePtr &stage, const SdfPath &path);
141
164 USDGEOM_API
165 static UsdGeomCamera
166 Define(const UsdStagePtr &stage, const SdfPath &path);
167
168protected:
172 USDGEOM_API
174
175private:
176 // needs to invoke _GetStaticTfType.
177 friend class UsdSchemaRegistry;
178 USDGEOM_API
179 static const TfType &_GetStaticTfType();
180
181 static bool _IsTypedSchema();
182
183 // override SchemaBase virtuals.
184 USDGEOM_API
185 const TfType &_GetTfType() const override;
186
187public:
188 // --------------------------------------------------------------------- //
189 // PROJECTION
190 // --------------------------------------------------------------------- //
199 USDGEOM_API
201
207 USDGEOM_API
208 UsdAttribute CreateProjectionAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
209
210public:
211 // --------------------------------------------------------------------- //
212 // HORIZONTALAPERTURE
213 // --------------------------------------------------------------------- //
223 USDGEOM_API
225
231 USDGEOM_API
232 UsdAttribute CreateHorizontalApertureAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
233
234public:
235 // --------------------------------------------------------------------- //
236 // VERTICALAPERTURE
237 // --------------------------------------------------------------------- //
247 USDGEOM_API
249
255 USDGEOM_API
256 UsdAttribute CreateVerticalApertureAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
257
258public:
259 // --------------------------------------------------------------------- //
260 // HORIZONTALAPERTUREOFFSET
261 // --------------------------------------------------------------------- //
270 USDGEOM_API
272
278 USDGEOM_API
279 UsdAttribute CreateHorizontalApertureOffsetAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
280
281public:
282 // --------------------------------------------------------------------- //
283 // VERTICALAPERTUREOFFSET
284 // --------------------------------------------------------------------- //
293 USDGEOM_API
295
301 USDGEOM_API
302 UsdAttribute CreateVerticalApertureOffsetAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
303
304public:
305 // --------------------------------------------------------------------- //
306 // FOCALLENGTH
307 // --------------------------------------------------------------------- //
316 USDGEOM_API
318
324 USDGEOM_API
325 UsdAttribute CreateFocalLengthAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
326
327public:
328 // --------------------------------------------------------------------- //
329 // CLIPPINGRANGE
330 // --------------------------------------------------------------------- //
339 USDGEOM_API
341
347 USDGEOM_API
348 UsdAttribute CreateClippingRangeAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
349
350public:
351 // --------------------------------------------------------------------- //
352 // CLIPPINGPLANES
353 // --------------------------------------------------------------------- //
364 USDGEOM_API
366
372 USDGEOM_API
373 UsdAttribute CreateClippingPlanesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
374
375public:
376 // --------------------------------------------------------------------- //
377 // FSTOP
378 // --------------------------------------------------------------------- //
386 USDGEOM_API
388
394 USDGEOM_API
395 UsdAttribute CreateFStopAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
396
397public:
398 // --------------------------------------------------------------------- //
399 // FOCUSDISTANCE
400 // --------------------------------------------------------------------- //
409 USDGEOM_API
411
417 USDGEOM_API
418 UsdAttribute CreateFocusDistanceAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
419
420public:
421 // --------------------------------------------------------------------- //
422 // STEREOROLE
423 // --------------------------------------------------------------------- //
434 USDGEOM_API
436
442 USDGEOM_API
443 UsdAttribute CreateStereoRoleAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
444
445public:
446 // --------------------------------------------------------------------- //
447 // SHUTTEROPEN
448 // --------------------------------------------------------------------- //
458 USDGEOM_API
460
466 USDGEOM_API
467 UsdAttribute CreateShutterOpenAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
468
469public:
470 // --------------------------------------------------------------------- //
471 // SHUTTERCLOSE
472 // --------------------------------------------------------------------- //
483 USDGEOM_API
485
491 USDGEOM_API
492 UsdAttribute CreateShutterCloseAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
493
494public:
495 // --------------------------------------------------------------------- //
496 // EXPOSURE
497 // --------------------------------------------------------------------- //
508 USDGEOM_API
510
516 USDGEOM_API
517 UsdAttribute CreateExposureAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
518
519public:
520 // ===================================================================== //
521 // Feel free to add custom code below this line, it will be preserved by
522 // the code generator.
523 //
524 // Just remember to:
525 // - Close the class declaration with };
526 // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
527 // - Close the include guard with #endif
528 // ===================================================================== //
529 // --(BEGIN CUSTOM CODE)--
530
533 USDGEOM_API
534 GfCamera GetCamera(const UsdTimeCode &time) const;
535
557 USDGEOM_API
558 void SetFromCamera(const GfCamera &camera, const UsdTimeCode &time);
559};
560
561PXR_NAMESPACE_CLOSE_SCOPE
562
563#endif
Object-based representation of a camera.
Definition: camera.h:33
Contains an asset path and an optional resolved path.
Definition: assetPath.h:30
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:274
TfType represents a dynamic runtime type.
Definition: type.h:48
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
Definition: attribute.h:160
Transformable camera.
Definition: camera.h:94
USDGEOM_API UsdAttribute GetShutterOpenAttr() const
Frame relative shutter open time in UsdTimeCode units (negative value indicates that the shutter open...
USDGEOM_API UsdAttribute CreateExposureAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetExposureAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDGEOM_API UsdAttribute CreateFStopAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetFStopAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDGEOM_API UsdAttribute CreateVerticalApertureOffsetAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetVerticalApertureOffsetAttr(), and also Create vs Get Property Methods for when to use Get vs C...
USDGEOM_API UsdAttribute GetFocalLengthAttr() const
Perspective focal length in tenths of a scene unit; see Units of Measure for Camera Properties .
USDGEOM_API void SetFromCamera(const GfCamera &camera, const UsdTimeCode &time)
Write attribute values from camera for time.
USDGEOM_API UsdAttribute CreateFocusDistanceAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetFocusDistanceAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDGEOM_API UsdAttribute CreateFocalLengthAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetFocalLengthAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDGEOM_API UsdAttribute CreateShutterCloseAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetShutterCloseAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDGEOM_API UsdAttribute GetStereoRoleAttr() const
If different from mono, the camera is intended to be the left or right camera of a stereo setup.
static USDGEOM_API UsdGeomCamera Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdGeomCamera holding the prim adhering to this schema at path on stage.
static USDGEOM_API UsdGeomCamera Define(const UsdStagePtr &stage, const SdfPath &path)
Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefin...
USDGEOM_API UsdAttribute GetFStopAttr() const
Lens aperture.
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
Definition: camera.h:99
USDGEOM_API UsdAttribute GetHorizontalApertureOffsetAttr() const
Horizontal aperture offset in the same units as horizontalAperture.
USDGEOM_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
virtual USDGEOM_API ~UsdGeomCamera()
Destructor.
USDGEOM_API UsdAttribute CreateStereoRoleAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetStereoRoleAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
static USDGEOM_API const TfTokenVector & GetSchemaAttributeNames(bool includeInherited=true)
Return a vector of names of all pre-declared attributes for this schema class and all its ancestor cl...
USDGEOM_API UsdAttribute CreateHorizontalApertureOffsetAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetHorizontalApertureOffsetAttr(), and also Create vs Get Property Methods for when to use Get vs...
USDGEOM_API UsdAttribute CreateVerticalApertureAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetVerticalApertureAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDGEOM_API UsdAttribute GetExposureAttr() const
Exposure adjustment, as a log base-2 value.
UsdGeomCamera(const UsdSchemaBase &schemaObj)
Construct a UsdGeomCamera on the prim held by schemaObj .
Definition: camera.h:113
USDGEOM_API UsdAttribute GetClippingPlanesAttr() const
Additional, arbitrarily oriented clipping planes.
USDGEOM_API GfCamera GetCamera(const UsdTimeCode &time) const
Creates a GfCamera object from the attribute values at time.
USDGEOM_API UsdAttribute CreateShutterOpenAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetShutterOpenAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDGEOM_API UsdAttribute GetFocusDistanceAttr() const
Distance from the camera to the focus plane in scene units; see Units of Measure for Camera Propertie...
USDGEOM_API UsdAttribute GetClippingRangeAttr() const
Near and far clipping distances in scene units; see Units of Measure for Camera Properties .
USDGEOM_API UsdAttribute CreateClippingPlanesAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetClippingPlanesAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDGEOM_API UsdAttribute GetProjectionAttr() const
USDGEOM_API UsdAttribute CreateClippingRangeAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetClippingRangeAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDGEOM_API UsdAttribute GetVerticalApertureOffsetAttr() const
Vertical aperture offset in the same units as verticalAperture.
USDGEOM_API UsdAttribute CreateProjectionAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetProjectionAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDGEOM_API UsdAttribute GetHorizontalApertureAttr() const
Horizontal aperture in tenths of a scene unit; see Units of Measure for Camera Properties .
UsdGeomCamera(const UsdPrim &prim=UsdPrim())
Construct a UsdGeomCamera on UsdPrim prim .
Definition: camera.h:105
USDGEOM_API UsdAttribute GetShutterCloseAttr() const
Frame relative shutter close time, analogous comments from shutter:open apply.
USDGEOM_API UsdAttribute GetVerticalApertureAttr() const
Vertical aperture in tenths of a scene unit; see Units of Measure for Camera Properties .
USDGEOM_API UsdAttribute CreateHorizontalApertureAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetHorizontalApertureAttr(), and also Create vs Get Property Methods for when to use Get vs Creat...
Base class for all transformable prims, which allows arbitrary sequences of component affine transfor...
Definition: xformable.h:236
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
Definition: prim.h:117
The base class for all schema types in Usd.
Definition: schemaBase.h:39
Singleton registry that provides access to schema type information and the prim definitions for regis...
Represent a time value, which may be either numeric, holding a double value, or a sentinel value UsdT...
Definition: timeCode.h:67
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:147
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
Definition: common.h:112
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:440