HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UsdGeomModelAPI Class Reference

#include <modelAPI.h>

+ Inheritance diagram for UsdGeomModelAPI:

Public Member Functions

 UsdGeomModelAPI (const UsdPrim &prim=UsdPrim())
 
 UsdGeomModelAPI (const UsdSchemaBase &schemaObj)
 
virtual USDGEOM_API ~UsdGeomModelAPI ()
 Destructor. More...
 
USDGEOM_API UsdAttribute GetModelDrawModeAttr () const
 
USDGEOM_API UsdAttribute CreateModelDrawModeAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 
USDGEOM_API UsdAttribute GetModelApplyDrawModeAttr () const
 
USDGEOM_API UsdAttribute CreateModelApplyDrawModeAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 
USDGEOM_API UsdAttribute GetModelDrawModeColorAttr () const
 
USDGEOM_API UsdAttribute CreateModelDrawModeColorAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 
USDGEOM_API UsdAttribute GetModelCardGeometryAttr () const
 
USDGEOM_API UsdAttribute CreateModelCardGeometryAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 
USDGEOM_API UsdAttribute GetModelCardTextureXPosAttr () const
 
USDGEOM_API UsdAttribute CreateModelCardTextureXPosAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 
USDGEOM_API UsdAttribute GetModelCardTextureYPosAttr () const
 
USDGEOM_API UsdAttribute CreateModelCardTextureYPosAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 
USDGEOM_API UsdAttribute GetModelCardTextureZPosAttr () const
 
USDGEOM_API UsdAttribute CreateModelCardTextureZPosAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 
USDGEOM_API UsdAttribute GetModelCardTextureXNegAttr () const
 
USDGEOM_API UsdAttribute CreateModelCardTextureXNegAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 
USDGEOM_API UsdAttribute GetModelCardTextureYNegAttr () const
 
USDGEOM_API UsdAttribute CreateModelCardTextureYNegAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 
USDGEOM_API UsdAttribute GetModelCardTextureZNegAttr () const
 
USDGEOM_API UsdAttribute CreateModelCardTextureZNegAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 
USDGEOM_API TfToken ComputeModelDrawMode (const TfToken &parentDrawMode=TfToken()) const
 
Model Extents Hint API

Methods for querying, authoring and computing the model's "extentsHint".

USDGEOM_API bool GetExtentsHint (VtVec3fArray *extents, const UsdTimeCode &time=UsdTimeCode::Default()) const
 
USDGEOM_API bool SetExtentsHint (VtVec3fArray const &extents, const UsdTimeCode &time=UsdTimeCode::Default()) const
 
USDGEOM_API UsdAttribute GetExtentsHintAttr () const
 Returns the custom 'extentsHint' attribute if it exits. More...
 
USDGEOM_API VtVec3fArray ComputeExtentsHint (UsdGeomBBoxCache &bboxCache) const
 
Model Constraint Targets API

Methods for adding and listing constraint targets.

USDGEOM_API UsdGeomConstraintTarget GetConstraintTarget (const std::string &constraintName) const
 
USDGEOM_API UsdGeomConstraintTarget CreateConstraintTarget (const std::string &constraintName) const
 
USDGEOM_API std::vector
< UsdGeomConstraintTarget
GetConstraintTargets () const
 
- Public Member Functions inherited from UsdAPISchemaBase
 UsdAPISchemaBase (const UsdPrim &prim=UsdPrim())
 
 UsdAPISchemaBase (const UsdSchemaBase &schemaObj)
 
virtual USD_API ~UsdAPISchemaBase ()=0
 Destructor. More...
 
- Public Member Functions inherited from UsdSchemaBase
bool IsConcrete () const
 
bool IsTyped () const
 
bool IsAPISchema () const
 Returns whether this is an API schema or not. More...
 
bool IsAppliedAPISchema () const
 
bool IsMultipleApplyAPISchema () const
 
UsdSchemaKind GetSchemaKind () const
 Returns the kind of schema this class is. More...
 
USD_API UsdSchemaBase (const UsdPrim &prim=UsdPrim())
 Construct and store prim as the held prim. More...
 
USD_API UsdSchemaBase (const UsdSchemaBase &otherSchema)
 Construct and store for the same prim held by otherSchema. More...
 
virtual USD_API ~UsdSchemaBase ()
 Destructor. More...
 
