Loading...
Searching...
No Matches
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
95{
96public:
100 static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped;
101
106 explicit UsdGeomCamera(const UsdPrim& prim=UsdPrim())
107 : UsdGeomXformable(prim)
108 {
109 }
110
114 explicit UsdGeomCamera(const UsdSchemaBase& schemaObj)
115 : UsdGeomXformable(schemaObj)
116 {
117 }
118
120 USDGEOM_API
121 virtual ~UsdGeomCamera();
122
126 USDGEOM_API
127 static const TfTokenVector &
128 GetSchemaAttributeNames(bool includeInherited=true);
129
139 USDGEOM_API
140 static UsdGeomCamera
141 Get(const UsdStagePtr &stage, const SdfPath &path);
142
165 USDGEOM_API
166 static UsdGeomCamera
167 Define(const UsdStagePtr &stage, const SdfPath &path);
168
169protected:
173 USDGEOM_API
175
176private:
177 // needs to invoke _GetStaticTfType.
178 friend class UsdSchemaRegistry;
179 USDGEOM_API
180 static const TfType &_GetStaticTfType();
181
182 static bool _IsTypedSchema();
183
184 // override SchemaBase virtuals.
185 USDGEOM_API
186 const TfType &_GetTfType() const override;
187
188public:
189 // --------------------------------------------------------------------- //
190 // PROJECTION
191 // --------------------------------------------------------------------- //
200 USDGEOM_API
202
208 USDGEOM_API
209 UsdAttribute CreateProjectionAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
210
211public:
212 // --------------------------------------------------------------------- //
213 // HORIZONTALAPERTURE
214 // --------------------------------------------------------------------- //
224 USDGEOM_API
226
232 USDGEOM_API
233 UsdAttribute CreateHorizontalApertureAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
234
235public:
236 // --------------------------------------------------------------------- //
237 // VERTICALAPERTURE
238 // --------------------------------------------------------------------- //
248 USDGEOM_API
250
256 USDGEOM_API
257 UsdAttribute CreateVerticalApertureAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
258
259public:
260 // --------------------------------------------------------------------- //
261 // HORIZONTALAPERTUREOFFSET
262 // --------------------------------------------------------------------- //
271 USDGEOM_API
273
279 USDGEOM_API
280 UsdAttribute CreateHorizontalApertureOffsetAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
281
282public:
283 // --------------------------------------------------------------------- //
284 // VERTICALAPERTUREOFFSET
285 // --------------------------------------------------------------------- //
294 USDGEOM_API
296
302 USDGEOM_API
303 UsdAttribute CreateVerticalApertureOffsetAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
304
305public:
306 // --------------------------------------------------------------------- //
307 // FOCALLENGTH
308 // --------------------------------------------------------------------- //
317 USDGEOM_API
319
325 USDGEOM_API
326 UsdAttribute CreateFocalLengthAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
327
328public:
329 // --------------------------------------------------------------------- //
330 // CLIPPINGRANGE
331 // --------------------------------------------------------------------- //
340 USDGEOM_API
342
348 USDGEOM_API
349 UsdAttribute CreateClippingRangeAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
350
351public:
352 // --------------------------------------------------------------------- //
353 // CLIPPINGPLANES
354 // --------------------------------------------------------------------- //
365 USDGEOM_API
367
373 USDGEOM_API
374 UsdAttribute CreateClippingPlanesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
375
376public:
377 // --------------------------------------------------------------------- //
378 // FSTOP
379 // --------------------------------------------------------------------- //
387 USDGEOM_API
389
395 USDGEOM_API
396 UsdAttribute CreateFStopAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
397
398public:
399 // --------------------------------------------------------------------- //
400 // FOCUSDISTANCE
401 // --------------------------------------------------------------------- //
410 USDGEOM_API
412
418 USDGEOM_API
419 UsdAttribute CreateFocusDistanceAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
420
421public:
422 // --------------------------------------------------------------------- //
423 // STEREOROLE
424 // --------------------------------------------------------------------- //
435 USDGEOM_API
437
443 USDGEOM_API
444 UsdAttribute CreateStereoRoleAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
445
446public:
447 // --------------------------------------------------------------------- //
448 // SHUTTEROPEN
449 // --------------------------------------------------------------------- //
459 USDGEOM_API
461
467 USDGEOM_API
468 UsdAttribute CreateShutterOpenAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
469
470public:
471 // --------------------------------------------------------------------- //
472 // SHUTTERCLOSE
473 // --------------------------------------------------------------------- //
484 USDGEOM_API
486
492 USDGEOM_API
493 UsdAttribute CreateShutterCloseAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
494
495public:
496 // --------------------------------------------------------------------- //
497 // EXPOSURE
498 // --------------------------------------------------------------------- //
509 USDGEOM_API
511
517 USDGEOM_API
518 UsdAttribute CreateExposureAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
519
520public:
521 // ===================================================================== //
522 // Feel free to add custom code below this line, it will be preserved by
523 // the code generator.
524 //
525 // Just remember to:
526 // - Close the class declaration with };
527 // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
528 // - Close the include guard with #endif
529 // ===================================================================== //
530 // --(BEGIN CUSTOM CODE)--
531
534 USDGEOM_API
535 GfCamera GetCamera(const UsdTimeCode &time) const;
536
558 USDGEOM_API
559 void SetFromCamera(const GfCamera &camera, const UsdTimeCode &time);
560};
561
562PXR_NAMESPACE_CLOSE_SCOPE
563
564#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:159
Transformable camera.
Definition: camera.h:95
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:100
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:114
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:106
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