24 #ifndef PXR_IMAGING_HD_DRAWING_COORD_H 25 #define PXR_IMAGING_HD_DRAWING_COORD_H 28 #include "pxr/imaging/hd/api.h" 29 #include "pxr/imaging/hd/version.h" 33 PXR_NAMESPACE_OPEN_SCOPE
85 static const int CustomSlotsBegin = 8;
86 static const int DefaultNumSlots = 3;
87 static const int Unassigned = -1;
92 _instancePrimvar(Unassigned),
97 _faceVaryingPrimvar(5),
98 _topologyVisibility(6),
102 int GetConstantPrimvarIndex()
const {
return _constantPrimvar; }
103 void SetConstantPrimvarIndex(
int slot) { _constantPrimvar = slot; }
104 int GetVertexPrimvarIndex()
const {
return _vertexPrimvar; }
105 void SetVertexPrimvarIndex(
int slot) { _vertexPrimvar = slot; }
106 int GetTopologyIndex()
const {
return _topology; }
107 void SetTopologyIndex(
int slot) { _topology = slot; }
108 int GetElementPrimvarIndex()
const {
return _elementPrimvar; }
109 void SetElementPrimvarIndex(
int slot) { _elementPrimvar = slot; }
110 int GetInstanceIndexIndex()
const {
return _instanceIndex; }
111 void SetInstanceIndexIndex(
int slot) { _instanceIndex = slot; }
112 int GetFaceVaryingPrimvarIndex()
const {
return _faceVaryingPrimvar; }
113 void SetFaceVaryingPrimvarIndex(
int slot) { _faceVaryingPrimvar = slot; }
114 int GetTopologyVisibilityIndex()
const {
return _topologyVisibility; }
115 void SetTopologyVisibilityIndex(
int slot) { _topologyVisibility = slot; }
116 int GetVaryingPrimvarIndex()
const {
return _varyingPrimvar; }
117 void SetVaryingPrimvarIndex(
int slot) { _varyingPrimvar = slot; }
120 void SetInstancePrimvarBaseIndex(
int slot) { _instancePrimvar = slot; }
121 int GetInstancePrimvarIndex(
int level)
const {
122 TF_VERIFY(_instancePrimvar != Unassigned);
123 return _instancePrimvar + level;
128 int16_t _instancePrimvar;
129 int8_t _constantPrimvar;
130 int8_t _vertexPrimvar;
131 int8_t _elementPrimvar;
132 int8_t _instanceIndex;
133 int8_t _faceVaryingPrimvar;
134 int8_t _topologyVisibility;
135 int8_t _varyingPrimvar;
139 PXR_NAMESPACE_CLOSE_SCOPE
141 #endif // PXR_IMAGING_HD_DRAWING_COORD_H Low-level utilities for informing users of various internal and external diagnostic conditions.
#define TF_VERIFY(cond, format,...)
Checks a condition and reports an error if it evaluates false.
A tiny set of integers, which provides an indirection mapping from the conceptual space of an HdRprim...