USD_API operator bool () const
 
UsdPrim GetPrim () const
 Return this schema object's held prim. More...
 
SdfPath GetPath () const
 Shorthand for GetPrim()->GetPath(). More...
 
USD_API const UsdPrimDefinitionGetSchemaClassPrimDefinition () const
 

Static Public Member Functions

static USDGEOM_API const
TfTokenVector
GetSchemaAttributeNames (bool includeInherited=true)
 
static USDGEOM_API UsdGeomModelAPI Get (const UsdStagePtr &stage, const SdfPath &path)
 
static USDGEOM_API bool CanApply (const UsdPrim &prim, std::string *whyNot=nullptr)
 
static USDGEOM_API UsdGeomModelAPI Apply (const UsdPrim &prim)
 
- Static Public Member Functions inherited from UsdAPISchemaBase
static USD_API const
TfTokenVector
GetSchemaAttributeNames (bool includeInherited=true)
 
- Static Public Member Functions inherited from UsdSchemaBase
static const TfTokenVectorGetSchemaAttributeNames (bool includeInherited=true)
 

Static Public Attributes

static const UsdSchemaKind schemaKind = UsdSchemaKind::SingleApplyAPI
 
- Static Public Attributes inherited from UsdAPISchemaBase
static const UsdSchemaKind schemaKind = UsdSchemaKind::AbstractBase
 
- Static Public Attributes inherited from UsdSchemaBase
static const UsdSchemaKind schemaKind = UsdSchemaKind::AbstractBase
 

Protected Member Functions

USDGEOM_API UsdSchemaKind _GetSchemaKind () const override
 
- Protected Member Functions inherited from UsdAPISchemaBase
 UsdAPISchemaBase (const UsdPrim &prim, const TfToken &instanceName)
 
 UsdAPISchemaBase (const UsdSchemaBase &schemaObj, const TfToken &instanceName)
 
const TfToken_GetInstanceName () const
 
USD_API bool _IsCompatible () const override
 
- Protected Member Functions inherited from UsdSchemaBase
virtual UsdSchemaKind _GetSchemaType () const
 
const TfType_GetType () const
 
USD_API UsdAttribute _CreateAttr (TfToken const &attrName, SdfValueTypeName const &typeName, bool custom, SdfVariability variability, VtValue const &defaultValue, bool writeSparsely) const
 

Friends

class UsdSchemaRegistry
 

Additional Inherited Members

- Static Protected Member Functions inherited from UsdAPISchemaBase
static USD_API TfTokenVector _GetMultipleApplyInstanceNames (const UsdPrim &prim, const TfType &schemaType)
 

Detailed Description

UsdGeomModelAPI extends the generic UsdModelAPI schema with geometry specific concepts such as cached extents for the entire model, constraint targets, and geometry-inspired extensions to the payload lofting process.

As described in GetExtentsHint() below, it is useful to cache extents at the model level. UsdGeomModelAPI provides schema for computing and storing these cached extents, which can be consumed by UsdGeomBBoxCache to provide fast access to precomputed extents that will be used as the model's bounds ( see UsdGeomBBoxCache::UsdGeomBBoxCache() ).

Draw Modes

Draw modes provide optional alternate imaging behavior for USD subtrees with kind model. model:drawMode (which is inheritable) and model:applyDrawMode (which is not) are resolved into a decision to stop traversing the scene graph at a certain point, and replace a USD subtree with proxy geometry.

The value of model:drawMode determines the type of proxy geometry:

  • origin - Draw the model-space basis vectors of the replaced prim.
  • bounds - Draw the model-space bounding box of the replaced prim.
  • cards - Draw textured quads as a placeholder for the replaced prim.
  • default - An explicit opinion to draw the USD subtree as normal.
  • inherited - Defer to the parent opinion.

model:drawMode falls back to inherited so that a whole scene, a large group, or all prototypes of a model hierarchy PointInstancer can be assigned a draw mode with a single attribute edit. If no draw mode is explicitly set in a hierarchy, the resolved value is default.

model:applyDrawMode is meant to be written when an asset is authored, and provides flexibility for different asset types. For example, a character assembly (composed of character, clothes, etc) might have model:applyDrawMode set at the top of the subtree so the whole group can be drawn as a single card object. An effects subtree might have model:applyDrawMode set at a lower level so each particle group draws individually.

