usdrt::DestructionSchemaDestructibleBondAPI

Defined in usdrt/scenegraph/usd/destructionSchema/destructibleBondAPI.h

Functions

Variables

class DestructionSchemaDestructibleBondAPI : public usdrt::UsdAPISchemaBase

When applied to a UsdGeomXformable descendant of a prim with the DestructibleBaseAPI, this prim may be used to override, delete, or define bonds between chunks.

Public Functions

inline explicit DestructionSchemaDestructibleBondAPI(const UsdPrim &prim = UsdPrim())

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

inline explicit DestructionSchemaDestructibleBondAPI(const UsdSchemaBase &schemaObj)

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

inline virtual ~DestructionSchemaDestructibleBondAPI()

Destructor.

inline operator bool() const

Boolean operator.

Returns

Return true if the contained prim is has this api schema applied using HasAPI, and false otherwise.

inline UsdAttribute GetCentroidAttr() const

Optional bond centroid. If not authored, the translation component of this prim’s transform will be used as the centroid.

Declaration

point3f destruct:centroid = (-inf, -inf, -inf)

C++ Type

GfVec3f

Usd Type

SdfValueTypeNames->Point3f

inline UsdAttribute CreateCentroidAttr() const

See GetCentroidAttr(), and also Create vs Get Property Methods 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.

inline UsdAttribute GetNormalAttr() const

Optional bond normal. If not authored, the Z-axis of the local frame defined by this prim’s transform will be used as the normal.

Declaration

normal3f destruct:normal = (0, 0, 0)

C++ Type

GfVec3f

Usd Type

SdfValueTypeNames->Normal3f

inline UsdAttribute CreateNormalAttr() const

See GetNormalAttr(), and also Create vs Get Property Methods 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.

inline UsdAttribute GetAreaAttr() const

Optional bond area. If not authored, it will be calculated from the adjoining chunks.

Declaration

float destruct:area = -inf

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateAreaAttr() const

See GetAreaAttr(), and also Create vs Get Property Methods 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.

inline UsdAttribute GetStrengthAttr() const

The bond’s strength. Default value = -1.0. If negative, the bond’s area will be used.

Declaration

float destruct:strength = -1

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateStrengthAttr() const

See GetStrengthAttr(), and also Create vs Get Property Methods 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.

inline UsdAttribute GetUnbreakableAttr() const

Whether or not the bond is unbreakable. Default value = false. If true, the bond has effectively infinite strength.

Declaration

bool destruct:unbreakable = 0

C++ Type

bool

Usd Type

SdfValueTypeNames->Bool

inline UsdAttribute CreateUnbreakableAttr() const

See GetUnbreakableAttr(), and also Create vs Get Property Methods 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.

inline UsdRelationship GetAttachedRel() const

If two paths are given, at least one must be a chunk. If the second path is also a chunk, the bond is internal. Otherwise the second prim must be a rigid body collider and the bond is external. If only one path is given, the bond is external, attaching to the static world.

inline UsdRelationship CreateAttachedRel() const

See GetAttachedRel(), and also Create vs Get Property Methods for when to use Get vs Create.

UsdPrim GetPrim() const

Return this schema object’s held prim.

SdfPath GetPath() const

Return the SdfPath to this schema object’s held prim.

Public Static Functions

static inline DestructionSchemaDestructibleBondAPI Apply(const UsdPrim &prim)

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

See also

UsdPrim::GetAppliedSchemas()

See also

UsdPrim::HasAPI()

See also

UsdPrim::ApplyAPI()

See also

UsdPrim::RemoveAPI()

Returns

A valid DestructionSchemaDestructibleBondAPI object is returned upon success. An invalid (or empty) DestructionSchemaDestructibleBondAPI object is returned upon failure. See UsdPrim::ApplyAPI() for conditions resulting in failure.

Public Static Attributes

static const UsdSchemaType schemaType = UsdSchemaType::SingleApplyAPI

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

See also

UsdSchemaType

Protected Functions

inline const TfToken &_GetInstanceName() const

Returns the instance name of the API schema object belonging to a multiple-apply API schema.

The returned instance name will be empty for non-applied and single-apply API schemas.