7#ifndef PXR_USD_IMAGING_USD_IMAGING_DRAW_MODE_ADAPTER_H
8#define PXR_USD_IMAGING_USD_IMAGING_DRAW_MODE_ADAPTER_H
11#include "pxr/usd/sdf/path.h"
12#include "pxr/usdImaging/usdImaging/api.h"
13#include "pxr/usdImaging/usdImaging/instanceablePrimAdapter.h"
15PXR_NAMESPACE_OPEN_SCOPE
42 bool ShouldCullChildren()
const override;
52 bool CanPopulateUsdInstance()
const override;
61 HdDirtyBits* timeVaryingBits,
63 instancerContext = NULL)
const override;
69 HdDirtyBits requestedBits,
71 instancerContext = NULL)
const override;
80 TfToken const& property)
override;
93 void MarkDirty(
UsdPrim const& prim,
99 void MarkTransformDirty(
UsdPrim const& prim,
104 void MarkVisibilityDirty(
UsdPrim const& prim,
109 void MarkMaterialDirty(
UsdPrim const& prim,
122 VtIntArray *outIndices)
const override;
148 bool ignoreRootTransform =
false)
const override;
162 void _RemovePrim(
SdfPath const& cachePath,
168 void _SanityCheckFaceSizes(
SdfPath const& cachePath,
169 GfRange3d const& extents, uint8_t axes_mask)
172 void _ComputeGeometryData(
UsdPrim const& prim,
182 bool _IsMaterialPath(
SdfPath const& path)
const;
185 bool _IsTexturePath(
SdfPath const& path)
const;
188 bool _HasVaryingExtent(
UsdPrim const& prim)
const;
191 void _CheckForTextureVariability(
UsdPrim const& prim,
192 HdDirtyBits dirtyBits,
193 HdDirtyBits *timeVaryingBits)
const;
211 bool generateSubsets,
UsdPrim const& prim)
const;
214 void _GenerateCardsFromTextureGeometry(
VtValue* topo,
VtValue* points,
224 void _GenerateTextureCoordinates(
VtValue* uv, uint8_t axes_mask)
const;
227 using _DrawModeMap = TfHashMap<SdfPath, TfToken, SdfPath::Hash>;
228 _DrawModeMap _drawModeMap;
231 using _MaterialSet = TfHashSet<SdfPath, SdfPath::Hash>;
232 using _MaterialMap = TfHashMap<SdfPath, _MaterialSet, SdfPath::Hash>;
233 _MaterialMap _materialMap;
241PXR_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.
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.
USDIMAGING_API bool IsSupported(UsdImagingIndexProxy const *index) const override
Returns true if the adapter can be populated into the target index.
USDIMAGING_API SdfPath Populate(UsdPrim const &prim, UsdImagingIndexProxy *index, UsdImagingInstancerContext const *instancerContext=NULL) override
Called to populate the RenderIndex for this UsdPrim.
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.
An abstract adapter class for prims that are instanceable.
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...