Models of kind component are automatically treated as if model:applyDrawMode were true if model:applyDrawMode is not authored on the component prim. A component prim will be drawn drawn with a simplified representation when the prim has kind component, model:applyDrawMode is not authored (or authored to be true), and the resolved (i.e. inherited down namespace) value for model:drawMode is not default. If you don't want component prims to use the resolved non-default drawMode, you must apply the UsdGeomModelAPI schema on the prim and explicitly set model:applyDrawMode to false.

Cards Geometry

The specific geometry used in cards mode is controlled by the model:cardGeometry attribute:

  • cross - Generate a quad normal to each basis direction and negative. Locate each quad so that it bisects the model extents.
  • box - Generate a quad normal to each basis direction and negative. Locate each quad on a face of the model extents, facing out.
  • fromTexture - Generate a quad for each supplied texture from attributes stored in that texture's metadata.

For cross and box mode, the extents are calculated for purposes default, proxy, and render, at their earliest authored time. If the model has no textures, all six card faces are rendered using model:drawModeColor. If one or more textures are present, only axes with one or more textures assigned are drawn. For each axis, if both textures (positive and negative) are specified, they'll be used on the corresponding card faces; if only one texture is specified, it will be mapped to the opposite card face after being flipped on the texture's s-axis. Any card faces with invalid asset paths will be drawn with model:drawModeColor.

Both model:cardGeometry and model:drawModeColor should be authored on the prim where the draw mode takes effect, since these attributes are not inherited.

For fromTexture mode, only card faces with valid textures assigned are drawn. The geometry is generated by pulling the worldtoscreen attribute out of texture metadata. This is expected to be a 4x4 matrix mapping the model-space position of the card quad to the clip-space quad with corners (-1,-1,0) and (1,1,0). The card vertices are generated by transforming the clip-space corners by the inverse of worldtoscreen. Textures are mapped so that (s) and (t) map to (+x) and (+y) in clip space. If the metadata cannot be read in the right format, or the matrix can't be inverted, the card face is not drawn.

All card faces are drawn and textured as single-sided.

Todo:
CreatePayload()

For any described attribute Fallback Value or Allowed Values below that are text/tokens, the actual token is published and defined in UsdGeomTokens. So to set an attribute to the value "rightHanded", use UsdGeomTokens->rightHanded as the value.

Definition at line 153 of file modelAPI.h.

Constructor & Destructor Documentation

UsdGeomModelAPI::UsdGeomModelAPI ( const UsdPrim prim = UsdPrim())
inlineexplicit

Construct a UsdGeomModelAPI on UsdPrim prim . Equivalent to UsdGeomModelAPI::Get(prim.GetStage(), prim.GetPath()) for a valid prim, but will not immediately throw an error for an invalid prim

Definition at line 165 of file modelAPI.h.

UsdGeomModelAPI::UsdGeomModelAPI ( const UsdSchemaBase schemaObj)
inlineexplicit

Construct a UsdGeomModelAPI on the prim held by schemaObj . Should be preferred over UsdGeomModelAPI(schemaObj.GetPrim()), as it preserves SchemaBase state.

Definition at line 173 of file modelAPI.h.

virtual USDGEOM_API UsdGeomModelAPI::~UsdGeomModelAPI ( )
virtual

Destructor.

Member Function Documentation

USDGEOM_API UsdSchemaKind UsdGeomModelAPI::_GetSchemaKind ( ) const
overrideprotectedvirtual

Returns the kind of schema this class belongs to.

See Also
UsdSchemaKind

Reimplemented from UsdAPISchemaBase.

static USDGEOM_API UsdGeomModelAPI UsdGeomModelAPI::Apply ( const UsdPrim prim)
static

Applies this single-apply API schema to the given prim. This information is stored by adding "GeomModelAPI" to the token-valued, listOp metadata apiSchemas on the prim.

Returns
A valid UsdGeomModelAPI object is returned upon success. An invalid (or empty) UsdGeomModelAPI object is returned upon failure. See UsdPrim::ApplyAPI() for conditions resulting in failure.
See Also
UsdPrim::GetAppliedSchemas()
UsdPrim::HasAPI()
UsdPrim::CanApplyAPI()
UsdPrim::ApplyAPI()
UsdPrim::RemoveAPI()
static USDGEOM_API bool UsdGeomModelAPI::CanApply ( const UsdPrim prim,
std::string whyNot = nullptr 
)
static

