usdrt::ForceFieldSchemaPhysxForceFieldRingAPI

Defined in usdrt/scenegraph/usd/forceFieldSchema/physxForceFieldRingAPI.h

Functions

Variables

class ForceFieldSchemaPhysxForceFieldRingAPI : public usdrt::UsdAPISchemaBase

A force field that applies forces to rotate rigid bodies around a ring, defined by a normal axis through the center of the ring and radius from that axis. The two sets of coefficients describe the attraction force to the ring and the tangential force that rotated bodies around the ring. The net force on the rigid body is calculated using f_ring = constant + linear * r + inverseSquare / r^2. f_spin = spinConstant + spinLinear * r + spinInverseSquare / r^2.

Public Functions

inline explicit ForceFieldSchemaPhysxForceFieldRingAPI(const UsdPrim &prim = UsdPrim(), const TfToken &name = TfToken())

Construct a ForceFieldSchemaPhysxForceFieldRingAPI on UsdPrim prim with name name . Equivalent to ForceFieldSchemaPhysxForceFieldRingAPI::Get( prim.GetStage(), prim.GetPath().AppendProperty( “physxForceField:name”));.

for a valid prim , but will not immediately throw an error for an invalid prim

inline explicit ForceFieldSchemaPhysxForceFieldRingAPI(const UsdSchemaBase &schemaObj, const TfToken &name)

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

inline virtual ~ForceFieldSchemaPhysxForceFieldRingAPI()

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 TfToken GetName() const

Returns the name of this multiple-apply schema instance.

inline UsdAttribute GetNormalAxisAttr() const

The normal axis through the center of the ring in world coordinates.

Declaration

vector3f physxForceFieldRing:normalAxis = (0, 0, 0)

C++ Type

GfVec3f

Usd Type

SdfValueTypeNames->Vector3f

inline UsdAttribute CreateNormalAxisAttr() const

See GetNormalAxisAttr(), 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 GetRadiusAttr() const

The distance from the normal axis to the center of the ring.

Declaration

float physxForceFieldRing:radius = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateRadiusAttr() const

See GetRadiusAttr(), 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 GetConstantAttr() const

constant applies a steady force that attracts bodies toward the ring.

Declaration

float physxForceFieldRing:constant = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateConstantAttr() const

See GetConstantAttr(), 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 GetLinearAttr() const

linear applies a force that attracts bodies toward the ring and varies with distance to the ring.

Declaration

float physxForceFieldRing:linear = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateLinearAttr() const

See GetLinearAttr(), 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 GetInverseSquareAttr() const

inverseSquare applies a force that attracts bodies toward the ring and varies with the reciprocal of the square of the distance to the ring.

Declaration

float physxForceFieldRing:inverseSquare = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateInverseSquareAttr() const

See GetInverseSquareAttr(), 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 GetSpinConstantAttr() const

spinConstant applies a steady force that rotates bodies around the ring.

Declaration

float physxForceFieldRing:spinConstant = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateSpinConstantAttr() const

See GetSpinConstantAttr(), 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 GetSpinLinearAttr() const

spinLinear applies a force that rotates bodies around the ring and varies with distance to the ring.

Declaration

float physxForceFieldRing:spinLinear = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateSpinLinearAttr() const

See GetSpinLinearAttr(), 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 GetSpinInverseSquareAttr() const

inverseSquare sets a force that rotates bodies around the ring and varies with the reciprocal of the square of the distance to the ring.

Declaration

float physxForceFieldRing:spinInverseSquare = 0

C++ Type

float

Usd Type

SdfValueTypeNames->Float

inline UsdAttribute CreateSpinInverseSquareAttr() const

See GetSpinInverseSquareAttr(), 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.

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 ForceFieldSchemaPhysxForceFieldRingAPI Apply(const UsdPrim &prim, const TfToken &name)

Applies this multiple-apply API schema to the given prim along with the given instance name, name.

This information is stored by adding “PhysxForceFieldRingAPI:<i>name</i>” to the token-valued, listOp metadata apiSchemas on the prim. For example, if name is ‘instance1’, the token ‘PhysxForceFieldRingAPI:instance1’ is added to ‘apiSchemas’.

See also

UsdPrim::GetAppliedSchemas()

See also

UsdPrim::HasAPI()

See also

UsdPrim::ApplyAPI()

See also

UsdPrim::RemoveAPI()

Returns

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

Public Static Attributes

static const UsdSchemaType schemaType = UsdSchemaType::MultipleApplyAPI

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.