HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
camera.h
Go to the documentation of this file.
1 //
2 // Copyright 2019 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 //
7 #ifndef PXR_USD_IMAGING_USD_APP_UTILS_CAMERA_H
8 #define PXR_USD_IMAGING_USD_APP_UTILS_CAMERA_H
9 
10 /// \file usdAppUtils/camera.h
11 ///
12 /// Collection of module-scoped utilities for applications that operate using
13 /// USD cameras.
14 
15 #include "pxr/pxr.h"
17 
18 #include "pxr/usd/sdf/path.h"
19 #include "pxr/usd/usd/stage.h"
20 #include "pxr/usd/usdGeom/camera.h"
21 
22 
24 
25 
26 /// Gets the UsdGeomCamera matching \p cameraPath from the USD stage \p stage.
27 ///
28 /// If \p cameraPath is an absolute path, this is equivalent to
29 /// UsdGeomCamera::Get(). Otherwise, if \p cameraPath is a single-element path
30 /// representing just the name of a camera prim, then \p stage will be searched
31 /// looking for a UsdGeomCamera matching that name. The UsdGeomCamera schema
32 /// for that prim will be returned if found, or an invalid UsdGeomCamera will
33 /// be returned if not.
34 ///
35 /// Note that if \p cameraPath is a multi-element path, a warning is issued and
36 /// it is just made absolute using the absolute root path before searching. In
37 /// the future, this could potentially be changed to use a suffix-based match.
40  const UsdStagePtr& stage,
41  const SdfPath& cameraPath);
42 
43 
45 
46 
47 #endif
PXR_NAMESPACE_OPEN_SCOPE USDAPPUTILS_API UsdGeomCamera UsdAppUtilsGetCameraAtPath(const UsdStagePtr &stage, const SdfPath &cameraPath)
#define USDAPPUTILS_API
Definition: api.h:23
Definition: path.h:273
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74