Returns true if this single-apply API schema can be applied to the given prim. If this schema can not be a applied to the prim, this returns false and, if provided, populates whyNot with the reason it can not be applied.

Note that if CanApply returns false, that does not necessarily imply that calling Apply will fail. Callers are expected to call CanApply before calling Apply if they want to ensure that it is valid to apply a schema.

See Also
UsdPrim::GetAppliedSchemas()
UsdPrim::HasAPI()
UsdPrim::CanApplyAPI()
UsdPrim::ApplyAPI()
UsdPrim::RemoveAPI()
USDGEOM_API VtVec3fArray UsdGeomModelAPI::ComputeExtentsHint ( UsdGeomBBoxCache bboxCache) const

Compute a value suitable for passing to SetExtentsHint().

If this model is a UsdGeomBoundable, call UsdGeomBoundable::ComputeExtentFromPlugins() with the bboxCache 's time code. If that function returns true, then populate the returned array with the min and max repeated according to the number of tokens in UsdGeomImageable::GetOrderedPurposeTokens(). Otherwise return an array with a single empty range.

If this model is not a UsdGeomBoundable, populate the return value by calling UsdGeomBBoxCache::ComputeUntransformedBound() (and GfBBox3d::ComputeAlignedBox() on that result) for each token in UsdGeomImageable::GetOrderedPurposeTokens().

In either case the, Nth successive pair of entries in the returned array will be the min and max coordinates of the extent corresponding to the Nth token in UsdGeomImageable::GetOrderedPurposeTokens(), except trailing empty boxes are omitted, unless all boxes are empty in which case the result is a single empty box.

For example, if GetOrderedPurposeTokens() is [default, render, proxy, guide] and this function returns [(0,0,0), (1,1,1), (+FLT_MAX), (-FLT_MIN), (0,0,0), (1,1,1)] then this means that the computed extents for 'default' and 'proxy' purpose are [(0,0,0), (1,1,1)] and the extents for 'render' and 'guide' purposes are empty.

This function modifies bboxCache's included purposes.

Note
bboxCache must not be used concurrently during the execution of this function.
USDGEOM_API TfToken UsdGeomModelAPI::ComputeModelDrawMode ( const TfToken parentDrawMode = TfToken()) const

Calculate the effective model:drawMode of this prim.

If the draw mode is authored on this prim, it's used. Otherwise, the fallback value is "inherited", which defers to the parent opinion. The first non-inherited opinion found walking from this prim towards the root is used. If the attribute isn't set on any ancestors, we return "default" (meaning, disable "drawMode" geometry).

If this function is being called in a traversal context to compute the draw mode of an entire hierarchy of prims, it would be beneficial to cache and pass in the computed parent draw-mode via the parentDrawMode parameter. This avoids repeated upward traversal to look for ancestor opinions.

When parentDrawMode is empty (or unspecified), this function does an upward traversal to find the closest ancestor with an authored model:drawMode.

See Also
GetModelDrawModeAttr()
USDGEOM_API UsdGeomConstraintTarget UsdGeomModelAPI::CreateConstraintTarget ( const std::string constraintName) const

Creates a new constraint target with the given name, constraintName.

If the constraint target already exists, then the existing target is returned. If it does not exist, a new one is created and returned.

USDGEOM_API UsdAttribute UsdGeomModelAPI::CreateModelApplyDrawModeAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetModelApplyDrawModeAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. If specified, author defaultValue as the attribute's default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

USDGEOM_API UsdAttribute UsdGeomModelAPI::CreateModelCardGeometryAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetModelCardGeometryAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. If specified, author defaultValue as the attribute's default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

USDGEOM_API UsdAttribute UsdGeomModelAPI::CreateModelCardTextureXNegAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetModelCardTextureXNegAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. If specified, author defaultValue as the attribute's default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

USDGEOM_API UsdAttribute UsdGeomModelAPI::CreateModelCardTextureXPosAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetModelCardTextureXPosAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. If specified, author defaultValue as the attribute's default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

USDGEOM_API UsdAttribute UsdGeomModelAPI::CreateModelCardTextureYNegAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetModelCardTextureYNegAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. If specified, author defaultValue as the attribute's default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

