HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
coordSys.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_IMAGING_HD_COORD_SYS_H
8
#define PXR_IMAGING_HD_COORD_SYS_H
9
10
#include "
pxr/pxr.h
"
11
#include "
pxr/imaging/hd/api.h
"
12
#include "
pxr/imaging/hd/version.h
"
13
#include "
pxr/imaging/hd/sprim.h
"
14
15
PXR_NAMESPACE_OPEN_SCOPE
16
17
/// \class HdCoordSys
18
///
19
/// HdCoordSys representes a coordinate system as a Hydra state prim.
20
///
21
/// Coordinate systems may be referred to by name from a shader network.
22
/// Following the convention in UsdShadeCoordSysAPI, we use the Hydra
23
/// id to establish the name, where the id is a namespaced property
24
/// path of the form <tt><.../prim.coordSys:NAME></tt>. GetName()
25
/// will retrieve the name.
26
///
27
/// Each rprim may have a set of bound coordinate systems, which
28
/// may be retrieved via the <tt>HdTokens->coordSysBindings</tt> key.
29
/// The returned value is of type HdIdVectorSharedPtr, a reference-
30
/// counted pointer to a vector of ids of coordinate systems.
31
/// The intention of this design is to make it efficient for scene
32
/// delegates to communicate to renderer delegates the common
33
/// mappings of bound coordinate systems across groups of rprims.
34
///
35
/// The transform value of an HdCoordSys is the matrix representation
36
/// of the transform from its local space to world space. In other
37
/// words, it has the same interpretation as the transform for rprims.
38
///
39
class
HdCoordSys
:
public
HdSprim
40
{
41
public
:
42
HD_API
43
HdCoordSys
(
SdfPath
const
&
id
);
44
HD_API
45
~HdCoordSys
()
override
;
46
47
// Change tracking for HdCoordSys
48
enum
DirtyBits
:
HdDirtyBits
{
49
Clean
= 0,
50
DirtyName
= 1 << 0,
51
DirtyTransform
= 1 << 1,
52
AllDirty
= (
DirtyTransform
53
|
DirtyName
)
54
};
55
56
/// Returns the name bound to this coordinate system.
57
///
58
/// There may be multiple coordinate systems with the same
59
/// name, but they must associate with disjoint sets of rprims.
60
TfToken
GetName
()
const
{
return
_name; }
61
62
HD_API
63
void
Sync
(
HdSceneDelegate
*sceneDelegate,
64
HdRenderParam
*renderParam,
65
HdDirtyBits
*dirtyBits)
override
;
66
67
HD_API
68
HdDirtyBits
GetInitialDirtyBitsMask
()
const override
;
69
70
private
:
71
TfToken
_name;
72
};
73
74
PXR_NAMESPACE_CLOSE_SCOPE
75
76
#endif // PXR_IMAGING_HD_COORD_SYS_H
HdCoordSys::DirtyBits
DirtyBits
Definition:
coordSys.h:48
HdCoordSys::DirtyName
Definition:
coordSys.h:50
HdDirtyBits
uint32_t HdDirtyBits
Definition:
types.h:143
api.h
HD_API
#define HD_API
Definition:
api.h:23
HdCoordSys::Sync
HD_API void Sync(HdSceneDelegate *sceneDelegate, HdRenderParam *renderParam, HdDirtyBits *dirtyBits) override
HdRenderParam
Definition:
renderDelegate.h:45
HdCoordSys::DirtyTransform
Definition:
coordSys.h:51
version.h
TfToken
Definition:
token.h:70
HdCoordSys::AllDirty
Definition:
coordSys.h:52
HdCoordSys::GetInitialDirtyBitsMask
HD_API HdDirtyBits GetInitialDirtyBitsMask() const override
pxr.h
HdSceneDelegate
Definition:
sceneDelegate.h:404
SdfPath
Definition:
path.h:273
HdCoordSys::HdCoordSys
HD_API HdCoordSys(SdfPath const &id)
HdSprim
Definition:
sprim.h:34
PXR_NAMESPACE_OPEN_SCOPE
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition:
path.h:1425
PXR_NAMESPACE_CLOSE_SCOPE
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition:
pxr.h:74
HdCoordSys
Definition:
coordSys.h:39
HdCoordSys::~HdCoordSys
HD_API ~HdCoordSys() override
sprim.h
HdCoordSys::Clean
Definition:
coordSys.h:49
HdCoordSys::GetName
TfToken GetName() const
Definition:
coordSys.h:60
pxr
imaging
hd
coordSys.h
Generated on Wed Aug 27 2025 03:07:54 for HDK by
1.8.6