usdrt::PhysxSchemaPhysxSDFMeshCollisionAPI

Defined in usdrt/scenegraph/usd/physxSchema/physxSDFMeshCollisionAPI.h

Functions

Variables

class PhysxSchemaPhysxSDFMeshCollisionAPI : public usdrt::UsdAPISchemaBase

PhysX SDF mesh extended parameters For any described attribute Fallback Value or Allowed Values below that are text/tokens, the actual token is published and defined in PhysxSchemaTokens. So to set an attribute to the value “rightHanded”, use PhysxSchemaTokens->rightHanded as the value.

Public Functions

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

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

inline explicit PhysxSchemaPhysxSDFMeshCollisionAPI(const UsdSchemaBase &schemaObj)

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

inline virtual ~PhysxSchemaPhysxSDFMeshCollisionAPI()

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 GetSdfResolutionAttr() const

The spacing of the uniformly sampled SDF is equal to the largest AABB extent of the mesh, divided by the resolution. Choose the lowest possible resolution that provides acceptable performance; very high resolution results in large memory consumption, and slower cooking and simulation performance. Range: (1, inf)

Declaration

uniform int physxSDFMeshCollision:sdfResolution = 256

C++ Type

int

Usd Type

SdfValueTypeNames->Int

Variability

SdfVariabilityUniform

inline UsdAttribute CreateSdfResolutionAttr() const

See GetSdfResolutionAttr(), 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 GetSdfSubgridResolutionAttr() const

A positive subgrid resolution enables sparsity on signed-distance-fields (SDF) while a value of 0 leads to the usage of a dense SDF. A value in the range of 4 to 8 is a reasonable compromise between block size and the overhead introduced by block addressing. The smaller a block, the more memory is spent on the address table. The bigger a block, the less precisely the sparse SDF can adapt to the mesh’s surface. In most cases sparsity reduces the memory consumption of a SDF significantly. Range: [0, inf)

Declaration

uniform int physxSDFMeshCollision:sdfSubgridResolution = 6

C++ Type

int

Usd Type

SdfValueTypeNames->Int

Variability

SdfVariabilityUniform

inline UsdAttribute CreateSdfSubgridResolutionAttr() const

See GetSdfSubgridResolutionAttr(), 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 GetSdfBitsPerSubgridPixelAttr() const

Values of 8, 16 and 32 bits per subgrid pixel are supported. Dense SDFs always use 32 bits per pixel. The less bits per pixel, the smaller the resulting SDF but also the less precise. The SDF’s memory consumption scales proportionally with the number of bits per subgrid pixel.

Declaration

uniform token physxSDFMeshCollision:sdfBitsPerSubgridPixel = "BitsPerPixel16"

C++ Type

TfToken

Usd Type

SdfValueTypeNames->Token

Variability

SdfVariabilityUniform

Allowed Values

BitsPerPixel8, BitsPerPixel16, BitsPerPixel32

inline UsdAttribute CreateSdfBitsPerSubgridPixelAttr() const

See GetSdfBitsPerSubgridPixelAttr(), 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 GetSdfNarrowBandThicknessAttr() const

Size of the narrow band around the mesh surface where high resolution SDF samples are available. Outside of the narrow band, only low resolution samples are stored. Representing the narrow band thickness as a fraction of the mesh’s bounding box diagonal length ensures that it is scale independent. A value of 0.01 is usually large enough. The smaller the narrow band thickness, the smaller the memory consumption of the sparse SDF. Range: [0, 1] Units: dimensionless.

Declaration

uniform float physxSDFMeshCollision:sdfNarrowBandThickness = 0.01

C++ Type

float

Usd Type

SdfValueTypeNames->Float

Variability

SdfVariabilityUniform

inline UsdAttribute CreateSdfNarrowBandThicknessAttr() const

See GetSdfNarrowBandThicknessAttr(), 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 GetSdfMarginAttr() const

Margin to increase the size of the SDF relative to the bounding box diagonal length of the mesh. A sdf margin value of 0.01 means the sdf boundary will be enlarged in any direction by 1% of the mesh’s bounding box diagonal length. Representing the margin relative to the bounding box diagonal length ensures that it is scale independent. Margins allow for precise distance queries in a region slightly outside of the mesh’s bounding box. Range: [0, inf) Units: dimensionless.

Declaration

uniform float physxSDFMeshCollision:sdfMargin = 0.01

C++ Type

float

Usd Type

SdfValueTypeNames->Float

Variability

SdfVariabilityUniform

inline UsdAttribute CreateSdfMarginAttr() const

See GetSdfMarginAttr(), 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 GetSdfEnableRemeshingAttr() const

Enables optional remeshing as a preprocessing step before the SDF is computed. Remeshing can help generate valid SDF data even if the input mesh has bad properties like inconsistent winding or self-intersections. The SDF distances (and therefore the collisions) will be slightly less accurate when remeshing is enabled.

Declaration

uniform bool physxSDFMeshCollision:sdfEnableRemeshing = 0

C++ Type

bool

Usd Type

SdfValueTypeNames->Bool

Variability

SdfVariabilityUniform

inline UsdAttribute CreateSdfEnableRemeshingAttr() const

See GetSdfEnableRemeshingAttr(), 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 PhysxSchemaPhysxSDFMeshCollisionAPI Apply(const UsdPrim &prim)

Applies this single-apply API schema to the given prim. This information is stored by adding “PhysxSDFMeshCollisionAPI” 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 PhysxSchemaPhysxSDFMeshCollisionAPI object is returned upon success. An invalid (or empty) PhysxSchemaPhysxSDFMeshCollisionAPI 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.