USDGEOM_API UsdAttribute UsdGeomModelAPI::CreateModelCardTextureYPosAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetModelCardTextureYPosAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. If specified, author defaultValue as the attribute's default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

USDGEOM_API UsdAttribute UsdGeomModelAPI::CreateModelCardTextureZNegAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetModelCardTextureZNegAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. If specified, author defaultValue as the attribute's default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

USDGEOM_API UsdAttribute UsdGeomModelAPI::CreateModelCardTextureZPosAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetModelCardTextureZPosAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. If specified, author defaultValue as the attribute's default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

USDGEOM_API UsdAttribute UsdGeomModelAPI::CreateModelDrawModeAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetModelDrawModeAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. If specified, author defaultValue as the attribute's default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

USDGEOM_API UsdAttribute UsdGeomModelAPI::CreateModelDrawModeColorAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetModelDrawModeColorAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. If specified, author defaultValue as the attribute's default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

static USDGEOM_API UsdGeomModelAPI UsdGeomModelAPI::Get ( const UsdStagePtr &  stage,
const SdfPath path 
)
static

Return a UsdGeomModelAPI holding the prim adhering to this schema at path on stage. If no prim exists at path on stage, or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following:

UsdGeomModelAPI(stage->GetPrimAtPath(path));
USDGEOM_API UsdGeomConstraintTarget UsdGeomModelAPI::GetConstraintTarget ( const std::string constraintName) const

Get the constraint target with the given name, constraintName.

If the requested constraint target does not exist, then an invalid UsdConstraintTarget object is returned.

USDGEOM_API std::vector<UsdGeomConstraintTarget> UsdGeomModelAPI::GetConstraintTargets ( ) const

Returns all the constraint targets belonging to the model.

Only valid constraint targets in the "constraintTargets" namespace are returned by this method.

USDGEOM_API bool UsdGeomModelAPI::GetExtentsHint ( VtVec3fArray *  extents,
const UsdTimeCode time = UsdTimeCode::Default() 
) const

Retrieve the authored value (if any) of this model's "extentsHint"

Persistent caching of bounds in USD is a potentially perilous endeavor, given that:

  • It is very easy to add overrides in new super-layers that invalidate the cached bounds, and no practical way to automatically detect when this happens
  • It is possible for references to be allowed to "float", so that asset updates can flow directly into cached scenes. Such changes in referenced scene description can also invalidate cached bounds in referencing layers.

For these reasons, as a general rule, we only persistently cache leaf gprim extents in object space. However, even with cached gprim extents, computing bounds can be expensive. Since model-level bounds are so useful to many graphics applications, we make an exception, with some caveats. The "extentsHint" should be considered entirely optional (whereas gprim extent is not); if authored, it should contains the extents for various values of gprim purposes. The extents for different values of purpose are stored in a linear Vec3f array as pairs of GfVec3f values in the order specified by UsdGeomImageable::GetOrderedPurposeTokens(). This list is trimmed to only include non-empty extents. i.e., if a model has only default and render geoms, then it will only have 4 GfVec3f values in its extentsHint array. We do not skip over zero extents, so if a model has only default and proxy geom, we will author six GfVec3f's, the middle two representing an zero extent for render geometry.

A UsdGeomBBoxCache can be configured to first consult the cached extents when evaluating model roots, rather than descending into the models for the full computation. This is not the default behavior, and gives us a convenient way to validate that the cached extentsHint is still valid.

Returns
true if a value was fetched; false if no value was authored, or on error. It is an error to make this query of a prim that is not a model root.
See Also
UsdGeomImageable::GetPurposeAttr(), UsdGeomImageable::GetOrderedPurposeTokens()
USDGEOM_API UsdAttribute UsdGeomModelAPI::GetExtentsHintAttr ( ) const

Returns the custom 'extentsHint' attribute if it exits.

USDGEOM_API UsdAttribute UsdGeomModelAPI::GetModelApplyDrawModeAttr ( ) const

If true, and the resolved value of model:drawMode is non-default, apply an alternate imaging mode to this prim. See Draw Modes.

Declaration uniform bool model:applyDrawMode = 0
C++ Type bool
Usd Type SdfValueTypeNames->Bool
Variability SdfVariabilityUniform
USDGEOM_API UsdAttribute UsdGeomModelAPI::GetModelCardGeometryAttr ( ) const

The geometry to generate for imaging prims inserted for cards imaging mode. See Cards Geometry for geometry descriptions.

