24 #ifndef _GUSD_GU_USD_H_
25 #define _GUSD_GU_USD_H_
51 #define GUSD_PATH_ATTR "usdpath"
52 #define GUSD_PRIMPATH_ATTR "usdprimpath"
53 #define GUSD_FRAME_ATTR "frame"
54 #define GUSD_VARIANTS_ATTR "usdvariants"
55 #define GUSD_CONSTRAINT_ATTR "usdconstraint"
56 #define GUSD_PURPOSE_ATTR "usdpurpose"
57 #define GUSD_ACTIVE_ATTR "usdactive"
58 #define GUSD_VISIBLE_ATTR "usdvisible"
60 #define GUSD_OVERTRANSFORMS_ATTR "usdovertransforms"
61 #define GUSD_OVERPOINTS_ATTR "usdoverpoints"
62 #define GUSD_OVERPRIMVARS_ATTR "usdoverprimvars"
63 #define GUSD_OVERALL_ATTR "usdoverall"
65 #define GUSD_WRITESTATICTOPOLOGY_ATTR "usdwritestatictopology"
66 #define GUSD_WRITESTATICPRIMVARS_ATTR "usdwritestaticprimvars"
67 #define GUSD_WRITESTATICGEO_ATTR "usdwritestaticgeo"
72 #define GUSD_REFINE_ADDPATHATTRIB "usd:addPathAttribute"
73 #define GUSD_REFINE_PATHATTRIB "usd:pathAttribute"
74 #define GUSD_REFINE_ADDPRIMPATHATTRIB "usd:addPrimPathAttribute"
75 #define GUSD_REFINE_PRIMPATHATTRIB "usd:primPathAttribute"
76 #define GUSD_REFINE_ADDMATERIALPATHATTRIB "usd:addMaterialPathAttribute"
77 #define GUSD_REFINE_ADDVISIBILITYATTRIB "usd:addVisibilityAttribute"
78 #define GUSD_REFINE_IMPORTCOMPUTEDVISIBILITY "usd:importComputedVisibility"
79 #define GUSD_REFINE_ADDXFORMATTRIB "usd:addXformAttribute"
80 #define GUSD_REFINE_NONTRANSFORMINGPATTERN "usd:nonTransformingPrimvarPattern"
81 #define GUSD_REFINE_PRIMVARPATTERN "usd:primvarPattern"
82 #define GUSD_REFINE_IMPORTINHERITEDPRIMVARS "usd:importInheritedPrimvars"
83 #define GUSD_REFINE_ATTRIBUTEPATTERN "usd:attributePattern"
84 #define GUSD_REFINE_TRANSLATESTTOUV "usd:translateSTtoUV"
92 static bool OffsetArrayFromRange(
const GA_Range&
r,
96 static bool ComputeRangeIndexMap(
const GA_Range& r,
131 static bool GetTimeCodesFromAttr(
const GA_Range& rng,
135 static bool GetTimeCodesFromPackedPrims(
const GA_Range& rng,
141 static bool GetPrimPathsFromStringAttr(
const GA_Attribute& attr,
145 static bool GetPrimPathsFromStringAttr(
const GA_Attribute& attr,
154 static bool GetTokensFromStringAttr(
const GA_Attribute& attr,
156 const char* nameSpace=
nullptr);
158 static bool GetTokensFromStringAttr(
const GA_Attribute& attr,
161 const char* nameSpace=
nullptr);
185 static void RegisterPackedPrimBuildFunc(
const TfToken& typeName,
186 PackedPrimBuildFunc
func );
190 static bool AppendPackedPrims(
201 static bool AppendPackedPrimsFromLopNode(
218 static GA_Offset AppendExpandedRefPoints(
227 static bool AppendExpandedPackedPrims(
235 bool unpackToPolygons,
238 bool translateSTtoUV,
242 static bool AppendExpandedPackedPrimsFromLopNode(
249 bool unpackToPolygons,
251 bool importInheritedPrimvars,
253 bool translateSTtoUV,
266 static bool WriteVariantSelectionsToAttr(
274 static bool WriteVariantSelectionsToPackedPrims(
285 static GA_Offset AppendRefPointsForExpandedVariants(
294 static GA_Offset AppendPackedPrimsForExpandedVariants(
302 static bool GetPackedPrimStageIdsViewportLODsAndPurposes(
315 static bool ComputeTransformsFromAttrs(
const GA_Detail& gd,
320 static bool ComputeTransformsFromPackedPrims(
const GA_Detail& gd,
342 static bool SetTransformAttrs(
GU_Detail& gd,
345 OrientAttrRepresentation orientRep,
346 ScaleAttrRepresentation scaleRep,
349 static bool SetPackedPrimTransforms(
GU_Detail& gd,
353 static bool MultTransformableAttrs(
GU_Detail& gd,
357 bool keepLengths=
false,
361 static bool ImportPrimUnpacked(
GU_Detail& gd,
364 const char*
lod =
nullptr,
369 bool translateSTtoUV =
true,
Definition of a geometry attribute.
GT_API const UT_StringHolder time
GLuint GLsizei const GLuint const GLintptr * offsets
#define GUSD_PRIMPATH_ATTR
A range of elements in an index-map.
GusdUSD_Traverse::PrimIndexPair PrimIndexPair
static const UT_StringHolder theEmptyString
Methods for USD scene traversal.
std::pair< UsdPrim, exint > PrimIndexPair
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
#define PXR_NAMESPACE_CLOSE_SCOPE
Container class for all geometry.
#define GUSD_VARIANTS_ATTR
GA_API const UT_StringHolder rest
GLenum const void * paths