7 #ifndef __usd_SurfaceAccessorUsd_h__ 8 #define __usd_SurfaceAccessorUsd_h__ 24 { setName(
"SurfaceAccessorUsd"); }
28 using SurfaceAccessorBase::set;
29 using SurfaceAccessorBase::append;
30 using SurfaceAccessorBase::spatialVector;
33 BWORD bind(SurfaceAccessibleI::Element a_element,
34 SurfaceAccessibleI::Attribute a_attribute);
35 BWORD bind(SurfaceAccessibleI::Element a_element,
38 virtual U32 count(
void)
const;
39 virtual U32 subCount(U32 a_index)
const;
41 virtual void set(U32 a_index,U32 a_subIndex,
String a_string);
42 virtual String string(U32 a_index,U32 a_subIndex=0);
44 virtual void set(U32 a_index,U32 a_subIndex,I32 a_integer);
45 virtual I32 integer(U32 a_index,U32 a_subIndex=0);
48 virtual I32 append(SurfaceAccessibleI::Form a_form)
50 virtual void append(U32 a_index,I32 a_integer) {}
52 virtual void set(U32 a_index,U32 a_subIndex,Real a_real);
53 virtual Real real(U32 a_index,U32 a_subIndex=0);
55 virtual void set(U32 a_index,U32 a_subIndex,
57 virtual SpatialVector spatialVector(U32 a_index,U32 a_subIndex=0);
63 m_spPrimNode=a_spPrimNode;
64 if(m_spPrimNode.isValid())
66 m_usdPrim=m_spPrimNode->usdPrim();
71 {
return m_spPrimNode; }
73 void setFrame(Real a_frame)
76 void setYToZ(BWORD a_ytoz) { m_ytoz=a_ytoz; }
80 virtual BWORD bindInternal(SurfaceAccessibleI::Element a_element,
83 I32 indexOfVertex(I32 a_index,I32 a_subIndex)
85 FEASSERT(a_index<I32(m_primTable.size()));
86 FEASSERT(a_subIndex<m_primTable[a_index][1]);
87 if(a_index>=I32(m_primTable.size()) ||
88 a_subIndex>=m_primTable[a_index][1])
93 m_primTable[a_index][0]+a_subIndex;
95 const BWORD elementVertex=
96 (m_element==SurfaceAccessibleI::e_vertex);
97 FEASSERT(elementVertex ||
98 tableIndex<m_intArray.size());
99 return elementVertex? tableIndex:
100 m_intArray[tableIndex];
103 void addString(
void);
104 void addInteger(
void);
106 void addSpatialVector(
void);
109 SurfaceAccessibleI::Element a_element)
const;
110 I32 primElemCount(
void)
const;
112 BWORD isBound(
void)
const 113 {
return m_spPrimNode.isValid() &&
114 m_usdPrim.IsValid(); }
116 BWORD matchingCount(SurfaceAccessibleI::Element a_element,
121 BWORD writeBack(
void);
131 UsdAttribute m_usdAttribute;
132 UsdAttribute m_mappingAttribute;
140 VtArray<TfToken> m_tokenArray;
141 VtArray<bool> m_boolArray;
142 VtArray<int> m_intArray;
143 VtArray<float> m_floatArray;
144 VtArray<double> m_doubleArray;
145 VtArray<GfVec3f> m_vec3Array;
146 VtArray<GfVec2f> m_vec2Array;
147 VtArray<GfMatrix4d> m_mat4Array;
kernel
Definition: namespace.dox:3
Common Functionality for Accessor Surface.
Definition: SurfaceAccessorBase.h:20
Automatically reference-counted string container.
Definition: String.h:128
USD Surface Editing Implementation.
Definition: SurfaceAccessorUsd.h:19
Wrapper for std::vector.
Definition: Array.h:21