Declaration uniform token model:cardGeometry = "cross"
C++ Type TfToken
Usd Type SdfValueTypeNames->Token
Variability SdfVariabilityUniform
Allowed Values cross, box, fromTexture
USDGEOM_API UsdAttribute UsdGeomModelAPI::GetModelCardTextureXNegAttr ( ) const

In cards imaging mode, the texture applied to the X- quad. The texture axes (s,t) are mapped to model-space axes (y, -z).

Declaration asset model:cardTextureXNeg
C++ Type SdfAssetPath
Usd Type SdfValueTypeNames->Asset
USDGEOM_API UsdAttribute UsdGeomModelAPI::GetModelCardTextureXPosAttr ( ) const

In cards imaging mode, the texture applied to the X+ quad. The texture axes (s,t) are mapped to model-space axes (-y, -z).

Declaration asset model:cardTextureXPos
C++ Type SdfAssetPath
Usd Type SdfValueTypeNames->Asset
USDGEOM_API UsdAttribute UsdGeomModelAPI::GetModelCardTextureYNegAttr ( ) const

In cards imaging mode, the texture applied to the Y- quad. The texture axes (s,t) are mapped to model-space axes (-x, -z).

Declaration asset model:cardTextureYNeg
C++ Type SdfAssetPath
Usd Type SdfValueTypeNames->Asset
USDGEOM_API UsdAttribute UsdGeomModelAPI::GetModelCardTextureYPosAttr ( ) const

In cards imaging mode, the texture applied to the Y+ quad. The texture axes (s,t) are mapped to model-space axes (x, -z).

Declaration asset model:cardTextureYPos
C++ Type SdfAssetPath
Usd Type SdfValueTypeNames->Asset
USDGEOM_API UsdAttribute UsdGeomModelAPI::GetModelCardTextureZNegAttr ( ) const

In cards imaging mode, the texture applied to the Z- quad. The texture axes (s,t) are mapped to model-space axes (-x, -y).

Declaration asset model:cardTextureZNeg
C++ Type SdfAssetPath
Usd Type SdfValueTypeNames->Asset
USDGEOM_API UsdAttribute UsdGeomModelAPI::GetModelCardTextureZPosAttr ( ) const

In cards imaging mode, the texture applied to the Z+ quad. The texture axes (s,t) are mapped to model-space axes (x, -y).

Declaration asset model:cardTextureZPos
C++ Type SdfAssetPath
Usd Type SdfValueTypeNames->Asset
USDGEOM_API UsdAttribute UsdGeomModelAPI::GetModelDrawModeAttr ( ) const

Alternate imaging mode; applied to this prim or child prims where model:applyDrawMode is true, or where the prim has kind component and model:applyDrawMode is not authored. See Draw Modes for mode descriptions.

Declaration uniform token model:drawMode = "inherited"
C++ Type TfToken
Usd Type SdfValueTypeNames->Token
Variability SdfVariabilityUniform
Allowed Values origin, bounds, cards, default, inherited
USDGEOM_API UsdAttribute UsdGeomModelAPI::GetModelDrawModeColorAttr ( ) const

The base color of imaging prims inserted for alternate imaging modes. For origin and bounds modes, this controls line color; for cards mode, this controls the fallback quad color.

Declaration uniform float3 model:drawModeColor = (0.18, 0.18, 0.18)
C++ Type GfVec3f
Usd Type SdfValueTypeNames->Float3
Variability SdfVariabilityUniform
static USDGEOM_API const TfTokenVector& UsdGeomModelAPI::GetSchemaAttributeNames ( bool  includeInherited = true)
static

Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved.

USDGEOM_API bool UsdGeomModelAPI::SetExtentsHint ( VtVec3fArray const &  extents,
const UsdTimeCode time = UsdTimeCode::Default() 
) const

Authors the extentsHint array for this model at the given time.

See Also
GetExtentsHint()

Friends And Related Function Documentation

friend class UsdSchemaRegistry
friend

Definition at line 251 of file modelAPI.h.

Member Data Documentation

const UsdSchemaKind UsdGeomModelAPI::schemaKind = UsdSchemaKind::SingleApplyAPI
static

Compile time constant representing what kind of schema this class is.

See Also
UsdSchemaKind

Definition at line 159 of file modelAPI.h.


The documentation for this class was generated from the following file: