24#ifndef PXR_USD_IMAGING_USD_IMAGING_DRAW_MODE_ADAPTER_H
25#define PXR_USD_IMAGING_USD_IMAGING_DRAW_MODE_ADAPTER_H
28#include "pxr/usdImaging/usdImaging/api.h"
31PXR_NAMESPACE_OPEN_SCOPE
59 bool ShouldCullChildren()
const override;
67 bool CanPopulateUsdInstance()
const override;
76 HdDirtyBits* timeVaryingBits,
78 instancerContext = NULL)
const override;
84 HdDirtyBits requestedBits,
86 instancerContext = NULL)
const override;
95 TfToken const& property)
override;
108 void MarkDirty(
UsdPrim const& prim,
114 void MarkTransformDirty(
UsdPrim const& prim,
119 void MarkVisibilityDirty(
UsdPrim const& prim,
124 void MarkMaterialDirty(
UsdPrim const& prim,
137 VtIntArray *outIndices)
const override;
163 bool ignoreRootTransform =
false)
const override;
177 void _RemovePrim(
SdfPath const& cachePath,
183 void _SanityCheckFaceSizes(
SdfPath const& cachePath,
184 GfRange3d const& extents, uint8_t axes_mask)
187 void _ComputeGeometryData(
UsdPrim const& prim,
197 bool _IsMaterialPath(
SdfPath const& path)
const;
200 bool _IsTexturePath(
SdfPath const& path)
const;
203 bool _HasVaryingExtent(
UsdPrim const& prim)
const;
206 void _CheckForTextureVariability(
UsdPrim const& prim,
207 HdDirtyBits dirtyBits,
208 HdDirtyBits *timeVaryingBits)
const;
226 bool generateSubsets,
UsdPrim const& prim)
const;
229 void _GenerateCardsFromTextureGeometry(
VtValue* topo,
VtValue* points,
239 void _GenerateTextureCoordinates(
VtValue* uv, uint8_t axes_mask)
const;
242 using _DrawModeMap = TfHashMap<SdfPath, TfToken, SdfPath::Hash>;
243 _DrawModeMap _drawModeMap;
246 using _MaterialSet = TfHashSet<SdfPath, SdfPath::Hash>;
247 using _MaterialMap = TfHashMap<SdfPath, _MaterialSet, SdfPath::Hash>;
248 _MaterialMap _materialMap;
256PXR_NAMESPACE_CLOSE_SCOPE
Stores a 4x4 matrix of double elements.
Basic type: 3-dimensional floating point range.
Basic type for a vector of 3 float components.
A path value used to locate objects in layers or scenegraphs.
Token for efficient comparison, assignment, and hashing of known strings.
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
Delegate support for the drawMode attribute on UsdGeomModelAPI.
SdfPath Populate(UsdPrim const &prim, UsdImagingIndexProxy *index, UsdImagingInstancerContext const *instancerContext=NULL) override
Called to populate the RenderIndex for this UsdPrim.
USDIMAGING_API GfRange3d GetExtent(UsdPrim const &prim, SdfPath const &cachePath, UsdTimeCode time) const override
Reads the extent from the given prim.
USDIMAGING_API HdDirtyBits ProcessPropertyChange(UsdPrim const &prim, SdfPath const &cachePath, TfToken const &property) override
Returns a bit mask of attributes to be updated, or HdChangeTracker::AllDirty if the entire prim must ...
USDIMAGING_API bool GetDoubleSided(UsdPrim const &prim, SdfPath const &cachePath, UsdTimeCode time) const override
Reads double-sided from the given prim. If not authored, returns false.
USDIMAGING_API VtValue GetTopology(UsdPrim const &prim, SdfPath const &cachePath, UsdTimeCode time) const override
Gets the topology object of a specific Usd prim.
USDIMAGING_API void ProcessPrimResync(SdfPath const &cachePath, UsdImagingIndexProxy *index) override
When a PrimResync event occurs, the prim may have been deleted entirely, adapter plug-ins should over...
USDIMAGING_API HdCullStyle GetCullStyle(UsdPrim const &prim, SdfPath const &cachePath, UsdTimeCode time) const override
Gets the cullstyle of a specific path in the scene graph.
USDIMAGING_API void UpdateForTime(UsdPrim const &prim, SdfPath const &cachePath, UsdTimeCode time, HdDirtyBits requestedBits, UsdImagingInstancerContext const *instancerContext=NULL) const override
Populates the cache for the given prim, time and requestedBits.
bool IsSupported(UsdImagingIndexProxy const *index) const override
Returns true if the adapter can be populated into the target index.
USDIMAGING_API void TrackVariability(UsdPrim const &prim, SdfPath const &cachePath, HdDirtyBits *timeVaryingBits, UsdImagingInstancerContext const *instancerContext=NULL) const override
For the given prim, variability is detected and stored in timeVaryingBits.
USDIMAGING_API VtValue Get(UsdPrim const &prim, SdfPath const &cachePath, TfToken const &key, UsdTimeCode time, VtIntArray *outIndices) const override
Gets the value of the parameter named key for the given prim (which has the given cache path) and giv...
USDIMAGING_API void ProcessPrimRemoval(SdfPath const &cachePath, UsdImagingIndexProxy *index) override
Removes all associated Rprims and dependencies from the render index without scheduling them for repo...
USDIMAGING_API GfMatrix4d GetTransform(UsdPrim const &prim, SdfPath const &cachePath, UsdTimeCode time, bool ignoreRootTransform=false) const override
Fetches the transform for the given prim at the given time from a pre-computed cache of prim transfor...
This proxy class exposes a subset of the private Delegate API to PrimAdapters.
Base class for all PrimAdapters.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
Represent a time value, which may be either numeric, holding a double value, or a sentinel value UsdT...
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Object used by instancer prim adapters to pass along context about the instancer and instance prim to...