Python API#

This module contains python bindings to the C++ omni::physx interface.

omni::physx contains several interfaces:

  • PhysX – Main interface used for physics simulation.

  • PhysXVisualization – Interface for debug visualization control.

  • PhysXUnitTests – Interface for unit tests.

Settings attributes available in this module:
  • SETTING_AUTOCREATE_PHYSICS_SCENE = “/persistent/physics/autocreatePhysicsScene”

  • SETTING_RESET_ON_STOP = “/physics/resetOnStop”

  • SETTING_USE_ACTIVE_CUDA_CONTEXT = “/persistent/physics/useActiveCudaContext”

  • SETTING_CUDA_DEVICE = “/physics/cudaDevice”

  • SETTING_DEFAULT_SIMULATOR = “/physics/defaultSimulator”

  • SETTING_PHYSICS_SCENE_MULTIGPU_MODE = “/physics/sceneMultiGPUMode”

  • SETTING_BACKWARD_COMPATIBILITY = “/persistent/physics/backwardCompatibilityCheckMode”

  • SETTING_NUM_THREADS = “/persistent/physics/numThreads”

  • SETTING_MAX_NUMBER_OF_PHYSX_ERRORS = “/physics/maxNumberOfPhysXErrors”

  • SETTING_PHYSX_DISPATCHER = “/physics/physxDispatcher”

  • SETTING_EXPOSE_PROFILER_DATA = “/physics/exposeProfilerData”

  • SETTING_EXPOSE_PRIM_PATH_NAMES = “/physics/exposePrimPathNames”

  • SETTING_FORCE_PARSE_ONLY_SINGLE_SCENE = “/physics/forceParseOnlySingleScene”

  • SETTING_SIMULATE_EMPTY_SCENE = “/physics/simulateEmptyScene”

  • SETTING_DISABLE_SLEEPING = “/physics/disableSleeping”

  • SETTING_ENABLE_SYNCHRONOUS_KERNEL_LAUNCHES = “/physics/enableSynchronousKernelLaunches”

  • SETTING_DISABLE_CONTACT_PROCESSING = “/physics/disableContactProcessing”

  • SETTING_USE_LOCAL_MESH_CACHE = “/persistent/physics/useLocalMeshCache”

  • SETTING_LOCAL_MESH_CACHE_SIZE_MB = “/persistent/physics/localMeshCacheSizeMB”

  • SETTING_UJITSO_COOKING_DEV_KEY = “/physics/cooking/ujitsoCookingDevKey”

  • SETTING_UJITSO_COLLISION_COOKING = “/physics/cooking/ujitsoCollisionCooking”

  • SETTING_UJITSO_REMOTE_CACHE_ENABLED = “/physics/cooking/ujitsoRemoteCacheEnabled”

  • SETTING_UJITSO_COOKING_MAX_PROCESS_COUNT = “/persistent/physics/cooking/ujitsoCookingMaxProcessCount”

  • SETTING_UPDATE_TO_USD = “/physics/updateToUsd”

  • SETTING_UPDATE_VELOCITIES_TO_USD = “/physics/updateVelocitiesToUsd”

  • SETTING_OUTPUT_VELOCITIES_LOCAL_SPACE = “/physics/outputVelocitiesLocalSpace”

  • SETTING_UPDATE_PARTICLES_TO_USD = “/physics/updateParticlesToUsd”

  • SETTING_UPDATE_RESIDUALS_TO_USD = “/physics/updateResidualsToUsd”

  • SETTING_MIN_FRAME_RATE = “/persistent/simulation/minFrameRate”

  • SETTING_JOINT_BODY_TRANSFORM_CHECK_TOLERANCE = “/simulation/jointBodyTransformCheckTolerance”

  • SETTING_COLLISION_APPROXIMATE_CONES = “/physics/collisionApproximateCones”

  • SETTING_COLLISION_APPROXIMATE_CYLINDERS = “/physics/collisionApproximateCylinders”

  • SETTING_MOUSE_INTERACTION_ENABLED = “/physics/mouseInteractionEnabled”

  • SETTING_MOUSE_GRAB = “/physics/mouseGrab”

  • SETTING_MOUSE_GRAB_IGNORE_INVISBLE = “/physics/mouseGrabIgnoreInvisible”

  • SETTING_MOUSE_GRAB_WITH_FORCE = “/physics/forceGrab”

  • SETTING_MOUSE_PUSH = “/physics/mousePush”

  • SETTING_MOUSE_PICKING_FORCE = “/physics/pickingForce”

  • SETTING_ZERO_GRAVITY_SPEED = “/physics/zeroGSpeed”

  • SETTING_PHYSICS_DEVELOPMENT_MODE = “/physics/developmentMode”

  • SETTING_SUPPRESS_READBACK = “/physics/suppressReadback”

  • SETTING_NUM_EVENT_PUMPS_FOR_TEST_STAGE_SETUP = “/physics/numEventPumpsForTestStageSetup”

  • SETTING_OVERRIDE_GPU = “/persistent/physics/overrideGPUSettings”

  • SETTING_LOG_ROBOTICS = “/physics/logRobotics”

  • SETTING_LOG_SCENEMULTIGPU = “/physics/logSceneMultiGPU”

  • SETTING_DEMO_ASSETS_PATH = “/physics/demoAssetsPath”

  • SETTING_TESTS_ASSETS_PATH = “/physics/testsAssetsPath”

  • SETTING_SAVE_COOKED_DATA = “/physics/saveCookedData”

  • SETTING_ADDMENU_SELECTION_LIMIT = “/physics/addMenuSelectionLimit”

  • SETTING_ADDMENU_SUBTREE_LIMIT = “/physics/addMenuSubtreeLimit”

  • SETTING_VISUALIZATION_COLLISION_MESH = “/persistent/physics/visualizationCollisionMesh”

  • SETTING_DISPLAY_COLLIDERS = “/persistent/physics/visualizationDisplayColliders”

  • SETTING_DISPLAY_COLLIDER_NORMALS = “/persistent/physics/visualizationDisplayColliderNormals”

  • SETTING_DISPLAY_MASS_PROPERTIES = “/persistent/physics/visualizationDisplayMassProperties”

  • SETTING_DISPLAY_JOINTS = “/persistent/physics/visualizationDisplayJoints”

  • SETTING_DISPLAY_SIMULATION_OUTPUT = “/persistent/physics/visualizationSimulationOutput”

  • SETTING_AUTO_POPUP_SIMULATION_OUTPUT_WINDOW = “/physics/autoPopupSimulationOutputWindow”

  • SETTING_DISPLAY_SIMULATION_DATA_VISUALIZER = “/persistent/physics/visualizationSimulationDataVisualizer”

  • SETTING_DISPLAY_TENDONS = “/persistent/physics/visualizationDisplayTendons”

  • SETTING_DISPLAY_DEFORMABLE_BODIES = “/persistent/physics/visualizationDisplayDeformableBodies”

  • SETTING_DISPLAY_DEFORMABLE_BODY_TYPE = “/persistent/physics/visualizationDisplayDeformableBodyType”

  • SETTING_DISPLAY_DEFORMABLE_SURFACES = “/physics/visualizationDisplayDeformableSurfaces”

  • SETTING_DISPLAY_PARTICLES = “/persistent/physics/visualizationDisplayParticles”

  • SETTING_DISPLAY_ATTACHMENTS = “/persistent/physics/visualizationDisplayAttachments”

  • SETTING_DISPLAY_ATTACHMENTS_HIDE_ACTOR_0 = “/persistent/physics/visualizationDisplayAttachmentsHideActor0”

  • SETTING_DISPLAY_ATTACHMENTS_HIDE_ACTOR_1 = “/persistent/physics/visualizationDisplayAttachmentsHideActor1”

  • SETTING_VISUALIZATION_GAP = “/persistent/physics/visualizationGap”

  • SETTING_DEBUG_VIS_SIMPLIFY_AT_DISTANCE = “/persistent/physics/visualizationSimplifyAtDistance”

  • SETTING_DEBUG_VIS_QUERY_USDRT_FOR_TRAVERSAL = “/persistent/physics/visualizationQueryUsdrtForTraversal”

  • SETTING_MASS_DISTRIBUTION_MANIPULATOR = “/persistent/physics/massDistributionManipulator”

  • SETTING_DISPLAY_PARTICLES_SHOW_DIFFUSE = “/persistent/physics/visualizationDisplayParticlesShowDiffuseParticles”

  • SETTING_DISPLAY_PARTICLES_POSITION_TYPE = “/persistent/physics/visualizationDisplayParticlesParticlePositions”

  • SETTING_DISPLAY_PARTICLES_RADIUS_TYPE = “/persistent/physics/visualizationDisplayParticlesParticleRadius”

  • SETTING_DISPLAY_PARTICLES_SHOW_CLOTH_MESH_LINES = “/persistent/physics/visualizationDisplayParticlesClothMeshLines”

  • SETTING_DISPLAY_PARTICLES_SHOW_PARTICLE_SET_PARTICLES = “/persistent/physics/visualizationDisplayParticlesShowParticleSetParticles”

  • SETTING_DISPLAY_PARTICLES_SHOW_FLUID_SURFACE = “/persistent/physics/visualizationDisplayParticlesShowFluidSurface”

  • SETTING_DISPLAY_PARTICLES_SHOW_CLOTH_PARTICLES = “/persistent/physics/visualizationDisplayParticlesShowDeformableParticles”

  • SETTING_DISPLAY_PARTICLES_SHOW_CLOTH_MESH = “/persistent/physics/visualizationDisplayParticlesShowDeformableMesh”

  • SETTING_PVD_IP_ADDRESS = “/persistent/physics/pvdIP”

  • SETTING_PVD_STREAM_TO_FILE = “/persistent/physics/pvdStreamToFile”

  • SETTING_PVD_OUTPUT_DIRECTORY = “/persistent/physics/pvdOutputDirectory”

  • SETTING_PVD_PROFILE = “/persistent/physics/pvdProfile”

  • SETTING_PVD_DEBUG = “/persistent/physics/pvdDebug”

  • SETTING_PVD_MEMORY = “/persistent/physics/pvdMemory”

  • SETTING_PVD_ENABLED = “/persistent/physics/pvdEnabled”

  • SETTING_OMNIPVD_OVD_RECORDING_DIRECTORY = “/persistent/physics/omniPvdOvdRecordingDirectory”

  • SETTING_OMNIPVD_ENABLED = “/physics/omniPvdOutputEnabled”

  • SETTING_OMNIPVD_IS_OVD_STAGE = “/physics/omniPvdIsOVDStage”

  • SETTING_OMNIPVD_IS_RECORDING = “/physics/omniPvdIsRecording”

  • SETTING_TEST_RUNNER_FILTER = “/persistent/physics/testRunnerFilter”

  • SETTING_TEST_RUNNER_SELECTION = “/persistent/physics/testRunnerSelection”

  • SETTING_TEST_RUNNER_STATUS = “/physics/testRunnerStatus”

  • SETTING_TEST_RUNNER_REPEATS = “/physics/testRunnerRepeats”

  • SETTING_SHOW_COLLISION_GROUPS_WINDOW = “/physics/showCollisionGroupsWindow”

class omni.physx.bindings._physx.ContactData#

Contact data.

property face_index0#

Face index 0 - non zero only for meshes

property face_index1#

Face index 1 - non zero only for meshes.

property impulse#

Contact impulse

property material0#

Material0 - uint64 use PhysicsSchemaTools::intToSdfPath to convert to SdfPath.

property material1#

Material1 - uint64 use PhysicsSchemaTools::intToSdfPath to convert to SdfPath.

property normal#

Contact normal.

property position#

Contact position.

property separation#

Contact separation value.

class omni.physx.bindings._physx.ContactDataVector#
append(
self: omni.physx.bindings._physx.ContactDataVector,
x: omni.physx.bindings._physx.ContactData,
) None#

Add an item to the end of the list

clear(
self: omni.physx.bindings._physx.ContactDataVector,
) None#

Clear the contents

extend(*args, **kwargs)#

Overloaded function.

  1. extend(self: omni.physx.bindings._physx.ContactDataVector, L: omni.physx.bindings._physx.ContactDataVector) -> None

Extend the list by appending all the items in the given list

  1. extend(self: omni.physx.bindings._physx.ContactDataVector, L: Iterable) -> None

Extend the list by appending all the items in the given list

insert(
self: omni.physx.bindings._physx.ContactDataVector,
i: int,
x: omni.physx.bindings._physx.ContactData,
) None#

Insert an item at a given position.

pop(*args, **kwargs)#

Overloaded function.

  1. pop(self: omni.physx.bindings._physx.ContactDataVector) -> omni.physx.bindings._physx.ContactData

Remove and return the last item

  1. pop(self: omni.physx.bindings._physx.ContactDataVector, i: int) -> omni.physx.bindings._physx.ContactData

Remove and return the item at index i

class omni.physx.bindings._physx.ContactEventHeader#

Contact event header.

property actor0#

Actor0 - uint64 use PhysicsSchemaTools::intToSdfPath to convert to SdfPath.

property actor1#

Actor1 - uint64 use PhysicsSchemaTools::intToSdfPath to convert to SdfPath.

property collider0#

Collider0 - uint64 use PhysicsSchemaTools::intToSdfPath to convert to SdfPath.

property collider1#

Collider1 - uint64 use PhysicsSchemaTools::intToSdfPath to convert to SdfPath.

property contact_data_offset#

Contact data offset.

property friction_anchors_offset#

Friction anchors data offset.

property num_contact_data#

Number of contact data.

property num_friction_anchors_data#

Number of contact data.

property proto_index0#

Protoindex0 from a point instancer (0xFFFFFFFF means collider is not part of an instancer).

property proto_index1#

Protoindex1 from a point instancer (0xFFFFFFFF means collider is not part of an instancer).

property stage_id#

Stage id.

property type#

Contact event type.

class omni.physx.bindings._physx.ContactEventHeaderVector#
append(
self: omni.physx.bindings._physx.ContactEventHeaderVector,
x: omni.physx.bindings._physx.ContactEventHeader,
) None#

Add an item to the end of the list

clear(
self: omni.physx.bindings._physx.ContactEventHeaderVector,
) None#

Clear the contents

extend(*args, **kwargs)#

Overloaded function.

  1. extend(self: omni.physx.bindings._physx.ContactEventHeaderVector, L: omni.physx.bindings._physx.ContactEventHeaderVector) -> None

Extend the list by appending all the items in the given list

  1. extend(self: omni.physx.bindings._physx.ContactEventHeaderVector, L: Iterable) -> None

Extend the list by appending all the items in the given list

insert(
self: omni.physx.bindings._physx.ContactEventHeaderVector,
i: int,
x: omni.physx.bindings._physx.ContactEventHeader,
) None#

Insert an item at a given position.

pop(*args, **kwargs)#

Overloaded function.

  1. pop(self: omni.physx.bindings._physx.ContactEventHeaderVector) -> omni.physx.bindings._physx.ContactEventHeader

Remove and return the last item

  1. pop(self: omni.physx.bindings._physx.ContactEventHeaderVector, i: int) -> omni.physx.bindings._physx.ContactEventHeader

Remove and return the item at index i

class omni.physx.bindings._physx.ContactEventType#

Contact event type.

Members:

CONTACT_FOUND : Contact found.

CONTACT_LOST : Contact lost.

CONTACT_PERSIST : Contact persist.

CONTACT_FOUND = <ContactEventType.CONTACT_FOUND: 0>#
CONTACT_LOST = <ContactEventType.CONTACT_LOST: 1>#
CONTACT_PERSIST = <ContactEventType.CONTACT_PERSIST: 2>#
property name#
property value#
class omni.physx.bindings._physx.ErrorEvent#

Error events used by physics error event stream.

Members:

USD_LOAD_ERROR : Usd load error, event has dictionary with key ‘errorString’:string

PHYSX_ERROR : PhysX runtime error, event has dictionary with key ‘errorString’:string

PHYSX_TOO_MANY_ERRORS : PhysX exceeded maximum number of reported errors, event has dictionary with key ‘errorString’:string

PHYSX_CUDA_ERROR : PhysX GPU Cuda error, event has dictionary with key ‘errorString’:string

PHYSX_CUDA_ERROR = <ErrorEvent.PHYSX_CUDA_ERROR: 2>#
PHYSX_ERROR = <ErrorEvent.PHYSX_ERROR: 1>#
PHYSX_TOO_MANY_ERRORS = <ErrorEvent.PHYSX_TOO_MANY_ERRORS: 3>#
USD_LOAD_ERROR = <ErrorEvent.USD_LOAD_ERROR: 0>#
property name#
property value#
class omni.physx.bindings._physx.FrictionAnchor#

Contact data.

property impulse#

Contact impulse

property position#

Contact position.

class omni.physx.bindings._physx.FrictionAnchorsDataVector#
append(
self: omni.physx.bindings._physx.FrictionAnchorsDataVector,
x: omni.physx.bindings._physx.FrictionAnchor,
) None#

Add an item to the end of the list

clear(
self: omni.physx.bindings._physx.FrictionAnchorsDataVector,
) None#

Clear the contents

extend(*args, **kwargs)#

Overloaded function.

  1. extend(self: omni.physx.bindings._physx.FrictionAnchorsDataVector, L: omni.physx.bindings._physx.FrictionAnchorsDataVector) -> None

Extend the list by appending all the items in the given list

  1. extend(self: omni.physx.bindings._physx.FrictionAnchorsDataVector, L: Iterable) -> None

Extend the list by appending all the items in the given list

insert(
self: omni.physx.bindings._physx.FrictionAnchorsDataVector,
i: int,
x: omni.physx.bindings._physx.FrictionAnchor,
) None#

Insert an item at a given position.

pop(*args, **kwargs)#

Overloaded function.

  1. pop(self: omni.physx.bindings._physx.FrictionAnchorsDataVector) -> omni.physx.bindings._physx.FrictionAnchor

Remove and return the last item

  1. pop(self: omni.physx.bindings._physx.FrictionAnchorsDataVector, i: int) -> omni.physx.bindings._physx.FrictionAnchor

Remove and return the item at index i

class omni.physx.bindings._physx.IPhysxAttachment#

This interface is the access point to the omni.physx attachment functionality.

add_surface_sampler_points(
self: omni.physx.bindings._physx.IPhysxAttachment,
surface_sampler: int,
points: List[carb._carb.Float3],
) None#

Add samples to surface sampler.

Parameters:
  • surface_sampler – Handle to surface sampler

  • points – Points to add

This function adds samples to the surface sampler that are then considered for further sampling.

compute_attachment_points(
self: omni.physx.bindings._physx.IPhysxAttachment,
attachment_path: str,
) bool#

Compute attachment points

Parameters:

attachment_path – path to PhysxSchema.PhysxPhysicsAttachment primitive with PhysxSchema.PhysxAutoAttachmentAPI

create_point_finder(
self: omni.physx.bindings._physx.IPhysxAttachment,
points: List[carb._carb.Float3],
) int#

Create point finder.

Parameters:

points – Points of the mesh

Returns:

Handle to point finder

create_surface_sampler(
self: omni.physx.bindings._physx.IPhysxAttachment,
collider_path: str,
sampling_distance: float,
) int#

Create surface Poisson sampler.

Parameters:
  • collider_path – Path to prim with UsdPhysics.CollisionAPI

  • sampling_distance – Distance used for sampling points

Returns:

Handle to surface sampler

create_tet_finder(
self: omni.physx.bindings._physx.IPhysxAttachment,
points: List[carb._carb.Float3],
indices: List[int],
) int#

Create tet finder.

Parameters:
  • points – Points of the tetrahedral mesh

  • indices – Indices of the tetrahedral mesh

Returns:

Handle to tet finder

create_tri_mesh_sampler(
self: omni.physx.bindings._physx.IPhysxAttachment,
surface_sampler: int,
) None#

Get closest points to the input points on the prim

Parameters:
  • points – input points

  • path – prim path

Returns:

Return a dictionary with closest information:

'closest_points': float3 - Closest points to the input points on the prim. Only valid when returned distance is strictly positive.
'dists': float - Square distances between the points and the geom object. 0.0 if the point is inside the object.

get_closest_points(
self: omni.physx.bindings._physx.IPhysxAttachment,
point: List[carb._carb.Float3],
path: str,
) dict#

Get closest points to the input points on the prim

Parameters:
  • points – input points

  • path – prim path

Returns:

Return a dictionary with closest information:

'closest_points': float3 - Closest points to the input points on the prim. Only valid when returned distance is strictly positive.
'dists': float - Square distances between the points and the geom object. 0.0 if the point is inside the object.

get_surface_sampler_points(
self: omni.physx.bindings._physx.IPhysxAttachment,
surface_sampler: int,
) dict#

Get the samples of surface sampler.

Parameters:

surface_sampler – Handle to surface sampler

Returns:

Dict mapping ‘points’ to the resulting sampling points

is_point_inside(
self: omni.physx.bindings._physx.IPhysxAttachment,
surface_sampler: int,
point: carb._carb.Float3,
) bool#

Get closest points to the input points on the prim

Parameters:
  • points – input points

  • path – prim path

Returns:

Return a dictionary with closest information:

'closest_points': float3 - Closest points to the input points on the prim. Only valid when returned distance is strictly positive.
'dists': float - Square distances between the points and the geom object. 0.0 if the point is inside the object.

overlap_tetmesh_capsule(
self: omni.physx.bindings._physx.IPhysxAttachment,
tet_finder: int,
pos: carb._carb.Float3,
axis: carb._carb.Float3,
radius: float,
half_height: float,
) dict#

Finds all tetrahedra overlapping with a capsule.

Parameters:
  • tet_finder – Handle to tet finder

  • pos – Position of capsule

  • axis – Orientation of the capsule

  • radius – Radius of the capsule

  • capsule (half_height Half height of the)

Returns:

Dict mapping ‘tet_ids’ to the resulting indices of tetrahedra overlapping with the capsule.

overlap_tetmesh_sphere(
self: omni.physx.bindings._physx.IPhysxAttachment,
tet_finder: int,
center: carb._carb.Float3,
radius: float,
) dict#

Finds all tetrahedra overlapping with a sphere.

Parameters:
  • tet_finder – Handle to tet finder

  • center – Center of sphere

  • radius – Radius of sphere

Returns:

Dict mapping ‘tet_ids’ to the resulting indices of tetrahedra overlapping with the sphere.

points_to_indices(
self: omni.physx.bindings._physx.IPhysxAttachment,
point_finder: int,
points: List[carb._carb.Float3],
) dict#

Map points to indices.

Parameters:
  • point_finder – Handle to point finder

  • points – Points to be mapped

Returns:

Dict mapping ‘indices’ to the resulting mesh coordinates. Indices might be -1 for points outside of the mesh.

points_to_tetmesh_local(
self: omni.physx.bindings._physx.IPhysxAttachment,
tet_finder: int,
points: List[carb._carb.Float3],
) dict#

Map points in euclidean coordiantes to tet mesh coordinates.

Parameters:
  • tet_finder – Handle to tet finder

  • points – Points to be mapped

Returns:

Dict mapping ‘tet_ids’ and ‘barycentric_coords’ to the resulting local tet mesh coordinates. Tet indices might be -1 for points outside of the tetrahedral mesh.

release_point_finder(
self: omni.physx.bindings._physx.IPhysxAttachment,
point_finder: int,
) None#

Release point finder.

Parameters:

point_finder – Handle to point finder

release_surface_sampler(
self: omni.physx.bindings._physx.IPhysxAttachment,
surface_sampler: int,
) None#

Release surface Poisson sampler.

Parameters:

surface_sampler – Handle to surface sampler

release_tet_finder(
self: omni.physx.bindings._physx.IPhysxAttachment,
tet_finder: int,
) None#

Release tet finder.

Parameters:

tet_finder – Handle to tet finder

remove_surface_sampler_points(
self: omni.physx.bindings._physx.IPhysxAttachment,
surface_sampler: int,
points: List[carb._carb.Float3],
) None#

Remove samples from surface sampler.

Parameters:
  • surface_sampler – Handle to surface sampler

  • points – Points to remove

This function removes samples from the surface sampler.

sample_surface(
self: omni.physx.bindings._physx.IPhysxAttachment,
surface_sampler: int,
sphere_center: carb._carb.Float3,
sphere_radius: float,
sampling_distance: float,
) dict#

Create new surface samples within specified sphere.

Parameters:
  • surface_sampler – Handle to surface sampler

  • sphere_center – Center of sphere used for restricting sampling domain

  • sphere_radius – Radius of sphere used for restricting sampling domain

Returns:

Dict mapping ‘points’ to the resulting sampling points

New samples are created on the surface for which the samples has been created, and within the sphere specified.

tetmesh_local_to_points(
self: omni.physx.bindings._physx.IPhysxAttachment,
tet_finder: int,
tet_ids: List[int],
barycentric_coords: List[carb._carb.Float4],
) dict#

Map tet mesh coordinates to points in euclidean coordinates.

Parameters:
  • tet_finder – Handle to tet finder

  • tet_ids – Tetrahedra indices

  • barycentric_coords – Barycentric coordinates

Returns:

Dict mapping ‘points’ to the resulting points in euclidean coordinates.

class omni.physx.bindings._physx.IPhysxBenchmarks#

This interface is the access point to the omni.physx benchmarks.

enable_profile(
self: omni.physx.bindings._physx.IPhysxBenchmarks,
enable_profile: bool,
) None#

Enabled profiling :param enable_profile: Do custom physics profiling

get_profile_stats(
self: omni.physx.bindings._physx.IPhysxBenchmarks,
) dict#

Get profiling stats

subscribe_profile_stats_events(
self: omni.physx.bindings._physx.IPhysxBenchmarks,
fn: Callable[[List[omni.physx.bindings._physx.PhysicsProfileStats]], None],
) carb._carb.Subscription#

Subscribes to physics benchmark profile stats.

Subscription cannot be changed in the onUpdate callback

If subscribed the profile stats get reset after each call, this means get_profile_stats will not work as expected.

Parameters:

fn – The callback to be called on every physics fetchResults.

Returns:

The subscription holder.

class omni.physx.bindings._physx.IPhysxPropertyQuery#
query_prim(self: omni.physx.bindings._physx.IPhysxPropertyQuery, stage_id: int, prim_id: int, query_mode: omni.physx.bindings._physx.PhysxPropertyQueryMode = <PhysxPropertyQueryMode.QUERY_RIGID_BODY_WITH_COLLIDERS: 0>, timeout_ms: int = -1, finished_fn: Callable[[], None] = None, rigid_body_fn: Callable[[omni.physx.bindings._physx.PhysxPropertyQueryRigidBodyResponse], None] = None, collider_fn: Callable[[omni.physx.bindings._physx.PhysxPropertyQueryColliderResponse], None] = None) None#

Returns information for given prim

Parameters:
  • stage_id – uint64_t Stage id

  • prim_id – uint64_t USD path (use PhysicsSchemaTools::sdfPathToInt)

  • query_mode – PhysxPropertyQueryMode Type of query to be made

  • timeout_ms – int64 Timeout (in milliseconds) for the request. (-1 means wait forever)

  • finished_fn – function Report function called when enumeration of all objects is finished

  • rigid_body_fn – function Report function where rigid body information will be returned in PhysxPropertyQueryRigidBodyResponse object

  • collider_fn – function Report function where collider information will be returned in PhysxPropertyQueryRigidBodyResponse object

class omni.physx.bindings._physx.IPhysxReplicator#
register_replicator(
self: omni.physx.bindings._physx.IPhysxReplicator,
stage_id: int,
replicator_attach_fn: Callable[[int], list],
replicator_attach_end_fn: Callable[[int], None],
hierarchy_rename_fn: Callable[[str, int], str],
) None#

Register replicator for given stage.

stage_id: current stageId

replicator_attach_fn: std::function<py::list(uint64_t stageId)>;

replicator_attach_end_fn: std::function<py::list(uint64_t stageId)>;

hierarchy_rename_fn: std::function<const char* (const char* replicatePath, uint32_t index)>;

replicate(
self: omni.physx.bindings._physx.IPhysxReplicator,
stage_id: int,
path: str,
numReplications: int,
useEnvIds: bool = False,
useFabricForReplication: bool = False,
) bool#

Replicate hierarchy.

stage_id: stage id path: path to replicate numReplications: number of replications useEnvIds: setup EnvIds. Environment IDs are a more efficient way to filter out independent parts of a scene (the different environments). When enabled, filtering is automatically done early within the simulation pipeline, without the need to specify extra filtering parameters like collision groups, etc. EnvIDs also potentially make co-located envs faster. useFabricForReplication: replicate hierarchy through Fabric

unregister_replicator(
self: omni.physx.bindings._physx.IPhysxReplicator,
stage_id: int,
) None#

Unregister replicator from stage.

class omni.physx.bindings._physx.IPhysxSimulation#

This interface is the access point to the omni.physx simulation control.

apply_force_at_pos(
self: omni.physx.bindings._physx.IPhysxSimulation,
stage_id: int,
body_path: int,
force: carb._carb.Float3,
pos: carb._carb.Float3,
mode: str = 'Force',
) None#

Applies force at given body with given force position.

Parameters:
  • stage_id – USD stageId

  • body_path – USD path of the body encoded in uint64_t use PhysicsSchemaTools::sdfPathToInt

  • force – Force to apply to the body.

  • pos – World position where the force is applied.

  • mode – Supporting various modes - Force (default), Impulse, Velocity, Acceleration.

apply_force_at_pos_instanced(
self: omni.physx.bindings._physx.IPhysxSimulation,
stage_id: int,
point_instancer_path: int,
force: carb._carb.Float3,
pos: carb._carb.Float3,
mode: str = 'Force',
proto_index: int = 4294967295,
) None#

Applies force at given point instancer body with given force position.

Parameters:
  • stage_id – USD stageId

  • point_instancer_path – USD path to a point instancer encoded in uint64_t use PhysicsSchemaTools::sdfPathToInt

  • force – Force to apply to the target.

  • pos – World position where the force is applied.

  • mode – Supporting various modes - Force (default), Impulse, Velocity, Acceleration.

  • protoIndex – If protoIndex is 0xffffffff (default), force will be applied to all instances, otherwise it will only be applied to the instance at this index.

apply_torque(
self: omni.physx.bindings._physx.IPhysxSimulation,
stage_id: int,
body_path: int,
torque: carb._carb.Float3,
) None#

Applies torque at given body at body center of mass.

Parameters:
  • stage_id – USD stageId

  • body_path – USD path of the body encoded in uint64_t use PhysicsSchemaTools::sdfPathToInt

  • torque – Torque to apply to the body.

apply_torque_instanced(
self: omni.physx.bindings._physx.IPhysxSimulation,
stage_id: int,
body_path: int,
torque: carb._carb.Float3,
proto_index: int = 4294967295,
) None#

Applies torque at given point instancer body at body center of mass.

Parameters:
  • stage_id – USD stageId

  • point_instancer_path – USD path to a point instancer encoded in uint64_t use PhysicsSchemaTools::sdfPathToInt

  • torque – Torque to apply to the body.

  • protoIndex – If protoIndex is 0xffffffff (default), torque will be applied to all instances, otherwise it will only be applied to the instance at this index.

attach_stage(
self: omni.physx.bindings._physx.IPhysxSimulation,
stage_id: int,
) bool#

Attach USD stage. This will run the physics parser and will populate the PhysX SDK with the corresponding simulation objects.

Note: previous stage will be detached.

Parameters:

stage_id – USD stageId (can be retrieved from a stagePtr - UsdUtils.StageCache.Get().GetId(stage).ToLongInt())

Returns:

Returns true if stage was successfully attached.

check_results(
self: omni.physx.bindings._physx.IPhysxSimulation,
) bool#

Check if simulation finished.

Returns:

Returns true if simulation has finished.

check_results_scene(
self: omni.physx.bindings._physx.IPhysxSimulation,
scene_path: int,
) bool#

Check if a simulation scene is finished. Disabling a scene has no effect on this function. If scenePath is empty, it behaves like IPhysxSimulation::checkResults

Returns True if the simulation scene is finished.

scenePath uint64_t Scene USD path use PhysicsSchemaTools::sdfPathToInt

detach_stage(
self: omni.physx.bindings._physx.IPhysxSimulation,
) None#

Detach USD stage, this will remove all objects from the PhysX SDK

fetch_results(
self: omni.physx.bindings._physx.IPhysxSimulation,
) None#

Fetch simulation results. Writing out simulation results based on physics settings.

Note This is a blocking call. The function will wait until the simulation is finished.

fetch_results_scene(
self: omni.physx.bindings._physx.IPhysxSimulation,
scene_path: int,
) None#

Fetch simulation scene results and writes out simulation results based on physics settings for a specific scene. Disabling a scene has no effect on this function. If scenePath is empty, it behaves like IPhysxSimulation::fetchResults

Note: this is a blocking call. The function will wait until the simulation scene is finished.

scenePath uint64_t Scene USD path use PhysicsSchemaTools::sdfPathToInt

flush_changes(
self: omni.physx.bindings._physx.IPhysxSimulation,
) None#

Flush changes will force physics to process buffered changes

Changes to physics gets buffered, in some cases flushing changes is required if order is required.

Example - prim A gets added. Existing prim B has a relationship that gets switched to use A. Currently, the relationship change gets processed immediately and fails because prim A only gets added at the start of the next sim step.

get_attached_stage(
self: omni.physx.bindings._physx.IPhysxSimulation,
) int#

Returns the currently attached stage through the IPhysxSimulation interface

Returns:

Returns USD stage id.

get_contact_report(
self: omni.physx.bindings._physx.IPhysxSimulation,
) tuple#

Get contact report data for current simulation step directly.

The contact buffer data are available for one simulation step

Returns:

Tuple with contact event vector and contact data vector:

'contact_headers': vector of contact event headers
'contact_data': vector of contact data
'friction_anchors': vector of friction anchors data

get_full_contact_report(
self: omni.physx.bindings._physx.IPhysxSimulation,
) tuple#

Get contact report data for current simulation step directly, including friction anchors.

The contact buffer data are available for one simulation step

Returns:

Tuple with contact event vector and contact data vector:

'contact_headers': vector of contact event headers
'contact_data': vector of contact data
'friction_anchors': vector of friction anchors data

is_change_tracking_paused(
self: omni.physx.bindings._physx.IPhysxSimulation,
) bool#

Check if fabric change tracking for physics listener is paused or not

Returns true if paused change tracking.

is_sleeping(
self: omni.physx.bindings._physx.IPhysxSimulation,
stage_id: int,
body_path: int,
) bool#

Is body sleeping.

Parameters:
  • stage_id – USD stageId

  • body_path – USD path of the body encoded in uint64_t use PhysicsSchemaTools::sdfPathToInt

Returns:

True if body is asleeep

is_sleeping_instanced(
self: omni.physx.bindings._physx.IPhysxSimulation,
stage_id: int,
body_path: int,
proto_index: int,
) bool#

Is point instancer bodypoint instancer body sleeping.

Parameters:
  • stage_id – USD stageId

  • point_instancer_path – USD path to a point instancer encoded in uint64_t use PhysicsSchemaTools::sdfPathToInt

  • protoIndex – Check against the instance at this index.

Returns:

True if body is asleeep

pause_change_tracking(
self: omni.physx.bindings._physx.IPhysxSimulation,
pause: bool,
) None#

Pause fabric change tracking for physics listener.

Parameters:

tracking. (pause bool Pause or unpause change)

put_to_sleep(
self: omni.physx.bindings._physx.IPhysxSimulation,
stage_id: int,
body_path: int,
) None#

Put body to sleep.

Parameters:
  • stage_id – USD stageId

  • body_path – USD path of the body encoded in uint64_t use PhysicsSchemaTools::sdfPathToInt

put_to_sleep_instanced(
self: omni.physx.bindings._physx.IPhysxSimulation,
stage_id: int,
body_path: int,
proto_index: int = 4294967295,
) None#

Put point instancer body to sleep.

Parameters:
  • stage_id – USD stageId

  • point_instancer_path – USD path to a point instancer encoded in uint64_t use PhysicsSchemaTools::sdfPathToInt

  • protoIndex – If protoIndex is 0xffffffff (default), all instances will be put to sleep, otherwise it will only be applied to the instance at this index.

simulate(
self: omni.physx.bindings._physx.IPhysxSimulation,
elapsed_time: float,
current_time: float,
) None#

Execute physics asynchronous simulation.

Parameters:
  • elapsed_time – Simulation time (seconds).

  • current_time – Current time (seconds), might be used for time sampled transformations to apply.

simulate_scene(
self: omni.physx.bindings._physx.IPhysxSimulation,
scene_path: int,
elapsed_time: float,
current_time: float,
) None#

Execute the physics simulation on a specific scene.

The PhysX simulation in the scene will simulate the exact elapsedTime passed. No substepping will happen. It is the caller’s responsibility to provide a reasonable elapsedTime. In general it is recommended to use fixed size time steps with a maximum of 1/60 of a second. If scenePath is empty, it behaves like IPhysxSimulation::simulate

scenePath uint64_t Scene USD path use PhysicsSchemaTools::sdfPathToInt elapsedTime float Simulation time (seconds). currentTime float Current time (seconds), might be used for time sampled transformations to apply.

subscribe_contact_report_events(
self: omni.physx.bindings._physx.IPhysxSimulation,
fn: Callable[[omni.physx.bindings._physx.ContactEventHeaderVector, omni.physx.bindings._physx.ContactDataVector], None],
) carb._carb.Subscription#

Subscribes to contact report callback function.

The contact buffer data are available for one simulation step

Parameters:

fn – The callback to be called after simulation step to receive contact reports.

Returns:

The subscription holder.

subscribe_full_contact_report_events(
self: omni.physx.bindings._physx.IPhysxSimulation,
fn: Callable[[omni.physx.bindings._physx.ContactEventHeaderVector, omni.physx.bindings._physx.ContactDataVector, omni.physx.bindings._physx.FrictionAnchorsDataVector], None],
) carb._carb.Subscription#

Subscribes to contact report callback function including friction anchors.

The contact buffer data are available for one simulation step

Parameters:

fn – The callback to be called after simulation step to receive contact reports.

Returns:

The subscription holder.

subscribe_physics_trigger_report_events(
self: omni.physx.bindings._physx.IPhysxSimulation,
trigger_report_fn: Callable[[omni.physx.bindings._physx.TriggerEventData], None],
stage_id: int = 0,
prim_id: int = 0,
) int#

Register for trigger notifications

Parameters:
  • trigger_report_fn – function Report function where enter or leave trigger events will be notified

  • stage_id – uint64_t [Optional] Stage id to filter triggers from

  • prim_id – uint64_t [Optional] USD path to filter triggers from (use PhysicsSchemaTools::sdfPathToInt)

Returns:

SubscriptionId Subscription Id that can be unregistered with unsubscribe_physics_trigger_report_events

Return type:

subscription_id

unsubscribe_physics_trigger_report_events(
self: omni.physx.bindings._physx.IPhysxSimulation,
subscriptionId: int,
) None#

Unregister a subscription for trigger notifications

Parameters:

subscription_id – SubscriptionId Subscription Id

wake_up(
self: omni.physx.bindings._physx.IPhysxSimulation,
stage_id: int,
body_path: int,
) None#

Wake up body.

Parameters:
  • stage_id – USD stageId

  • body_path – USD path of the body encoded in uint64_t use PhysicsSchemaTools::sdfPathToInt

wake_up_instanced(
self: omni.physx.bindings._physx.IPhysxSimulation,
stage_id: int,
body_path: int,
proto_index: int = 4294967295,
) None#

Wake up point instancer body.

Parameters:
  • stage_id – USD stageId

  • point_instancer_path – USD path to a point instancer encoded in uint64_t use PhysicsSchemaTools::sdfPathToInt

  • protoIndex – If protoIndex is 0xffffffff (default), all instances will be awakened, otherwise it will only be applied to the instance at this index.

class omni.physx.bindings._physx.IPhysxStageUpdate#
on_attach(
self: omni.physx.bindings._physx.IPhysxStageUpdate,
arg0: int,
) None#

Called when a stage gets attached, does not load physics. Does just set internally stage.

stage_id: current stageId

on_detach(
self: omni.physx.bindings._physx.IPhysxStageUpdate,
) None#

Called when stage gets detached.

on_fabric_attach(
self: omni.physx.bindings._physx.IPhysxStageUpdate,
arg0: int,
) None#

Called again when a stage gets attached, but at a later point, where fabric stage is already created.

stage_id: current stageId

on_pause(
self: omni.physx.bindings._physx.IPhysxStageUpdate,
) None#

Called when timeline gets paused.

on_reset(
self: omni.physx.bindings._physx.IPhysxStageUpdate,
) None#

Called when timeline is stopped.

on_resume(
self: omni.physx.bindings._physx.IPhysxStageUpdate,
arg0: float,
) None#

Called when timeline play is requested.

current_time: Current time in seconds

on_update(
self: omni.physx.bindings._physx.IPhysxStageUpdate,
arg0: float,
arg1: float,
arg2: bool,
) None#

Called when on stage update.

current_time: Current time in seconds elapsed_sec: Elapsed time from previous update in seconds enable_update: Enable physics update, physics can be disabled, but we still need to update other subsystems

class omni.physx.bindings._physx.IPhysxStatistics#
enable_carb_stats_upload(
self: omni.physx.bindings._physx.IPhysxStatistics,
arg0: bool,
) None#

Enables/disables upload of Physx statistics for all PhysicsScenes into carb::stats.

enable bool true=enable, false=disable.

get_physx_scene_statistics(
self: omni.physx.bindings._physx.IPhysxStatistics,
arg0: int,
arg1: int,
arg2: omni.physx.bindings._physx.PhysicsSceneStats,
) bool#

Get physics scene PhysX simulation statistics.

stage_id: current stageId path: physics scene path encoded into two integers. Use PhysicsSchemaTools.encodeSdfPath to get those.

class omni.physx.bindings._physx.OverlapHit#

Overlap hit results structure.

property collision#

Path string to the collision that was hit.

property collision_encoded#

Encoded SdfPath to the collision that was hit. PhysicsSchemaTools.decodeSdfPath will return SdfPath.

property protoIndex#

ProtoIndex, filled for pointInstancers otherwise 0xFFFFFFFF.

property rigid_body#

Path string to the rigid body that was hit.

property rigid_body_encoded#

Encoded SdfPath to the rigid body that was hit. PhysicsSchemaTools.decodeSdfPath will return SdfPath.

class omni.physx.bindings._physx.ParticleVisualizationPositionType#

Particle position debug visualiztion option for smoothed fluid particles for use with SETTING_DISPLAY_PARTICLES_POSITION_TYPE.

SIM_POSITIONS = 0#
SMOOTHED_POSITIONS = 1#
class omni.physx.bindings._physx.ParticleVisualizationRadiusType#

Particle radius debug visualization option for use with SETTING_DISPLAY_PARTICLES_RADIUS_TYPE.

ANISOTROPY = 4#
CONTACT_OFFSET = 0#
PARTICLE_CONTACT_OFFSET = 2#
PARTICLE_REST_OFFSET = 3#
RENDER_GEOMETRY = 5#
REST_OFFSET = 1#
class omni.physx.bindings._physx.PhysX#

This interface is the main access point to omni.physx extension. It contains functions that can control the simulation, modify the simulation or work directly with physics objects.

apply_force_at_pos(
self: omni.physx.bindings._physx.PhysX,
body_path: str,
force: carb._carb.Float3,
pos: carb._carb.Float3,
mode: str = 'Force',
) None#

Applies force at given body with given force position.

Deprecated, please use apply_force_at_pos at physx_simulation_interface

Parameters:
  • body_path – USD path of the body.

  • force – Force to apply to the body.

  • pos – World position where the force is applied.

  • mode – Supporting various modes - Force (default), Impulse, Velocity, Acceleration.

cancel_collision_tasks(
self: omni.physx.bindings._physx.PhysX,
) int#

Returns the number of active collision cooking tasks which were canceled

check_backwards_compatibility(
self: omni.physx.bindings._physx.PhysX,
stage_id: int = -1,
) bool#

Checks for occurrences of any old schema format.

compute_vehicle_velocity(
self: omni.physx.bindings._physx.PhysX,
path: str,
direction: carb._carb.Float3,
) float#

Get the linear velocity of a vehicle (vehicle prim needs to have vehicle API applied).

Note

Should only be called after the simulation has been started.

Parameters:
  • path – Vehicle USD path.

  • direction – carb.Float3: Unit length direction vector along which the linear velocity should get computed. The vector is considered to be relative to the center of mass frame of the vehicle. If None is passed in, then the local forward direction of the vehicle will be used.

Returns:

The velocity along the provided direction vector.

force_load_physics_from_usd(
self: omni.physx.bindings._physx.PhysX,
) None#

Forces load physics objects from USD into PhysX. By default physics is not loaded; this function forces a load of all physics from USD into PhysX.

get_backwards_compatibility_check_log(
self: omni.physx.bindings._physx.PhysX,
) str#

Get backwards compatibility check log. Valid for last run of backward compatibility check.

get_error_event_stream(
self: omni.physx.bindings._physx.PhysX,
) carb.events._events.IEventStream#

Error event stream sending various error events defined in ErrorEvent enum.

Returns:

Event stream sending the physics errors.

get_num_collision_tasks(
self: omni.physx.bindings._physx.PhysX,
) int#

Returns the number of active collision cooking tasks

get_overwrite_gpu_setting(
self: omni.physx.bindings._physx.PhysX,
) int#

Get CPU vs GPU simulation settings.

Returns:

-1 - use setting from schema, 0 - force CPU, 1 - force GPU

Return type:

Integer defining the behavior

get_rigidbody_transformation(
self: omni.physx.bindings._physx.PhysX,
path: str,
) dict#

Gets rigid body current transformation in a global space.

Parameters:

path – The USD path to the rigid body.

Returns:

Return a dictionary with transformation info:

'ret_val': bool - whether transformation was found
'position': float3 - rigid body position
'rotation': float4 - rigid body rotation (quat - x,y,z,w)

get_simulation_event_stream_v2(
self: omni.physx.bindings._physx.PhysX,
) carb.events._events.IEventStream#

Simulation event stream sending various simulation events defined in SimulationEvent enum.

Returns:

Event stream sending the simulation events.

get_vehicle_drive_state(
self: omni.physx.bindings._physx.PhysX,
path: str,
) dict#

Get the drive state of a vehicle.

Note

Should only be called after the simulation has been started.

Parameters:

path – Vehicle USD path.

Returns:

A dictionary with the following key, value pairs. An empty dictionary is returned for an invalid path, when the simulation is not running or when the vehicle does not have a Basic or Standard drive type.

VEHICLE_DRIVE_STATE_ACCELERATOR, d (in range [0, 1]),
VEHICLE_DRIVE_STATE_BRAKE0, d (in range [0, 1]),
VEHICLE_DRIVE_STATE_BRAKE1, d (in range [0, 1]),
VEHICLE_DRIVE_STATE_STEER, d (in range [-1, 1]),
VEHICLE_DRIVE_STATE_CLUTCH, d (in range [0, 1], only applicable to PhysxVehicleDriveStandard drive type),
VEHICLE_DRIVE_STATE_CURRENT_GEAR, i (only applicable to PhysxVehicleDriveStandard drive type),
VEHICLE_DRIVE_STATE_TARGET_GEAR, i (only applicable to PhysxVehicleDriveStandard drive type),
VEHICLE_DRIVE_STATE_GEAR_SWITCH_TIME, d (in seconds, negative value if no gear shift is in process. Only applicable to PhysxVehicleDriveStandard drive type),
VEHICLE_DRIVE_STATE_AUTOBOX_TIME_SINCE_LAST_SHIFT, d (in seconds, only applicable toPhysxVehicleDriveStandard drive type),
VEHICLE_DRIVE_STATE_ENGINE_ROTATION_SPEED, d (in radians per second, only applicable to PhysxVehicleDriveStandard drive type),
VEHICLE_DRIVE_STATE_AUTOMATIC_TRANSMISSION, i (only applicable to PhysxVehicleDriveStandard drive type)

get_wheel_state(
self: omni.physx.bindings._physx.PhysX,
path: str,
) dict#

Get the wheel state.

Note

Should only be called after the simulation has been started.

Parameters:

path – Wheel attachment USD path.

Returns:

A dictionary with the following key, value pairs. An empty dictionary is returned for an invalid path.

VEHICLE_WHEEL_STATE_LOCAL_POSE_POSITION, (d, d, d),
VEHICLE_WHEEL_STATE_LOCAL_POSE_QUATERNION, (d, d, d, d)
VEHICLE_WHEEL_STATE_ROTATION_SPEED, d (in radians per second),
VEHICLE_WHEEL_STATE_ROTATION_ANGLE, d (in radians),
VEHICLE_WHEEL_STATE_STEER_ANGLE, d (in radians),
VEHICLE_WHEEL_STATE_GROUND_PLANE, (d, d, d, d) (first 3 entries are plane normal n, fourth entry is d of equation dot(n, v) + d = 0). Only valid if wheel is on ground, see VEHICLE_WHEEL_STATE_IS_ON_GROUND,
VEHICLE_WHEEL_STATE_GROUND_ACTOR, string (USD path of the actor prim the wheel is driving on). Only valid if wheel is on ground, see VEHICLE_WHEEL_STATE_IS_ON_GROUND,
VEHICLE_WHEEL_STATE_GROUND_SHAPE, string (USD path of the collider prim the wheel is driving on). Only valid if wheel is on ground, see VEHICLE_WHEEL_STATE_IS_ON_GROUND,
VEHICLE_WHEEL_STATE_GROUND_MATERIAL, string (USD path of the material prim the wheel is driving on). Only valid if wheel is on ground, see VEHICLE_WHEEL_STATE_IS_ON_GROUND,
VEHICLE_WHEEL_STATE_GROUND_HIT_POSITION, (d, d, d) (hit position on the ground in world space). Only valid if wheel is on ground, see VEHICLE_WHEEL_STATE_IS_ON_GROUND,
VEHICLE_WHEEL_STATE_SUSPENSION_JOUNCE, d,
VEHICLE_WHEEL_STATE_SUSPENSION_FORCE, (d, d, d),
VEHICLE_WHEEL_STATE_TIRE_FRICTION, d,
VEHICLE_WHEEL_STATE_TIRE_LONGITUDINAL_DIRECTION, (d, d, d),
VEHICLE_WHEEL_STATE_TIRE_LATERAL_DIRECTION, (d, d, d),
VEHICLE_WHEEL_STATE_TIRE_LONGITUDINAL_SLIP, d,
VEHICLE_WHEEL_STATE_TIRE_LATERAL_SLIP, d,
VEHICLE_WHEEL_STATE_TIRE_FORCE, (d, d, d),
VEHICLE_WHEEL_STATE_IS_ON_GROUND, i, whether the wheel did touch the ground or is in air (=0). If the vehicle is disabled or sleeping then the wheel will be treated as not touching ground too.

is_asyncsimrender_enabled(
self: omni.physx.bindings._physx.PhysX,
) bool#

Returns true if asynchronous simulation and rendering is enabled for one of the scenes in the simulation.

is_interactive_actor_raycast(
self: omni.physx.bindings._physx.PhysX,
arg0: carb._carb.Float3,
arg1: carb._carb.Float3,
) bool#

Raycast check to detect interactive physics actors

Note

Only produces positive results during simulation

Parameters:
  • origin – carb.Float3: World-space origin of raycast

  • direction – carb.Float3: Unit-length direction vector of raycast

Returns:

True if interactive actor is hit; False otherwise, or if simulation is not running

is_readback_suppressed(
self: omni.physx.bindings._physx.PhysX,
) bool#

Check if GPU readback is suppressed for currently running simulation.

Returns:

True if simulation is running with suppressed readback. Always returns false when simulation is not running.

is_running(self: omni.physx.bindings._physx.PhysX) bool#

Check if simulation loop is running, this function returns true if play was pressed or if IPhysxSimulation was attached.

overwrite_gpu_setting(
self: omni.physx.bindings._physx.PhysX,
gpuSetting: int,
) None#

Override CPU vs GPU simulation settings.

Parameters:

gpuSetting – Integer defining the behavior: -1 - use setting from schema, 0 - force CPU, 1 - force GPU

overwrite_solver_type(
self: omni.physx.bindings._physx.PhysX,
solverSetting: int,
) None#

Override PhysX solver settings.

Parameters:

solverSetting – Integer defining the behavior: -1 - use setting from schema, 0 - force PGS, 1 - force TGS

put_to_sleep(
self: omni.physx.bindings._physx.PhysX,
body_path: str,
) None#

Put body to sleep.

Deprecated, please use apply_force_at_pos at physx_simulation_interface

Parameters:

body_path – USD path of the body.

reconnect_pvd(self: omni.physx.bindings._physx.PhysX) None#

Reconnect to PVD (PhysX Visual Debugger)

release_local_mesh_cache(
self: omni.physx.bindings._physx.PhysX,
) None#

Release Local Mesh Cache.

release_physics_objects(
self: omni.physx.bindings._physx.PhysX,
) None#

Forces release of all physics objects from PhysX.

reset_setting(
self: omni.physx.bindings._physx.PhysX,
arg0: str,
) None#

Resets all physics settings to their default values.

reset_settings(self: omni.physx.bindings._physx.PhysX) None#

Resets all physics settings to their default values.

reset_settings_in_preferences(
self: omni.physx.bindings._physx.PhysX,
) None#

Resets physics preferences to their default values.

reset_settings_in_stage(
self: omni.physx.bindings._physx.PhysX,
) None#

Resets physics per-stage settings to their default values.

reset_simulation(self: omni.physx.bindings._physx.PhysX) None#

Reset physics simulation and set back original transformations stored during start_simulation. This will also remove all data from PhysX.

run_backwards_compatibility(
self: omni.physx.bindings._physx.PhysX,
stage_id: int = -1,
) None#

Runs the backwards compatibility code, will try to fix older schema format to a new format.

save_scene_to_repx(
self: omni.physx.bindings._physx.PhysX,
arg0: str,
) bool#

Save scene to RepX, if scene is not loaded, load scene, save and release.

set_simulation_layer(
self: omni.physx.bindings._physx.PhysX,
layer: str,
) None#

Sets simulation layer. This layer is used when simulation output transformations are written to USD.

Parameters:

layer – The layer that we simulate to.

set_thread_count(
self: omni.physx.bindings._physx.PhysX,
numThreads: int,
) None#

Sets number of threads for simulation.

Parameters:

numThreads – Number of threads that physics should use

set_vehicle_to_rest_state(
self: omni.physx.bindings._physx.PhysX,
path: str,
) None#

Set the internal dynamics state of a vehicle back to the rest state.

Note

Should only be called after the simulation has been started.

Parameters:

path – Vehicle USD path.

set_voxel_range(
self: omni.physx.bindings._physx.PhysX,
stage_id: int,
path: str,
sx: int,
sy: int,
sz: int,
ex: int,
ey: int,
ez: int,
type: int,
subtype: int,
update: int,
) bool#

Set Voxelmap Voxels

Parameters:
  • stage_id – Stage containing source mesh primitive.

  • input_path – path to input primitive

  • sx – voxel range start X

  • sy – voxel range start Y

  • sz – voxel range start Z

  • ex – voxel range end X

  • ey – voxel range end Y

  • ez – voxel range end Z

  • type – voxel type

  • sub_type – voxel subtype

  • update – update flag, if zero, writing changes to USD is postponed, if non-zero, all accumulated changes are written to USD

set_wheel_rotation_angle(
self: omni.physx.bindings._physx.PhysX,
path: str,
rotationAngle: float,
) None#

Set the rotation angle about the rolling axis of a wheel.

Note

Should only be called after the simulation has been started.

Parameters:
  • path – Wheel attachment USD path.

  • rotationAngle – Rotation angle of the wheel in radians.

set_wheel_rotation_speed(
self: omni.physx.bindings._physx.PhysX,
path: str,
rotationSpeed: float,
) None#

Set the rotation speed about the rolling axis of a wheel.

Note

Should only be called after the simulation has been started.

Parameters:
  • path – Wheel attachment USD path.

  • rotationSpeed – Rotation speed of the wheel in radians per second.

start_simulation(self: omni.physx.bindings._physx.PhysX) None#

Start simulation, store initial USD data. Call this before manually stepping simulation.

subscribe_object_changed_notifications(
self: omni.physx.bindings._physx.PhysX,
object_creation_fn: Callable[[int, int, int], None] = None,
object_destruction_fn: Callable[[int, int, int], None] = None,
all_objects_destruction_fn: Callable[[], None] = None,
stop_callback_when_sim_stopped: bool = True,
) int#

Subscribes to Object Changed Notifications

Parameters:
  • object_creation_fn – function(path, object_id, physx_type) Notification when a physics object gets created during simulation.

  • object_destruction_fn – function(path, object_id, physx_type) Notification when a physics object gets destroyed during simulation.

  • all_objects_destruction_fn – function Notification when all physics objects get destroyed during simulation.

  • stopCallbackWhenSimStopped – bool Whether these callbacks should not be sent when the simulation stops

Returns:

The subscription holder (SubscriptionId) to use with unsubscribe_object_change_notifications

subscribe_physics_on_step_events(
self: omni.physx.bindings._physx.PhysX,
fn: Callable[[float], None],
pre_step: bool,
order: int,
) carb._carb.Subscription#

Subscribes to physics pre-step or post-step events.

Subscription cannot be changed in the onUpdate callback

Parameters:
  • fn – The callback to be called right before or after every physics step.

  • pre_step – Whether fn has to be called right before the physics step. If this is false, it will be called right after the physics step.

  • order – An integer value used to order the callbacks: 0 means “highest priority”, 1 is “less priority” and so on.

Returns:

The subscription holder.

subscribe_physics_step_events(
self: omni.physx.bindings._physx.PhysX,
fn: Callable[[float], None],
) carb._carb.Subscription#

Subscribes to physics step events.

Subscription cannot be changed in the onUpdate callback

Parameters:

fn – The callback to be called on every physics step.

Returns:

The subscription holder.

unsubscribe_object_change_notifications(
self: omni.physx.bindings._physx.PhysX,
subscription_id: int,
) None#

Unsubscribes object change notifications with the subscriptionID as returned by subscribe_object_changed_notifications

update_interaction(
self: omni.physx.bindings._physx.PhysX,
arg0: carb._carb.Float3,
arg1: carb._carb.Float3,
arg2: omni.physx.bindings._physx.PhysicsInteractionEvent,
) None#

Updates actor interaction based on user input and raycast origin and direction

Note

Only provides interaction during simulation

Parameters:
  • origin – carb.Float3: World-space origin of interaction

  • direction – carb.Float3: Unit-length direction vector of interaction

  • event – PhysicsInteractionEvent triggered.

update_simulation(
self: omni.physx.bindings._physx.PhysX,
elapsedStep: float,
currentTime: float,
) None#

Update physics simulation by one step.

Parameters:
  • elapsedStep – Simulation step time (seconds), time elapsed between last step and this step.

  • currentTime – Current time (seconds), might be used for time sampled transformations to apply.

update_simulation_scene(
self: omni.physx.bindings._physx.PhysX,
scene_path: int,
elapsed_step: float,
current_time: float,
) None#

Update and step a specific scene in the physics simulation. The specific scene specified in scenePath is updated and stepped even if marked as ‘Disabled’. If scenePath is empty, it behaves like IPhysx::updateSimulation

Parameters:
  • scenePath – uint64_t Scene USD path use PhysicsSchemaTools::sdfPathToInt

  • elapsedStep – float Simulation time (seconds).

  • currentTime – float Current time (seconds), might be used for time sampled transformations to apply.

update_transformations(
self: omni.physx.bindings._physx.PhysX,
updateToFastCache: bool,
updateToUsd: bool,
updateVelocitiesToUsd: bool = False,
outputVelocitiesLocalSpace: bool = False,
) None#

Update transformations after simulation is done.

Parameters:
  • updateToFastCache – Update transformation in fast cache.

  • updateToUsd – Update transformations in USD.

  • updateVelocitiesToUsd – Update velocities in USD.

update_transformations_scene(
self: omni.physx.bindings._physx.PhysX,
scene_path: int,
update_to_usd: bool,
update_velocities_to_usd: bool,
) None#

Update the transformations for a specific scene in the physics simulation. The specific scene specified in scenePath has its transformations updated even if it is marked as ‘Disabled’. If scenePath is empty, it behaves like IPhysx::updateTransformations

scenePath uint64_t Scene USD path use PhysicsSchemaTools::sdfPathToInt updateToUsd bool Update transforms to USD. updateVelocitiesToUsd bool Update velocities to USD.

wake_up(
self: omni.physx.bindings._physx.PhysX,
body_path: str,
) None#

Wake up body.

Deprecated, please use apply_force_at_pos at physx_simulation_interface

Parameters:

body_path – USD path of the body.

class omni.physx.bindings._physx.PhysXCooking#

This interface is the access point to the omni.physx extension cooking API.

add_prim_to_cooking_refresh_set(
self: omni.physx.bindings._physx.PhysXCooking,
arg0: pxrInternal_v0_22__pxrReserved__::SdfPath,
) None#

Adds Prim to cooking refresh set.

Parameters:

primPath – path to Prim

cancel_collision_representation_task(
self: omni.physx.bindings._physx.PhysXCooking,
task: omni.physx.bindings._physx.PhysxCollisionRepresentationTask,
invoke_callback: bool = True,
) None#

Cancels an async physics collision representation task made with request_convex_collision_representation

Parameters:
  • task – PhysxCollisionRepresentationTask The task returned by request_convex_collision_representation to cancel

  • invoke_callback – bool If the on_result callback should be invoked anyway

cancel_collision_tasks(
self: omni.physx.bindings._physx.PhysXCooking,
) int#

Returns the number of active collision cooking tasks which were canceled

compute_conforming_tetrahedral_mesh(
self: omni.physx.bindings._physx.PhysXCooking,
src_tri_points: List[carb._carb.Float3],
src_tri_indices: List[int],
) dict#

Create a conforming tetrahedral mesh from a closed source triangle mesh.

Parameters:
  • mesh (src_tri_points Vertices of the source triangle)

  • triangles (src_tri_indices Vertex indices of the source)

Returns:

Dict mapping ‘points’ and ‘indices’ to the resulting tetrahedral mesh points and indices

The conforming tetrahedral mesh is defined as a tetrahedral mesh whose surface triangles align with the closed source triangle mesh and whose internal vertices lie on the inside of the closed source triangle mesh.

compute_edge_length_limited_triangle_mesh(
self: omni.physx.bindings._physx.PhysXCooking,
arg0: List[carb._carb.Float3],
arg1: List[int],
arg2: float,
) dict#

Limits the maximum edge length in a triangle mesh

compute_voxel_tetrahedral_mesh(
self: omni.physx.bindings._physx.PhysXCooking,
src_tet_points: List[carb._carb.Float3],
src_tet_indices: List[int],
src_scale: carb._carb.Float3,
voxel_resolution: int,
) dict#

Create a voxel tetrahedral mesh from a source tetrahedral mesh.

Parameters:
  • src_tet_points – Vertices of teh source tetrahedral mesh

  • src_tet_indices – Vertex indices of the source tetrahedral mesh

  • src_scale – Scale of source mesh used to determine resolution of the resulting voxel mesh

  • voxel_resolution – Number of voxels along longest dimension of axis aligned bounding box of source mesh

Returns:

Dict mapping ‘points’ and ‘indices’ to the resulting tetrahedral mesh points and indices

The voxel tetrahedral mesh is made by voxelizing the source tetrahedra on a regular grid. The resulting voxel tetrahedral mesh embeds all tetrahedra of the source mesh. The provided voxel resolution may be lowered automatically in order to match a lower resolution detected in the source mesh. This may help to avoid softbody convergence issues with high-resolution tetrahedra embedding low resolution collision meshes.

cook_deformable_body_mesh(
self: omni.physx.bindings._physx.PhysXCooking,
deformable_body_path: str,
) bool#

Cooks deformable body mesh

Parameters:
  • stage_id – Stage containing source mesh primitive.

  • deformable_body_path – path to UsdGeomMesh with PhysxSchemaPhysxDeformableBodyAPI

get_convex_mesh_data(
self: omni.physx.bindings._physx.PhysXCooking,
meshPath: str,
convexIndex: int,
) dict#

Get convex mesh data for given prim path. (Does work only when simulation is running.)

Returns:

Return a dictionary with convex mesh:

'num_vertices': int - number of vertices
'num_polygons': int - number of polygons
'vertices': list - vertices list
'polygons': list - list of dictionaries, dictionary with polygon data::
    'plane' : float4 - Plane format: (mPlane[0],mPlane[1],mPlane[2]).dot(x) + mPlane[3] = 0
    'num_vertices' : int - number of vertices for the current polygon
    'index_base' : int - base index to the indices array
'indices': list - list of indices

get_nb_convex_mesh_data(
self: omni.physx.bindings._physx.PhysXCooking,
meshPath: str,
) int#

Get number of convex mesh data for given prim path. (Does work only when simulation is running.)

get_num_collision_tasks(
self: omni.physx.bindings._physx.PhysXCooking,
) int#

Returns the number of active collision cooking tasks

poisson_sample_mesh(
self: omni.physx.bindings._physx.PhysXCooking,
mesh_path: str,
async: bool,
) bool#

Samples particle positions from mesh

Parameters:

mesh_path – path to UsdGeomMesh with PhysxParticleSamplingAPI

release_local_mesh_cache(
self: omni.physx.bindings._physx.PhysXCooking,
) None#

Release Local Mesh Cache.

request_convex_collision_representation(self: omni.physx.bindings._physx.PhysXCooking, stage_id: int, collision_prim_id: int, run_asynchronously: bool = True, on_result: Callable[[omni.physx.bindings._physx.PhysxCollisionRepresentationResult, List[omni.physx.bindings._physx.PhysxConvexMeshData]], None]) omni.physx.bindings._physx.PhysxCollisionRepresentationTask#

Request physics collision representation of an USD mesh

Parameters:
  • stage_id – uint64_t Stage where prim exists

  • collision_prim_id – uint64_t Prim Id of the prim with CollisionAPI

  • run_asynchronously – bool If the request should be run asynchronously

  • on_result – Callable[PhysxCollisionRepresentationResult, list[PhysxConvexMeshData]) The callback with the wanted collision representation. result: Value of type PhysxCollisionRepresentationResult convexes: list of PhysxConvexMeshData

Returns: A PhysxCollisionRepresentationTask that can be cancelled with cancel_collision_representation_task

(if async request has been made)

wait_for_cooking_to_finish(
self: omni.physx.bindings._physx.PhysXCooking,
) None#

Waits for all cooking tasks to finish.

class omni.physx.bindings._physx.PhysXSceneQuery#

This interface is the access point to the omni.physx extension scene query API.

overlap_box(
self: omni.physx.bindings._physx.PhysXSceneQuery,
halfExtent: carb._carb.Float3,
pos: carb._carb.Float3,
rot: carb._carb.Float4,
reportFn: Callable[[omni.physx.bindings._physx.OverlapHit], bool],
anyHit: bool = False,
) int#

Overlap test of a box against objects in the physics scene.

Parameters:
  • halfExtent – Box half extent.

  • pos – Origin of the box overlap (barycenter of the box).

  • rot – Rotation of the box overlap (quat x, y, z, w)

  • reportFn – Report function where SceneQueryHits will be reported, return True to continue traversal, False to stop traversal

  • anyHit – Boolean defining whether overlap should report only bool hit (0 no hit, 1 hit found).

Returns:

Return number of hits founds

overlap_box_any(
self: omni.physx.bindings._physx.PhysXSceneQuery,
halfExtent: carb._carb.Float3,
pos: carb._carb.Float3,
rot: carb._carb.Float4,
) bool#

Overlap test of a box against objects in the physics scene, reports only boolean

Parameters:
  • extent – Box extent.

  • pos – Origin of the box overlap.

  • rot – Rotation of the box overlap (quat x, y, z, w)

Returns:

Returns True if overlap found

overlap_mesh(
self: omni.physx.bindings._physx.PhysXSceneQuery,
meshPath0: int,
meshPath1: int,
reportFn: Callable[[omni.physx.bindings._physx.OverlapHit], bool],
anyHit: bool = False,
) int#

Overlap test of a UsdGeom.Mesh against objects in the physics scene. Overlap test will use convex mesh approximation of the input mesh. The first query will need to cook this approximation so if the results are not stored in a local cache, this query might be slow.

Parameters:
  • mesh – UsdGeom.Mesh path encoded into two integers. Use PhysicsSchemaTools.encodeSdfPath to get those.

  • reportFn – Report function where SceneQueryHits will be reported, return True to continue traversal, False to stop traversal

  • anyHit – Boolean defining whether overlap should report only bool hit (0 no hit, 1 hit found).

Returns:

Return number of hits founds

overlap_mesh_any(
self: omni.physx.bindings._physx.PhysXSceneQuery,
meshPath0: int,
meshPath1: int,
) bool#

Overlap test of a UsdGeom.Mesh against objects in the physics scene. Overlap test will use convex mesh approximation of the input mesh. The first query will need to cook this approximation so if the results are not stored in a local cache, this query might be slow. Reports only boolean.

Parameters:

mesh – UsdGeom.Mesh path encoded into two integers. Use PhysicsSchemaTools.encodeSdfPath to get those.

Returns:

Returns True if overlap was found.

overlap_shape(
self: omni.physx.bindings._physx.PhysXSceneQuery,
meshPath0: int,
meshPath1: int,
reportFn: Callable[[omni.physx.bindings._physx.OverlapHit], bool],
anyHit: bool = False,
) int#

Overlap test of a UsdGeom.GPrim against objects in the physics scene. Overlap test will use convex mesh approximation if the input is a mesh. The first query will need to cook this approximation so if the results are not stored in a local cache, this query might be slow.

Parameters:
  • gprim – UsdGeom.GPrim path encoded into two integers. Use PhysicsSchemaTools.encodeSdfPath to get those.

  • reportFn – Report function where SceneQueryHits will be reported, return True to continue traversal, False to stop traversal

  • anyHit – Boolean defining whether overlap should report only bool hit (0 no hit, 1 hit found).

Returns:

Return number of hits founds

overlap_shape_any(
self: omni.physx.bindings._physx.PhysXSceneQuery,
meshPath0: int,
meshPath1: int,
) bool#

Overlap test of a UsdGeom.GPrim against objects in the physics scene. Overlap test will use convex mesh approximation if the input is a mesh. The first query will need to cook this approximation so if the results are not stored in a local cache, this query might be slow. Reports only boolean.

Parameters:

gprim – UsdGeom.GPrim path encoded into two integers. Use PhysicsSchemaTools.encodeSdfPath to get those.

Returns:

Returns True if overlap was found.

overlap_sphere(
self: omni.physx.bindings._physx.PhysXSceneQuery,
radius: float,
pos: carb._carb.Float3,
reportFn: Callable[[omni.physx.bindings._physx.OverlapHit], bool],
anyHit: bool = False,
) int#

Overlap test of a sphere against objects in the physics scene.

Parameters:
  • radius – Sphere radius.

  • pos – Origin of the sphere overlap.

  • reportFn – Report function where SceneQueryHits will be reported, return True to continue traversal, False to stop traversal

  • anyHit – Boolean defining whether overlap should report only bool hit (0 no hit, 1 hit found).

Returns:

Return number of hits founds

overlap_sphere_any(
self: omni.physx.bindings._physx.PhysXSceneQuery,
radius: float,
pos: carb._carb.Float3,
) bool#

Overlap test of a sphere against objects in the physics scene, reports only boolean.

Parameters:
  • radius – Sphere radius.

  • pos – Origin of the sphere overlap.

Returns:

Returns True if overlap found.

raycast_all(
self: omni.physx.bindings._physx.PhysXSceneQuery,
origin: carb._carb.Float3,
dir: carb._carb.Float3,
distance: float,
reportFn: Callable[[omni.physx.bindings._physx.RaycastHit], bool],
bothSides: bool = False,
) bool#

Raycast physics scene for all collisions.

Parameters:
  • origin – Origin of the raycast.

  • dir – Unit direction of the raycast.

  • distance – Raycast distance.

  • reportFn – Report function where RaycastHits will be reported, return True to continue traversal, False to stop traversal

  • bothSides – Boolean defining whether front and back side of a mesh triangle should be considered for hits.

Returns:

Returns true if hit

raycast_any(
self: omni.physx.bindings._physx.PhysXSceneQuery,
origin: carb._carb.Float3,
dir: carb._carb.Float3,
distance: float,
bothSides: bool = False,
) bool#

Raycast physics scene for any collision, reporting only boolean.

Parameters:
  • origin – Origin of the raycast.

  • dir – Unit direction of the raycast.

  • distance – Raycast distance.

  • bothSides – Boolean defining whether front and back side of a mesh triangle should be considered for hits.

Returns:

Return a boolean whether raycast hit.

raycast_closest(
self: omni.physx.bindings._physx.PhysXSceneQuery,
origin: carb._carb.Float3,
dir: carb._carb.Float3,
distance: float,
bothSides: bool = False,
) dict#

Raycast physics scene for the closest collision.

Parameters:
  • origin – Origin of the raycast.

  • dir – Unit direction of the raycast.

  • distance – Raycast distance.

  • bothSides – Boolean defining whether front and back side of a mesh triangle should be considered for hits.

Returns:

Return a dictionary with raycast hit:

'position': float3 -- Hit position.
'normal': float3 -- Hit normal.
'distance': float -- Hit distance.
'faceIndex': int -- Hit mesh face index.
'collision': string -- Hit collision USD path.
'rigidBody': string -- Hit rigid body USD path.
'protoIndex': int -- Rigid body protoIndex - if not point instancer 0xFFFFFFFF
'material': string -- Hit collider material USD path.

sweep_box_all(
self: omni.physx.bindings._physx.PhysXSceneQuery,
halfExtent: carb._carb.Float3,
pos: carb._carb.Float3,
rot: carb._carb.Float4,
dir: carb._carb.Float3,
distance: float,
reportFn: Callable[[omni.physx.bindings._physx.SweepHit], bool],
bothSides: bool = False,
) bool#

Box sweep physics scene for all collisions.

Parameters:
  • halfExtent – Box half extent.

  • pos – Origin of the sweep (barycenter of the box).

  • rot – Rotation of the box (quat x, y, z, w)

  • dir – Unit direction of the sweep.

  • distance – sweep distance.

  • reportFn – Report function where SweepHits will be reported, return True to continue traversal, False to stop traversal

  • bothSides – Boolean defining whether front and back side of a mesh triangle should be considered for hits.

Returns:

Returns true if hit

sweep_box_any(
self: omni.physx.bindings._physx.PhysXSceneQuery,
halfExtent: carb._carb.Float3,
pos: carb._carb.Float3,
rot: carb._carb.Float4,
dir: carb._carb.Float3,
distance: float,
bothSides: bool = False,
) bool#

Box sweep physics scene for any collision, reporting only boolean.

Parameters:
  • halfExtent – Box half extent.

  • pos – Origin of the sweep (barycenter of the box).

  • rot – Rotation of the sweep box (quat x, y, z, w)

  • dir – Unit direction of the sweep.

  • distance – sweep distance.

  • bothSides – Boolean defining whether front and back side of a mesh triangle should be considered for hits.

Returns:

Return a boolean if sweep hit.

sweep_box_closest(
self: omni.physx.bindings._physx.PhysXSceneQuery,
halfExtent: carb._carb.Float3,
pos: carb._carb.Float3,
rot: carb._carb.Float4,
dir: carb._carb.Float3,
distance: float,
bothSides: bool = False,
) dict#

Box sweep physics scene for the closest collision.

Parameters:
  • halfExtent – Box half extent.

  • pos – Origin of the sweep (barycenter of the box).

  • rot – Rotation of the sweep box (quat x, y, z, w)

  • dir – Unit direction of the sweep.

  • distance – sweep distance.

  • bothSides – Boolean defining whether front and back side of a mesh triangle should be considered for hits.

Returns:

Return a dictionary with raycast hit:

'position': float3 - hit position
'normal': float3 - hit normal
'distance': float - hit distance
'faceIndex': int - hit mesh face index
'collision': string - hit collision USD path
'rigidBody': string - hit rigid body USD path
'protoIndex': int -- Rigid body protoIndex - if not point instancer 0xFFFFFFFF
'material': string -- Hit collider material USD path.

sweep_mesh_all(
self: omni.physx.bindings._physx.PhysXSceneQuery,
meshPath0: int,
meshPath1: int,
dir: carb._carb.Float3,
distance: float,
reportFn: Callable[[omni.physx.bindings._physx.SweepHit], bool],
bothSides: bool = False,
) bool#

Sweep test of a UsdGeom.Mesh against objects in the physics scene. Sweep test will use convex mesh approximation of the input mesh. The first query will need to cook this approximation so if the results are not stored in a local cache, this query might be slow.

Parameters:
  • mesh – UsdGeom.Mesh path encoded into two integers. Use PhysicsSchemaTools.encodeSdfPath to get those.

  • dir – Unit direction of the sweep.

  • distance – sweep distance.

  • reportFn – Report function where SweepHits will be reported, return True to continue traversal, False to stop traversal

  • bothSides – Boolean defining whether front and back side of a mesh triangle should be considered for hits.

Returns:

Returns true if hit

sweep_mesh_any(
self: omni.physx.bindings._physx.PhysXSceneQuery,
meshPath0: int,
meshPath1: int,
dir: carb._carb.Float3,
distance: float,
bothSides: bool = False,
) bool#

Sweep test of a UsdGeom.Mesh against objects in the physics scene for any collision, reporting only boolean. Sweep test will use convex mesh approximation of the input mesh. The first query will need to cook this approximation so if the results are not stored in a local cache, this query might be slow.

Parameters:
  • mesh – UsdGeom.Mesh path encoded into two integers. Use PhysicsSchemaTools.encodeSdfPath to get those.

  • dir – Unit direction of the sweep.

  • distance – sweep distance.

  • bothSides – Boolean defining whether front and back side of a mesh triangle should be considered for hits.

Returns:

Return a boolean if sweep hit.

sweep_mesh_closest(
self: omni.physx.bindings._physx.PhysXSceneQuery,
meshPath0: int,
meshPath1: int,
dir: carb._carb.Float3,
distance: float,
bothSides: bool = False,
) dict#

Sweep test of a UsdGeom.Mesh against objects in the physics scene for the closest collision. Sweep test will use convex mesh approximation of the input mesh. The first query will need to cook this approximation so if the results are not stored in a local cache, this query might be slow.

Parameters:
  • mesh – UsdGeom.Mesh path encoded into two integers. Use PhysicsSchemaTools.encodeSdfPath to get those.

  • dir – Unit direction of the sweep.

  • distance – sweep distance.

  • bothSides – Boolean defining whether front and back side of a mesh triangle should be considered for hits.

Returns:

‘position’: float3 - hit position ‘normal’: float3 - hit normal ‘distance’: float - hit distance ‘faceIndex’: int - hit mesh face index ‘collision’: string - hit collision USD path ‘rigidBody’: string - hit rigid body USD path ‘protoIndex’: int – Rigid body protoIndex - if not point instancer 0xFFFFFFFF ‘material’: string – Hit collider material USD path.

Return type:

Return a dictionary with sweep hit

sweep_shape_all(
self: omni.physx.bindings._physx.PhysXSceneQuery,
meshPath0: int,
meshPath1: int,
dir: carb._carb.Float3,
distance: float,
reportFn: Callable[[omni.physx.bindings._physx.SweepHit], bool],
bothSides: bool = False,
) bool#

Sweep test of a UsdGeom.GPrim against objects in the physics scene. Sweep test will use convex mesh approximation if the input is a mesh. The first query will need to cook this approximation so if the results are not stored in a local cache, this query might be slow.

Parameters:
  • gprim – UsdGeom.GPrim path encoded into two integers. Use PhysicsSchemaTools.encodeSdfPath to get those.

  • dir – Unit direction of the sweep.

  • distance – sweep distance.

  • reportFn – Report function where SweepHits will be reported, return True to continue traversal, False to stop traversal

  • bothSides – Boolean defining whether front and back side of a mesh triangle should be considered for hits.

Returns:

Returns true if hit

sweep_shape_any(
self: omni.physx.bindings._physx.PhysXSceneQuery,
meshPath0: int,
meshPath1: int,
dir: carb._carb.Float3,
distance: float,
bothSides: bool = False,
) bool#

Sweep test of a UsdGeom.GPrim against objects in the physics scene for any collision, reporting only boolean. Sweep test will use convex mesh approximation if the input is a mesh. The first query will need to cook this approximation so if the results are not stored in a local cache, this query might be slow.

Parameters:
  • gprim – UsdGeom.GPrim path encoded into two integers. Use PhysicsSchemaTools.encodeSdfPath to get those.

  • dir – Unit direction of the sweep.

  • distance – sweep distance.

  • bothSides – Boolean defining whether front and back side of a mesh triangle should be considered for hits.

Returns:

Return a boolean if sweep hit.

sweep_shape_closest(
self: omni.physx.bindings._physx.PhysXSceneQuery,
meshPath0: int,
meshPath1: int,
dir: carb._carb.Float3,
distance: float,
bothSides: bool = False,
) dict#

Sweep test of a UsdGeom.GPrim against objects in the physics scene. Sweep test will use convex mesh approximation if the input is a mesh. The first query will need to cook this approximation so if the results are not stored in a local cache, this query might be slow.

Parameters:
  • gprim – UsdGeom.GPrim path encoded into two integers. Use PhysicsSchemaTools.encodeSdfPath to get those.

  • dir – Unit direction of the sweep.

  • distance – sweep distance.

  • bothSides – Boolean defining whether front and back side of a mesh triangle should be considered for hits.

Returns:

‘position’: float3 - hit position ‘normal’: float3 - hit normal ‘distance’: float - hit distance ‘faceIndex’: int - hit mesh face index ‘collision’: string - hit collision USD path ‘rigidBody’: string - hit rigid body USD path ‘protoIndex’: int – Rigid body protoIndex - if not point instancer 0xFFFFFFFF ‘material’: string – Hit collider material USD path.

Return type:

Return a dictionary with sweep hit

sweep_sphere_all(
self: omni.physx.bindings._physx.PhysXSceneQuery,
radius: float,
origin: carb._carb.Float3,
dir: carb._carb.Float3,
distance: float,
reportFn: Callable[[omni.physx.bindings._physx.SweepHit], bool],
bothSides: bool = False,
) bool#

Sphere sweep physics scene for all collisions.

Parameters:
  • radius – Sphere radius

  • origin – Origin of the sweep.

  • dir – Unit direction of the sweep.

  • distance – sweep distance.

  • reportFn – Report function where SweepHits will be reported, return True to continue traversal, False to stop traversal

  • bothSides – Boolean defining whether front and back side of a mesh triangle should be considered for hits.

Returns:

Returns true if hit

sweep_sphere_any(
self: omni.physx.bindings._physx.PhysXSceneQuery,
radius: float,
origin: carb._carb.Float3,
dir: carb._carb.Float3,
distance: float,
bothSides: bool = False,
) bool#

Sphere sweep physics scene for any collision, reporting only boolean.

Parameters:
  • radius – Sphere radius.

  • origin – Origin of the sphere sweep.

  • dir – Unit direction of the sphere sweep.

  • distance – Sphere sweep distance.

  • bothSides – Boolean defining whether front and back side of a mesh triangle should be considered for hits.

Returns:

Return a boolean if sphere sweep hit.

sweep_sphere_closest(
self: omni.physx.bindings._physx.PhysXSceneQuery,
radius: float,
origin: carb._carb.Float3,
dir: carb._carb.Float3,
distance: float,
bothSides: bool = False,
) dict#

Sphere sweep physics scene for the closest collision.

Parameters:
  • radius – Sphere radius.

  • origin – Origin of the sphere cast.

  • dir – Unit direction of the sphere cast.

  • distance – Sphere cast distance.

  • bothSides – Boolean defining whether front and back side of a mesh triangle should be considered for hits.

Returns:

‘position’: float3 - hit position ‘normal’: float3 - hit normal ‘distance’: float - hit distance ‘faceIndex’: int - hit mesh face index ‘collision’: string - hit collision USD path ‘rigidBody’: string - hit rigid body USD path ‘protoIndex’: int – Rigid body protoIndex - if not point instancer 0xFFFFFFFF ‘material’: string – Hit collider material USD path.

Return type:

Return a dictionary with sweep hit

class omni.physx.bindings._physx.PhysXUnitTests#

This interface is the access point to omni.physx test support functions.

end_logger_check(
self: omni.physx.bindings._physx.PhysXUnitTests,
) bool#
get_mass_information(
self: omni.physx.bindings._physx.PhysXUnitTests,
body_path: str,
) dict#

Returns mass information for a given body.

Parameters:

body. (body_path - USD path to)

Returns:

Return a dictionary with mass information:

'mass': float - Mass of the body.
'inertia': float3 - Inertia tensor of body.
'com': float3 - Center of mass of the body.

get_materials_paths(
self: omni.physx.bindings._physx.PhysXUnitTests,
collider_path: str,
) list#

Returns material paths for materials found on given collider path.

Parameters:

collider. (collider_path - USD path to a)

Returns:

Return a list of material paths

get_physics_stats(
self: omni.physx.bindings._physx.PhysXUnitTests,
) dict#

Returns simulation statistics after a simulation step.

Returns:

Return a dictionary with statistics:

'numDynamicRigids': int - Number of dynamic rigids in simulation.
'numStaticRigids': int - Number of static rigids in simulation.
'numKinematicBodies': int - Number of kinematic rigids in simulation.
'numArticulations': int - Number of articulations in simulation.
'numSphereShapes': int - Number of sphere shapes in simulation.
'numBoxShapes': int - Number of box shapes in simulation.
'numCapsuleShapes': int - Number of capsule shapes in simulation.
'numCylinderShapes': int - Number of cylinder shapes in simulation.
'numConvexShapes': int - Number of convex shapes in simulation.
'numTriMeshShapes': int - Number of triangle mesh shapes in simulation.
'numPlaneShapes': int - Number of plane shapes in simulation.
'numConeShapes': int - Number of cone shapes in simulation.

is_cuda_lib_present(
self: omni.physx.bindings._physx.PhysXUnitTests,
) bool#
start_logger_check(
self: omni.physx.bindings._physx.PhysXUnitTests,
arg0: str,
arg1: bool,
arg2: bool,
) None#
start_logger_check_for_multiple(
self: omni.physx.bindings._physx.PhysXUnitTests,
arg0: List[str],
arg1: bool,
arg2: bool,
arg3: bool,
) None#
update(
self: omni.physx.bindings._physx.PhysXUnitTests,
elapsedStep: float,
currentTime: float,
) None#

Update physics simulation by one step.

Parameters:
  • elapsedStep – Simulation step time (seconds), time elapsed between last step and this step.

  • currentTime – Current time (seconds), might be used for time sampled transformations to apply.

class omni.physx.bindings._physx.PhysXVisualization#

This interface is the access point to PhysX SDK debug visualization.

enable_visualization(
self: omni.physx.bindings._physx.PhysXVisualization,
enable: bool,
) None#

Enable/disable PhysX debug visualization.

Parameters:

disable. (enable - Bool if enable or)

get_nb_lines(
self: omni.physx.bindings._physx.PhysXVisualization,
) int#

Get number of PhysX debug visualization lines. This serves mostly as a test function.

set_visualization_parameter(
self: omni.physx.bindings._physx.PhysXVisualization,
debug_vis: str,
enable: bool,
) None#

Toggle individual debug visualization features.

Parameters:
  • identifier (debug_vis - Debug visualization feature string) – {‘WorldAxes’, ‘BodyAxes’, ‘BodyMassAxes’, ‘BodyLinearVel’, ‘BodyAngularVel’, ‘ContactPoint’, ‘ContactNormal’, ‘ContactError’, ‘ContactImpulse’, ‘FrictionPoint’, ‘FrictionNormal’, ‘FrictionImpulse’, ‘ActorAxes’, ‘CollisionAABBs’, ‘CollisionShapes’, ‘CollisionAxes’, ‘CollisionCompounds’, ‘CollisionEdges’, ‘CollisionStaticPruner’, ‘CollisionDynamicPruner’, ‘JointLocalFrames’, ‘JointLimits’, ‘CullBox’, ‘MBPRegions’}

  • following (can be one of the) – {‘WorldAxes’, ‘BodyAxes’, ‘BodyMassAxes’, ‘BodyLinearVel’, ‘BodyAngularVel’, ‘ContactPoint’, ‘ContactNormal’, ‘ContactError’, ‘ContactImpulse’, ‘FrictionPoint’, ‘FrictionNormal’, ‘FrictionImpulse’, ‘ActorAxes’, ‘CollisionAABBs’, ‘CollisionShapes’, ‘CollisionAxes’, ‘CollisionCompounds’, ‘CollisionEdges’, ‘CollisionStaticPruner’, ‘CollisionDynamicPruner’, ‘JointLocalFrames’, ‘JointLimits’, ‘CullBox’, ‘MBPRegions’}

  • feature. (enable - Bool to enable/disable the)

set_visualization_scale(
self: omni.physx.bindings._physx.PhysXVisualization,
scale: float,
) None#

Set PhysX debug visualization scale.

Parameters:

visualization. (scale - Float value for scaling debug)

class omni.physx.bindings._physx.PhysicsInteractionEvent#

Physics interaction event

Members:

MOUSE_DRAG_BEGAN : Signals that a mouse drag has begun.

MOUSE_DRAG_CHANGED : Signals that the mouse is being dragged.

MOUSE_DRAG_ENDED : Signals that the mouse drag is being released.

MOUSE_LEFT_CLICK : Signals that the mouse left button is clicked.

MOUSE_LEFT_DOUBLE_CLICK : Signals that the mouse left button is being double-clicked.

MOUSE_DRAG_BEGAN = <PhysicsInteractionEvent.MOUSE_DRAG_BEGAN: 0>#
MOUSE_DRAG_CHANGED = <PhysicsInteractionEvent.MOUSE_DRAG_CHANGED: 1>#
MOUSE_DRAG_ENDED = <PhysicsInteractionEvent.MOUSE_DRAG_ENDED: 2>#
MOUSE_LEFT_CLICK = <PhysicsInteractionEvent.MOUSE_LEFT_CLICK: 3>#
MOUSE_LEFT_DOUBLE_CLICK = <PhysicsInteractionEvent.MOUSE_LEFT_DOUBLE_CLICK: 4>#
property name#
property value#
class omni.physx.bindings._physx.PhysicsProfileStats#

Physics profile data.

property ms#

Time in miliseconds

property zone_name#

Profile zone name

class omni.physx.bindings._physx.PhysicsProfileStatsVector#
append(
self: List[omni.physx.bindings._physx.PhysicsProfileStats],
x: omni.physx.bindings._physx.PhysicsProfileStats,
) None#

Add an item to the end of the list

clear(
self: List[omni.physx.bindings._physx.PhysicsProfileStats],
) None#

Clear the contents

extend(*args, **kwargs)#

Overloaded function.

  1. extend(self: List[omni.physx.bindings._physx.PhysicsProfileStats], L: List[omni.physx.bindings._physx.PhysicsProfileStats]) -> None

Extend the list by appending all the items in the given list

  1. extend(self: List[omni.physx.bindings._physx.PhysicsProfileStats], L: Iterable) -> None

Extend the list by appending all the items in the given list

insert(
self: List[omni.physx.bindings._physx.PhysicsProfileStats],
i: int,
x: omni.physx.bindings._physx.PhysicsProfileStats,
) None#

Insert an item at a given position.

pop(*args, **kwargs)#

Overloaded function.

  1. pop(self: List[omni.physx.bindings._physx.PhysicsProfileStats]) -> omni.physx.bindings._physx.PhysicsProfileStats

Remove and return the last item

  1. pop(self: List[omni.physx.bindings._physx.PhysicsProfileStats], i: int) -> omni.physx.bindings._physx.PhysicsProfileStats

Remove and return the item at index i

class omni.physx.bindings._physx.PhysicsSceneStats#

Physics scene statistics.

property compressed_contact_size#

The size (in bytes) of the compressed contact stream in the current simulation step.

property gpu_mem_collision_stack_size#

gpuCollisionStackSize

Type:

Actual GPU device memory (bytes) needed for the collision stack of Gpu Collision Stack Size set with physxScene

property gpu_mem_deformable_surface_contacts#

gpuMaxDeformableSurfaceContacts

Type:

Actual number of deformable surface contacts needed of Gpu Max Deformable Surface Contacts set with physxScene

property gpu_mem_fem_cloths#

GPU device memory in bytes allocated for FEM-based cloth state accessible through API.

property gpu_mem_found_lost_aggregate_pairs#

gpuFoundLostAggregatePairsCapacity

Type:

Actual number of found/lost aggregate pairs needed of Gpu Found Lost Aggregate Pairs Capacity set with physxScene

property gpu_mem_found_lost_pairs#

gpuFoundLostPairsCapacity

Type:

Actual number of found/lost pairs needed of Gpu Found Lost Pairs Capacity set with physxScene

property gpu_mem_heap#

gpuHeapCapacity.

Type:

GPU device memory in bytes allocated for internal heap allocation based on initial Gpu Heap Capacity set with physxScene

property gpu_mem_heap_articulation#

GPU device heap memory used for articulations in bytes.

property gpu_mem_heap_broadphase#

GPU device heap memory used for broad phase in bytes.

property gpu_mem_heap_fem_cloths#

GPU device heap memory used for shared buffers in the FEM-based cloth pipeline in bytes.

property gpu_mem_heap_narrowphase#

GPU device heap memory used for narrow phase in bytes.

property gpu_mem_heap_other#

GPU device heap memory not covered by other stats in bytes.

property gpu_mem_heap_particles#

GPU device heap memory used for shared buffers in the particles pipeline in bytes.

property gpu_mem_heap_simulation#

GPU device heap memory used for simulation pipeline in bytes.

property gpu_mem_heap_simulation_articulation#

GPU device heap memory used for articulations in the simulation pipeline in bytes.

property gpu_mem_heap_simulation_fem_cloths#

GPU device heap memory used for FEM-cloth in the simulation pipeline in bytes.

property gpu_mem_heap_simulation_particles#

GPU device heap memory used for particles in the simulation pipeline in bytes.

property gpu_mem_heap_simulation_softbody#

GPU device heap memory used for soft bodies in the simulation pipeline in bytes.

property gpu_mem_heap_softbodies#

GPU device heap memory used for shared buffers in the FEM-based soft body pipeline in bytes.

property gpu_mem_heap_solver#

GPU device heap memory used for solver in bytes.

property gpu_mem_particle_contacts#

gpuMaxParticleContacts

Type:

Actual number of particle contacts needed of Gpu Max Particle Contact Count set with physxScene

property gpu_mem_particles#

GPU device memory in bytes allocated for particle state accessible through API.

property gpu_mem_rigid_contact_count#

gpuMaxRigidContactCount

Type:

Actual number of rigid contacts needed of Gpu Max Rigid Contact Count set with physxScene

property gpu_mem_rigid_patch_count#

gpuMaxRigidPatchCount

Type:

Actual number of rigid contact patches needed of Gpu Max Rigid Patch Count set with physxScene

property gpu_mem_softbodies#

GPU device memory in bytes allocated for FEM-based soft body state accessible through API.

property gpu_mem_softbody_contacts#

gpuMaxSoftBodyContacts

Type:

Actual number of soft body contacts needed of Gpu Max Softbody Contacts set with physxScene

property gpu_mem_temp_buffer_capacity#

gpuTempBufferCapacity

Type:

Actual GPU device memory (bytes) used for Temp Buffer based on initial Gpu Temp Buffer Capacity set with physxScene

property gpu_mem_total_aggregate_pairs#

gpuTotalAggregatePairsCapacity

Type:

Actual number of aggregate pairs needed of Gpu Total Aggregate Pairs Capacity set with physxScene

property nb_active_constraints#

The number of active constraints.

property nb_active_dynamic_rigids#

The number of active dynamic rigid bodies.

property nb_active_kinematic_rigids#

The number of active kinematic rigid bodies.

property nb_aggregates#

The number of aggregates.

property nb_articulations#

The number of articulations.

property nb_axis_solver_constaints#

The number of 1D axis constraints(joints+contact) present in the current simulation step.

property nb_box_shapes#

The number of box shapes.

property nb_capsule_shapes#

The number of capsule shapes.

property nb_cone_shapes#

The number of cone shapes.

property nb_convex_shapes#

The number of convex shapes.

property nb_cylinder_shapes#

The number of cylinder shapes.

property nb_discrete_contact_pairs_total#

Total number of (non CCD) pairs reaching narrow phase.

property nb_discrete_contact_pairs_with_cache_hits#

Total number of (non CCD) pairs for which contacts are successfully cached (<=nbDiscreteContactPairsTotal) note This includes pairs for which no contacts are generated, it still counts as a cache hit.

property nb_discrete_contact_pairs_with_contacts#

Total number of (non CCD) pairs for which at least 1 contact was generated (<=nbDiscreteContactPairsTotal).

property nb_dynamic_rigids#

The number of dynamic rigid bodies.

property nb_kinematic_rigids#

The number of kinematic rigid bodies.

property nb_lost_pairs#

Number of lost pairs from BP this frame.

property nb_lost_touches#

Number of lost touches from NP this frame.

property nb_new_pairs#

Number of new pairs found by BP this frame.

property nb_new_touches#

Number of new touches found by NP this frame.

property nb_partitions#

Number of partitions used by the solver this frame.

property nb_plane_shapes#

The number of plane shapes.

property nb_sphere_shapes#

The number of sphere shapes.

property nb_static_rigids#

The number of static rigid bodies.

property nb_trimesh_shapes#

The number of triangle mesh shapes.

property peak_constraint_memory#

The peak amount of memory (in bytes) that was allocated for constraints (this includes joints) in the current simulation step.

property required_contact_constraint_memory#

The total required size (in bytes) of the contact constraints in the current simulation step.

class omni.physx.bindings._physx.PhysxCollisionRepresentationResult#

Collision representation result

Members:

RESULT_VALID

RESULT_ERROR_NOT_READY

RESULT_ERROR_INVALID_PARSING

RESULT_ERROR_COOKING_FAILED

RESULT_ERROR_UNSUPPORTED_APPROXIMATION

RESULT_ERROR_INVALID_RESULT

RESULT_ERROR_COOKING_FAILED = <PhysxCollisionRepresentationResult.RESULT_ERROR_COOKING_FAILED: 3>#
RESULT_ERROR_INVALID_PARSING = <PhysxCollisionRepresentationResult.RESULT_ERROR_INVALID_PARSING: 2>#
RESULT_ERROR_INVALID_RESULT = <PhysxCollisionRepresentationResult.RESULT_ERROR_INVALID_RESULT: 5>#
RESULT_ERROR_NOT_READY = <PhysxCollisionRepresentationResult.RESULT_ERROR_NOT_READY: 1>#
RESULT_ERROR_UNSUPPORTED_APPROXIMATION = <PhysxCollisionRepresentationResult.RESULT_ERROR_UNSUPPORTED_APPROXIMATION: 4>#
RESULT_VALID = <PhysxCollisionRepresentationResult.RESULT_VALID: 0>#
property name#
property value#
class omni.physx.bindings._physx.PhysxCollisionRepresentationTask#

Task returned by request_convex_collision_representation

property task#

Task handle

class omni.physx.bindings._physx.PhysxConvexMeshData#

A convex mesh made of vertices, indices and polygons

property indices#
property polygons#
property vertices#
class omni.physx.bindings._physx.PhysxConvexMeshPolygon#

A polygon of a convex mesh

property index_base#
property num_vertices#
property plane#
class omni.physx.bindings._physx.PhysxPropertyQueryColliderResponse#

Collider query response.

property aabb_local_max#

AABB Max Local Bound

property aabb_local_min#

AABB Min Local Bound

property local_pos#

Local position

property local_rot#

Local rotation

property path_id#

USD Path

property result#

Result

property stage_id#

USD Stage

property volume#

Volume of the collider

class omni.physx.bindings._physx.PhysxPropertyQueryMode#

Query mode.

Members:

QUERY_RIGID_BODY_WITH_COLLIDERS : Query rigid body and its colliders

QUERY_RIGID_BODY_WITH_COLLIDERS = <PhysxPropertyQueryMode.QUERY_RIGID_BODY_WITH_COLLIDERS: 0>#
property name#
property value#
class omni.physx.bindings._physx.PhysxPropertyQueryResult#

Query result enumeration.

Members:

VALID : Result is valid

ERROR_UNKNOWN_QUERY_MODE : The requested query mode is unknown

ERROR_INVALID_USD_PATH : Result invalid because of an invalid USD path

ERROR_INVALID_USD_STAGE : Result invalid because of an invalid or expired USD stage

ERROR_INVALID_USD_PRIM : Result invalid because of an invalid or deleted USD prim

ERROR_PARSING : Result invalid because parsing USD failed

ERROR_TIMEOUT : Result invalid because async operation exceeds timeout

ERROR_RUNTIME : Result invalid because PhysX runtime is in invalid state

ERROR_INVALID_USD_PATH = <PhysxPropertyQueryResult.ERROR_INVALID_USD_PATH: 2>#
ERROR_INVALID_USD_PRIM = <PhysxPropertyQueryResult.ERROR_INVALID_USD_PRIM: 4>#
ERROR_INVALID_USD_STAGE = <PhysxPropertyQueryResult.ERROR_INVALID_USD_STAGE: 3>#
ERROR_PARSING = <PhysxPropertyQueryResult.ERROR_PARSING: 5>#
ERROR_RUNTIME = <PhysxPropertyQueryResult.ERROR_RUNTIME: 7>#
ERROR_TIMEOUT = <PhysxPropertyQueryResult.ERROR_TIMEOUT: 6>#
ERROR_UNKNOWN_QUERY_MODE = <PhysxPropertyQueryResult.ERROR_UNKNOWN_QUERY_MODE: 1>#
VALID = <PhysxPropertyQueryResult.VALID: 0>#
property name#
property value#
class omni.physx.bindings._physx.PhysxPropertyQueryRigidBodyResponse#

Rigid body query response.

property center_of_mass#

Center of Mass

property inertia#

Inertia

property mass#

Mass

property path_id#

USD Path

property principal_axes#

Principal Axes Quaternion

property result#

Result

property stage_id#

USD Stage

property type#

Type

class omni.physx.bindings._physx.PhysxPropertyQueryRigidBodyResponseType#

Query result.

Members:

RIGID_DYNAMIC : Body is a rigid dynamic

RIGID_DYNAMIC = <PhysxPropertyQueryRigidBodyResponseType.RIGID_DYNAMIC: 0>#
property name#
property value#
class omni.physx.bindings._physx.RaycastHit#

Raycast hit results structure.

property collision#

Path string to the collision that was hit.

property collision_encoded#

Encoded SdfPath to the collision that was hit. PhysicsSchemaTools.decodeSdfPath will return SdfPath.

property distance#

Hit location distance.

property face_index#

Hit location face index.

property material#

Path string to the collider material that was hit.

property material_encoded#

Encoded SdfPath to the collider material that was hit. PhysicsSchemaTools.decodeSdfPath will return SdfPath.

property normal#

Hit location normal.

property position#

Hit location position.

property protoIndex#

ProtoIndex, filled for pointInstancers otherwise 0xFFFFFFFF.

property rigid_body#

Path string to the rigid body that was hit.

property rigid_body_encoded#

Encoded SdfPath to the rigid body that was hit. PhysicsSchemaTools.decodeSdfPath will return SdfPath.

class omni.physx.bindings._physx.SceneQueryHitLocation#

Scene query hit location results structure.

property collision#

Path string to the collision that was hit.

property collision_encoded#

Encoded SdfPath to the collision that was hit. PhysicsSchemaTools.decodeSdfPath will return SdfPath.

property distance#

Hit location distance.

property face_index#

Hit location face index.

property material#

Path string to the collider material that was hit.

property material_encoded#

Encoded SdfPath to the collider material that was hit. PhysicsSchemaTools.decodeSdfPath will return SdfPath.

property normal#

Hit location normal.

property position#

Hit location position.

property protoIndex#

ProtoIndex, filled for pointInstancers otherwise 0xFFFFFFFF.

property rigid_body#

Path string to the rigid body that was hit.

property rigid_body_encoded#

Encoded SdfPath to the rigid body that was hit. PhysicsSchemaTools.decodeSdfPath will return SdfPath.

class omni.physx.bindings._physx.SceneQueryHitObject#

Scene query hit results structure.

property collision#

Path string to the collision that was hit.

property collision_encoded#

Encoded SdfPath to the collision that was hit. PhysicsSchemaTools.decodeSdfPath will return SdfPath.

property protoIndex#

ProtoIndex, filled for pointInstancers otherwise 0xFFFFFFFF.

property rigid_body#

Path string to the rigid body that was hit.

property rigid_body_encoded#

Encoded SdfPath to the rigid body that was hit. PhysicsSchemaTools.decodeSdfPath will return SdfPath.

class omni.physx.bindings._physx.SimulationEvent#

Simulation events used by simulation event stream.

Members:

RESUMED : Simulation resumed, no additional data are send in the event

PAUSED : Simulation paused, no additional data are send in the event

STOPPED : Simulation stopped, no additional data are send in the event

CONTACT_FOUND : Contact found event header: sends header information regarding which colliders started to collide; contains the following in a dictionary:

'actor0':int2 - Usd path to rigid body actor 0 decoded into two ints. PhysicsSchemaTools.decodeSdfPath will return SdfPath.
'actor1':int2 - Usd path to rigid body actor 1 decoded into two ints. PhysicsSchemaTools.decodeSdfPath will return SdfPath.
'collider0':int2 - Usd path to collider 0 decoded into two ints. PhysicsSchemaTools.decodeSdfPath will return SdfPath.
'collider1':int2 - Usd path to collider 1 decoded into two ints. PhysicsSchemaTools.decodeSdfPath will return SdfPath.
'numContactData':int - Num contact data sent after the header is sent.
'stageId':long1 - Current USD stage id, long array with one item.

CONTACT_LOST : Contact lost event header: sends header information regarding which colliders lost contact; contains the following in a dictionary:

'actor0':int2 - Usd path to rigid body actor 0 decoded into two ints. PhysicsSchemaTools.decodeSdfPath will return SdfPath.
'actor1':int2 - Usd path to rigid body actor 1 decoded into two ints. PhysicsSchemaTools.decodeSdfPath will return SdfPath.
'collider0':int2 - Usd path to collider 0 decoded into two ints. PhysicsSchemaTools.decodeSdfPath will return SdfPath.
'collider1':int2 - Usd path to collider 1 decoded into two ints. PhysicsSchemaTools.decodeSdfPath will return SdfPath.
'numContactData':int - Num contact data sent after the header is sent.
'stageId':long1 - Current USD stage id, long array with one item.

CONTACT_PERSISTS : Contact persists event header: sends header information regarding which colliders are still in contact; contains the following in a dictionary:

'actor0':int2 - Usd path to rigid body actor 0 decoded into two ints. PhysicsSchemaTools.decodeSdfPath will return SdfPath.
'actor1':int2 - Usd path to rigid body actor 1 decoded into two ints. PhysicsSchemaTools.decodeSdfPath will return SdfPath.
'collider0':int2 - Usd path to collider 0 decoded into two ints. PhysicsSchemaTools.decodeSdfPath will return SdfPath.
'collider1':int2 - Usd path to collider 1 decoded into two ints. PhysicsSchemaTools.decodeSdfPath will return SdfPath.
'numContactData':int - Num contact data sent after the header is sent.
'stageId':long1 - Current USD stage id, long array with one item.

CONTACT_DATA : Contact data sent after each header contact information is sent; contains the following in a dictionary:

'position':float3 - Contact position
'normal':float3 - Contact normal
'impulse':float3 - Contact impulse
'separation':float - Separation value for collisions.
'faceIndex0':int - USD face index 0.
'faceIndex1':int - USD face index 0.
'material0':int2 - Usd path to material 0 decoded into two ints. PhysicsSchemaTools.decodeSdfPath will return SdfPath.
'material1':int2 - Usd path to material 0 decoded into two ints. PhysicsSchemaTools.decodeSdfPath will return SdfPath.

JOINT_BREAK : Joint break event; contains the following in a dictionary:

'jointPath':int2 - Usd path to joint that did break decoded into two ints. PhysicsSchemaTools.decodeSdfPath will return SdfPath.

POINT_GRABBED : Point grabbed; contains the following in a dictionary:

'grabbed_position':float3 - Current world position of grabbed point.
'grab_force_position':float3 - Current world position of the position being grabbed towards.

POINT_RELEASED : Point released.

POINT_PUSHED : Point pushed; contains the following in a dictionary:

'pushed_position':float3 - World position of point pushed.

ATTACHED_TO_STAGE : When physx stage attachment (initialization) finished.

DETACHED_FROM_STAGE : When physx stage detachment (deinitialization) finished.

ATTACHED_TO_STAGE = <SimulationEvent.ATTACHED_TO_STAGE: 10>#
CONTACT_DATA = <SimulationEvent.CONTACT_DATA: 6>#
CONTACT_FOUND = <SimulationEvent.CONTACT_FOUND: 3>#
CONTACT_LOST = <SimulationEvent.CONTACT_LOST: 4>#
CONTACT_PERSISTS = <SimulationEvent.CONTACT_PERSISTS: 5>#
DETACHED_FROM_STAGE = <SimulationEvent.DETACHED_FROM_STAGE: 11>#
JOINT_BREAK = <SimulationEvent.JOINT_BREAK: 7>#
PAUSED = <SimulationEvent.PAUSED: 1>#
POINT_GRABBED = <SimulationEvent.POINT_GRABBED: 8>#
POINT_PUSHED = <SimulationEvent.POINT_PUSHED: 12>#
POINT_RELEASED = <SimulationEvent.POINT_RELEASED: 9>#
RESUMED = <SimulationEvent.RESUMED: 0>#
STOPPED = <SimulationEvent.STOPPED: 2>#
property name#
property value#
class omni.physx.bindings._physx.SweepHit#

Sweep hit results structure.

property collision#

Path string to the collision that was hit.

property collision_encoded#

Encoded SdfPath to the collision that was hit. PhysicsSchemaTools.decodeSdfPath will return SdfPath.

property distance#

Hit location distance.

property face_index#

Hit location face index.

property material#

Path string to the collider material that was hit.

property material_encoded#

Encoded SdfPath to the collider material that was hit. PhysicsSchemaTools.decodeSdfPath will return SdfPath.

property normal#

Hit location normal.

property position#

Hit location position.

property protoIndex#

ProtoIndex, filled for pointInstancers otherwise 0xFFFFFFFF.

property rigid_body#

Path string to the rigid body that was hit.

property rigid_body_encoded#

Encoded SdfPath to the rigid body that was hit. PhysicsSchemaTools.decodeSdfPath will return SdfPath.

class omni.physx.bindings._physx.TriggerEventData#

Parameters for trigger event callback.

property event_type#

Event Type (enter or leave)

property other_body_prim_id#

USD Path of the body containgint the other collider prim entering trigger

property other_collider_prim_id#

USD Path of other prim entering trigger

property stage_id#

USD Stage

property subscription_id#

Id of the subscription returned by subscribe_physics_trigger_report_events

property trigger_body_prim_id#

USD Path of the body containg the collider prim representing the trigger

property trigger_collider_prim_id#

USD Path of prim representing the trigger

class omni.physx.bindings._physx.TriggerEventType#

Trigger Event type.

Members:

TRIGGER_ON_ENTER : The collider has entered trigger volume

TRIGGER_ON_LEAVE : The collider has left trigger volume

TRIGGER_ON_ENTER = <TriggerEventType.TRIGGER_ON_ENTER: 0>#
TRIGGER_ON_LEAVE = <TriggerEventType.TRIGGER_ON_LEAVE: 1>#
property name#
property value#
class omni.physx.bindings._physx.VisualizerMode#

Visualization mode for collider, particles, deformables, etc. object types.

ALL = 2#
NONE = 0#
SELECTED = 1#
omni.physx.bindings._physx.acquire_physx_attachment_interface(
plugin_name: str = None,
library_path: str = None,
) omni.physx.bindings._physx.IPhysxAttachment#
omni.physx.bindings._physx.acquire_physx_benchmarks_interface(
plugin_name: str = None,
library_path: str = None,
) omni.physx.bindings._physx.IPhysxBenchmarks#
omni.physx.bindings._physx.acquire_physx_cooking_interface(
plugin_name: str = None,
library_path: str = None,
) omni.physx.bindings._physx.PhysXCooking#
omni.physx.bindings._physx.acquire_physx_interface(
plugin_name: str = None,
library_path: str = None,
) omni.physx.bindings._physx.PhysX#
omni.physx.bindings._physx.acquire_physx_property_query_interface(
plugin_name: str = None,
library_path: str = None,
) omni.physx.bindings._physx.IPhysxPropertyQuery#
omni.physx.bindings._physx.acquire_physx_replicator_interface(
plugin_name: str = None,
library_path: str = None,
) omni.physx.bindings._physx.IPhysxReplicator#
omni.physx.bindings._physx.acquire_physx_scene_query_interface(
plugin_name: str = None,
library_path: str = None,
) omni.physx.bindings._physx.PhysXSceneQuery#
omni.physx.bindings._physx.acquire_physx_simulation_interface(
plugin_name: str = None,
library_path: str = None,
) omni.physx.bindings._physx.IPhysxSimulation#
omni.physx.bindings._physx.acquire_physx_stage_update_interface(
plugin_name: str = None,
library_path: str = None,
) omni.physx.bindings._physx.IPhysxStageUpdate#
omni.physx.bindings._physx.acquire_physx_statistics_interface(
plugin_name: str = None,
library_path: str = None,
) omni.physx.bindings._physx.IPhysxStatistics#
omni.physx.bindings._physx.acquire_physx_visualization_interface(
plugin_name: str = None,
library_path: str = None,
) omni.physx.bindings._physx.PhysXVisualization#
omni.physx.bindings._physx.acquire_physxunittests_interface(
plugin_name: str = None,
library_path: str = None,
) omni.physx.bindings._physx.PhysXUnitTests#
omni.physx.bindings._physx.ancestorHasAPI(arg0: TfType, arg1: UsdPrim) bool#
omni.physx.bindings._physx.descendantHasAPI(arg0: TfType, arg1: UsdPrim) bool#
omni.physx.bindings._physx.hasconflictingapis_ArticulationRoot(arg0: UsdPrim, arg1: bool) bool#
omni.physx.bindings._physx.hasconflictingapis_CollisionAPI(arg0: UsdPrim, arg1: bool) bool#
omni.physx.bindings._physx.hasconflictingapis_PhysxDeformableBodyAPI(
arg0: UsdPrim,
arg1: bool,
) bool#
omni.physx.bindings._physx.hasconflictingapis_PhysxDeformableSurfaceAPI(
arg0: UsdPrim,
arg1: bool,
) bool#
omni.physx.bindings._physx.hasconflictingapis_PhysxParticleClothAPI(
arg0: UsdPrim,
arg1: bool,
) bool#
omni.physx.bindings._physx.hasconflictingapis_PhysxParticleSamplingAPI(
arg0: UsdPrim,
arg1: bool,
) bool#
omni.physx.bindings._physx.hasconflictingapis_Precompute(
arg0: UsdPrim,
) Annotated[List[bool], FixedSize(3)]#
omni.physx.bindings._physx.hasconflictingapis_RigidBodyAPI(arg0: UsdPrim, arg1: bool) bool#
omni.physx.bindings._physx.isOverConflictingApisSubtreeLimit(arg0: UsdPrim, arg1: int) bool#
omni.physx.bindings._physx.release_physx_attachment_interface(
arg0: omni.physx.bindings._physx.IPhysxAttachment,
) None#
omni.physx.bindings._physx.release_physx_benchmarks_interface(
arg0: omni.physx.bindings._physx.IPhysxBenchmarks,
) None#
omni.physx.bindings._physx.release_physx_cooking_interface(
arg0: omni.physx.bindings._physx.PhysXCooking,
) None#
omni.physx.bindings._physx.release_physx_interface(
arg0: omni.physx.bindings._physx.PhysX,
) None#
omni.physx.bindings._physx.release_physx_interface_scripting(
arg0: omni.physx.bindings._physx.PhysX,
) None#
omni.physx.bindings._physx.release_physx_property_query_interface(
arg0: omni.physx.bindings._physx.IPhysxPropertyQuery,
) None#
omni.physx.bindings._physx.release_physx_replicator_interface(
arg0: omni.physx.bindings._physx.IPhysxReplicator,
) None#
omni.physx.bindings._physx.release_physx_replicator_interface_scripting(
arg0: omni.physx.bindings._physx.IPhysxReplicator,
) None#
omni.physx.bindings._physx.release_physx_scene_query_interface(
arg0: omni.physx.bindings._physx.PhysXSceneQuery,
) None#
omni.physx.bindings._physx.release_physx_simulation_interface(
arg0: omni.physx.bindings._physx.IPhysxSimulation,
) None#
omni.physx.bindings._physx.release_physx_stage_update_interface(
arg0: omni.physx.bindings._physx.IPhysxStageUpdate,
) None#
omni.physx.bindings._physx.release_physx_stage_update_interface_scripting(
arg0: omni.physx.bindings._physx.IPhysxStageUpdate,
) None#
omni.physx.bindings._physx.release_physx_statistics_interface(
arg0: omni.physx.bindings._physx.IPhysxStatistics,
) None#
omni.physx.bindings._physx.release_physx_statistics_interface_scripting(
arg0: omni.physx.bindings._physx.IPhysxStatistics,
) None#
omni.physx.bindings._physx.release_physx_visualization_interface(
arg0: omni.physx.bindings._physx.PhysXVisualization,
) None#
omni.physx.bindings._physx.release_physxunittests_interface(
arg0: omni.physx.bindings._physx.PhysXUnitTests,
) None#
omni.physx.scripts.utils.get_spatial_tendon_attachment_candidates(
prim: Prim,
) List[str]#

Returns a list of PhysxTendonAttachment(Root)API instance names on the provided prim that are candidates for creating a parent relationship to. Notably, this list will exclude leaf attachments that are not suitable targets for a parent relationship.

Parameters:

prim – the Usd.Prim to parse for suitable attachment candidates

Returns:

A str list of attachment instance names

omni.physx.scripts.utils.safe_import_tests(source_module_name, submodules_list=None)#

Tries to import tests if the tests ext is present. The tests ext is expected to be loaded as follows:

1) use when the tests need to be visible in the test runner UI and the tests ext needs to be explicitly loaded by another ext or is included in the kit file

[dependencies] “omni.physx.tests” = {optional=true}

2) this will include the dependency only when running tests in the separate kit process, like when run using the generated batch files and the tests would then likely not be visible in the test runner UI

[[test]] dependencies = [“omni.physx.tests”]

omni.physx.scripts.physicsUtils.add_box(
stage: Stage,
path: str | Path,
size: Vec3f = Gf.Vec3f(1.0, 1.0, 1.0),
position: Vec3f = Gf.Vec3f(0.0, 0.0, 0.0),
orientation: Quatf = Gf.Quatf(1.0, Gf.Vec3f(0.0, 0.0, 0.0)),
color: Vec3f = Gf.Vec3f(1.0, 1.0, 1.0),
) Prim#

Add UsdGeom.Cube to the stage.

Parameters:
  • stage – The Usd.Stage to add cube.

  • path – The desired cube path.

  • size – The size of the cube.

  • position – The position where the cube should be placed in stage.

  • orientation – The cube orientation.

  • color – The color of the mesh.

omni.physx.scripts.physicsUtils.add_capsule(
stage: Stage,
path: str | Path,
radius: float = 1.0,
height: float = 1.0,
axis: str = 'Y',
position: Vec3f = Gf.Vec3f(0.0, 0.0, 0.0),
orientation: Quatf = Gf.Quatf(1.0, Gf.Vec3f(0.0, 0.0, 0.0)),
color: Vec3f = Gf.Vec3f(1.0, 1.0, 1.0),
) Prim#

Add UsdGeom.Capsule to the stage.

Parameters:
  • stage – The Usd.Stage to add capsule.

  • path – The desired capsule path.

  • radius – The radius of the capsule.

  • height – The height of the capsule.

  • axis – The axis of the capsule.

  • position – The position where the capsule should be placed in stage.

  • orientation – The capsule orientation.

  • color – The color of the mesh.

omni.physx.scripts.physicsUtils.add_collision_to_collision_group(
stage: Stage,
collisionPath: str | Path,
collisionGroupPath: str | Path,
)#

Add collision path to a collision group include rel.

Parameters:
  • stage – The Usd.Stage to add path.

  • collisionPath – Collision path to add.

  • collisionGroupPath – Collision group prim path.

omni.physx.scripts.physicsUtils.add_cone(
stage: Stage,
path: str | Path,
radius: float = 1.0,
height: float = 1.0,
axis: str = 'Y',
position: Vec3f = Gf.Vec3f(0.0, 0.0, 0.0),
orientation: Quatf = Gf.Quatf(1.0, Gf.Vec3f(0.0, 0.0, 0.0)),
color: Vec3f = Gf.Vec3f(1.0, 1.0, 1.0),
) Prim#

Add UsdGeom.Cone to the stage.

Parameters:
  • stage – The Usd.Stage to add cone.

  • path – The desired cone path.

  • radius – The radius of the cone.

  • height – The height of the cone.

  • axis – The axis of the cone.

  • position – The position where the cone should be placed in stage.

  • orientation – The cone orientation.

  • color – The color of the mesh.

omni.physx.scripts.physicsUtils.add_cube(
stage: Stage,
path: str | Path,
size: Vec3f = Gf.Vec3f(1.0, 1.0, 1.0),
position: Vec3f = Gf.Vec3f(0.0, 0.0, 0.0),
orientation: Quatf = Gf.Quatf(1.0, Gf.Vec3f(0.0, 0.0, 0.0)),
color: Vec3f = Gf.Vec3f(1.0, 1.0, 1.0),
) Prim#

Add UsdGeom.Cube to the stage.

Parameters:
  • stage – The Usd.Stage to add cube.

  • path – The desired cube path.

  • size – The size of the cube.

  • position – The position where the cube should be placed in stage.

  • orientation – The cube orientation.

  • color – The color of the mesh.

omni.physx.scripts.physicsUtils.add_cube_ground_plane(
stage: Stage,
cubePath: str | Path,
axis: str,
size: float,
position: Vec3f | Vec3d,
color: Vec3f,
)#

Add UsdGeom.Cube to the stage to act as a sized plane with thickness. The cube is scaled by a vector Gf.Vec3f(0.01, 1.0, 1.0) depending on the up Axis

Parameters:
  • stage – The Usd.Stage to add path.

  • cubePath – The desired ground plane path.

  • axis – The up axis - “Y”, “Z”

  • size – The half size of the mesh.

  • position – The position where the mesh should be placed in stage.

  • color – The color of the mesh.

omni.physx.scripts.physicsUtils.add_cylinder(
stage: Stage,
path: str | Path,
radius: float = 1.0,
height: float = 1.0,
axis: str = 'Y',
position: Vec3f = Gf.Vec3f(0.0, 0.0, 0.0),
orientation: Quatf = Gf.Quatf(1.0, Gf.Vec3f(0.0, 0.0, 0.0)),
color: Vec3f = Gf.Vec3f(1.0, 1.0, 1.0),
) Prim#

Add UsdGeom.Cylinder to the stage.

Parameters:
  • stage – The Usd.Stage to add cylinder.

  • path – The desired cylinder path.

  • radius – The radius of the cylinder.

  • height – The height of the cylinder.

  • axis – The axis of the cylinder.

  • position – The position where the cylinder should be placed in stage.

  • orientation – The cylinder orientation.

  • color – The color of the mesh.

omni.physx.scripts.physicsUtils.add_density(
stage: Stage,
path: str | Path,
value: float,
) MassAPI#

Add density to given prim. Note that his will apply MassAPI on the prim.

Parameters:
  • stage – The Usd.Stage to add path.

  • path – The desired path to create.

  • value – The desired density.

omni.physx.scripts.physicsUtils.add_force_torque(
stage: Stage,
path: str | Path,
force: Vec3f = Gf.Vec3f(0.0, 0.0, 0.0),
torque: Vec3f = Gf.Vec3f(0.0, 0.0, 0.0),
mode: str = 'acceleration',
isEnabled: bool = True,
isWorldSpace: bool = False,
) PhysxForceAPI#

Add force/torque to given prim. Note that his will apply PhysxForceAPI on the prim.

Parameters:
  • stage – The Usd.Stage to add path.

  • path – The desired path to create.

  • force – The desired force.

  • torque – The desired torque.

  • mode – The force/torque mode.

  • isEnabled – Bool defining whether force is enabled or not.

  • isWorldSpace – Bool defining whether force is applied in world space or body local space.

omni.physx.scripts.physicsUtils.add_ground_plane(
stage: Stage,
planePath: str | Path,
axis: str,
size: float,
position: Vec3f | Vec3d,
color: Vec3f,
) str#

Add ground plane to the stage. Note that it will add a mesh for rendering purpose and UsdPhysics.Plane for collision purpose.

Parameters:
  • stage – The Usd.Stage to add path.

  • planePath – The desired ground plane path.

  • axis – The up axis - “Y”, “Z”

  • size – The half size of the mesh.

  • position – The position where the mesh should be placed in stage.

  • color – The color of the mesh.

omni.physx.scripts.physicsUtils.add_joint_fixed(
stage: Stage,
jointPath: str | Path,
actor0: str | Path,
actor1: str | Path,
localPos0: Vec3f,
localRot0: Quatf,
localPos1: Vec3f,
localRot1: Quatf,
breakForce: float,
breakTorque: float,
) FixedJoint#

Add fixed joint to the stage.

Parameters:
  • stage – The Usd.Stage to add the joint.

  • jointPath – The desired joint path.

  • actor0 – The actor0 for the joint.

  • actor1 – The actor1 for the joint.

  • localPos0 – The joint local position offset from the actor0

  • localRot0 – The joint local rotation offset from the actor0

  • localPos1 – The joint local position offset from the actor1

  • localRot1 – The joint local rotation offset from the actor1

  • breakForce – The joint break force.

  • breakTorque – The joint break torque.

omni.physx.scripts.physicsUtils.add_mass(
stage: Stage,
path: str | Path,
mass: float = 1.0,
) MassAPI#

Add mass to given prim. Note that his will apply MassAPI on the prim.

Parameters:
  • stage – The Usd.Stage to add path.

  • path – The desired path to create.

  • value – The desired mass.

omni.physx.scripts.physicsUtils.add_physics_material_to_prim(
stage: Stage,
prim: Prim,
materialPath: str | Path,
)#

Bind physics material to a given prim.

Parameters:
  • stage – The Usd.Stage to add path.

  • prim – The Usd.Prim where material should have the binding to.

  • materialPath – The path of the material.

omni.physx.scripts.physicsUtils.add_quad_plane(
stage: Stage,
quadPath: str | Path,
axis: str,
size: float,
position: Vec3f | Vec3d,
color: Vec3f,
)#

Add quad mesh to the stage to act as a sized plane.

Parameters:
  • stage – The Usd.Stage to add path.

  • quadPath – The desired ground plane path.

  • axis – The up axis - “Y”, “Z”

  • size – The half size of the mesh.

  • position – The position where the mesh should be placed in stage.

  • color – The color of the mesh.

omni.physx.scripts.physicsUtils.add_rigid_box(
stage: Stage,
path: str | Path,
size: Vec3f = Gf.Vec3f(1.0, 1.0, 1.0),
position: Vec3f = Gf.Vec3f(0.0, 0.0, 0.0),
orientation: Quatf = Gf.Quatf(1.0, Gf.Vec3f(0.0, 0.0, 0.0)),
color: Vec3f = Gf.Vec3f(1.0, 1.0, 1.0),
density: float = 1.0,
lin_velocity: Vec3f = Gf.Vec3f(0.0, 0.0, 0.0),
ang_velocity: Vec3f = Gf.Vec3f(0.0, 0.0, 0.0),
) Prim#

Add UsdGeom.Cube to the stage and add physics rigid body and collider API to it.

Parameters:
  • stage – The Usd.Stage to add cube.

  • path – The desired cube path.

  • size – The size of the cube.

  • position – The position where the cube should be placed in stage.

  • orientation – The cube orientation.

  • color – The color of the mesh.

  • lin_velocity – The initial linear velocity of the rigid body.

  • ang_velocity – The initial angular velocity of the rigid body.

omni.physx.scripts.physicsUtils.add_rigid_capsule(
stage: Stage,
path: str | Path,
radius: float = 1.0,
height: float = 1.0,
axis: str = 'Y',
position: Vec3f = Gf.Vec3f(0.0, 0.0, 0.0),
orientation: Quatf = Gf.Quatf(1.0, Gf.Vec3f(0.0, 0.0, 0.0)),
color: Vec3f = Gf.Vec3f(1.0, 1.0, 1.0),
density: float = 1.0,
lin_velocity: Vec3f = Gf.Vec3f(0.0, 0.0, 0.0),
ang_velocity: Vec3f = Gf.Vec3f(0.0, 0.0, 0.0),
) Prim#

Add UsdGeom.Capsule to the stage and add physics rigid body and collider API to it.

Parameters:
  • stage – The Usd.Stage to add capsule.

  • path – The desired capsule path.

  • radius – The radius of the capsule.

  • height – The height of the capsule.

  • axis – The axis of the capsule.

  • position – The position where the capsule should be placed in stage.

  • orientation – The capsule orientation.

  • color – The color of the mesh.

  • lin_velocity – The initial linear velocity of the rigid body.

  • ang_velocity – The initial angular velocity of the rigid body.

omni.physx.scripts.physicsUtils.add_rigid_cone(
stage: Stage,
path: str | Path,
radius: float = 1.0,
height: float = 1.0,
axis: str = 'Y',
position: Vec3f = Gf.Vec3f(0.0, 0.0, 0.0),
orientation: Quatf = Gf.Quatf(1.0, Gf.Vec3f(0.0, 0.0, 0.0)),
color: Vec3f = Gf.Vec3f(1.0, 1.0, 1.0),
density: float = 1.0,
lin_velocity: Vec3f = Gf.Vec3f(0.0, 0.0, 0.0),
ang_velocity: Vec3f = Gf.Vec3f(0.0, 0.0, 0.0),
) Prim#

Add UsdGeom.Cone to the stage and add physics rigid body and collider API to it.

Parameters:
  • stage – The Usd.Stage to add cone.

  • path – The desired cone path.

  • radius – The radius of the cone.

  • height – The height of the cone.

  • axis – The axis of the cone.

  • position – The position where the cone should be placed in stage.

  • orientation – The cone orientation.

  • color – The color of the mesh.

  • lin_velocity – The initial linear velocity of the rigid body.

  • ang_velocity – The initial angular velocity of the rigid body.

omni.physx.scripts.physicsUtils.add_rigid_cube(
stage: Stage,
path: str | Path,
size: Vec3f = Gf.Vec3f(1.0, 1.0, 1.0),
position: Vec3f = Gf.Vec3f(0.0, 0.0, 0.0),
orientation: Quatf = Gf.Quatf(1.0, Gf.Vec3f(0.0, 0.0, 0.0)),
color: Vec3f = Gf.Vec3f(1.0, 1.0, 1.0),
density: float = 1.0,
lin_velocity: Vec3f = Gf.Vec3f(0.0, 0.0, 0.0),
ang_velocity: Vec3f = Gf.Vec3f(0.0, 0.0, 0.0),
) Prim#

Add UsdGeom.Cube to the stage and add physics rigid body and collider API to it.

Parameters:
  • stage – The Usd.Stage to add cube.

  • path – The desired cube path.

  • size – The size of the cube.

  • position – The position where the cube should be placed in stage.

  • orientation – The cube orientation.

  • color – The color of the mesh.

  • lin_velocity – The initial linear velocity of the rigid body.

  • ang_velocity – The initial angular velocity of the rigid body.

omni.physx.scripts.physicsUtils.add_rigid_cylinder(
stage: Stage,
path: str | Path,
radius: float = 1.0,
height: float = 1.0,
axis: str = 'Y',
position: Vec3f = Gf.Vec3f(0.0, 0.0, 0.0),
orientation: Quatf = Gf.Quatf(1.0, Gf.Vec3f(0.0, 0.0, 0.0)),
color: Vec3f = Gf.Vec3f(1.0, 1.0, 1.0),
density: float = 1.0,
lin_velocity: Vec3f = Gf.Vec3f(0.0, 0.0, 0.0),
ang_velocity: Vec3f = Gf.Vec3f(0.0, 0.0, 0.0),
) Prim#

Add UsdGeom.Cylinder to the stage and add physics rigid body and collider API to it.

Parameters:
  • stage – The Usd.Stage to add cylinder.

  • path – The desired cylinder path.

  • radius – The radius of the cylinder.

  • height – The height of the cylinder.

  • axis – The axis of the cylinder.

  • position – The position where the cylinder should be placed in stage.

  • orientation – The cylinder orientation.

  • color – The color of the mesh.

  • lin_velocity – The initial linear velocity of the rigid body.

  • ang_velocity – The initial angular velocity of the rigid body.

omni.physx.scripts.physicsUtils.add_rigid_sphere(
stage: Stage,
path: str | Path,
radius: float = 1.0,
position: Vec3f = Gf.Vec3f(0.0, 0.0, 0.0),
orientation: Quatf = Gf.Quatf(1.0, Gf.Vec3f(0.0, 0.0, 0.0)),
color: Vec3f = Gf.Vec3f(1.0, 1.0, 1.0),
density: float = 1.0,
lin_velocity: Vec3f = Gf.Vec3f(0.0, 0.0, 0.0),
ang_velocity: Vec3f = Gf.Vec3f(0.0, 0.0, 0.0),
) Prim#

Add UsdGeom.Sphere to the stage and add physics rigid body and collider API to it.

Parameters:
  • stage – The Usd.Stage to add sphere.

  • path – The desired sphere path.

  • radius – The radius of the sphere.

  • position – The position where the sphere should be placed in stage.

  • orientation – The sphere orientation.

  • color – The color of the mesh.

  • lin_velocity – The initial linear velocity of the rigid body.

  • ang_velocity – The initial angular velocity of the rigid body.

omni.physx.scripts.physicsUtils.add_rigid_xform(
stage: Stage,
path: str | Path,
position: Vec3f = Gf.Vec3f(0.0, 0.0, 0.0),
orientation: Quatf = Gf.Quatf(1.0, Gf.Vec3f(0.0, 0.0, 0.0)),
scale: Vec3f = Gf.Vec3f(1.0, 1.0, 1.0),
) Prim#

Add xform to the stage with given transformation and add rigid body API to it.

Parameters:
  • stage – The Usd.Stage to add cone.

  • path – The desired xform path.

  • position – The position where the xform should be placed in stage.

  • orientation – The xform orientation.

  • scale – The xform scale.

omni.physx.scripts.physicsUtils.add_sphere(
stage: Stage,
path: str | Path,
radius: float = 1.0,
position: Vec3f = Gf.Vec3f(0.0, 0.0, 0.0),
orientation: Quatf = Gf.Quatf(1.0, Gf.Vec3f(0.0, 0.0, 0.0)),
color: Vec3f = Gf.Vec3f(1.0, 1.0, 1.0),
) Prim#

Add UsdGeom.Sphere to the stage.

Parameters:
  • stage – The Usd.Stage to add sphere.

  • path – The desired sphere path.

  • radius – The radius of the sphere.

  • position – The position where the sphere should be placed in stage.

  • orientation – The sphere orientation.

  • color – The color of the mesh.

omni.physx.scripts.physicsUtils.add_xform(
stage: Stage,
path: str | Path,
position: Vec3f = Gf.Vec3f(0.0, 0.0, 0.0),
orientation: Quatf = Gf.Quatf(1.0, Gf.Vec3f(0.0, 0.0, 0.0)),
scale: Vec3f = Gf.Vec3f(1.0, 1.0, 1.0),
) Prim#

Add xform to the stage with given transformation.

Parameters:
  • stage – The Usd.Stage to add cone.

  • path – The desired xform path.

  • position – The position where the xform should be placed in stage.

  • orientation – The xform orientation.

  • scale – The xform scale.

omni.physx.scripts.physicsUtils.compute_bounding_box_diagonal(
points: List[Float3],
) float#

Gets diagonal length of given point bounds.

Parameters:

points – The input points.

omni.physx.scripts.physicsUtils.copy_transform_as_scale_orient_translate(
src: Xformable,
dst: Xformable,
)#

Copies the local transforms from one Xformable to another as a default scale->orient->translate stack.

Note that:
  • Any skew in the src transform will be lost.

  • A resetXformStack is preserved, but not the XformOps that are ignored due to the reset.

  • The transform attribute precision of added XformOps is set to UsdGeom.XformOp.PrecisionFloat.

  • Obsolete xformOp: namespace attributes in dst are not removed (and cannot be for layers)

Parameters:
  • src – The source Xformable.

  • dst – The destination Xformable.

omni.physx.scripts.physicsUtils.create_mesh(
stage: Stage,
path: str | Path,
points: List[Vec3f] | List[Vec3d],
normals: List[Vec3f] | List[Vec3d],
indices: List[int],
vertexCounts: List[Vec3f],
) Mesh#

Create UsdGeom.Mesh from given points, normals, indices and face counts.

Parameters:
  • stage – The Usd.Stage to add path.

  • path – The desired path to create.

  • points – The input points.

  • normals – The input normals.

  • indices – The indices for faces.

  • vertexCounts – Face counts.

omni.physx.scripts.physicsUtils.create_mesh_concave(
stage: Stage,
path: str | Path,
halfSize: float,
) Mesh#

Create UsdGeom.Mesh that represents a concave mesh.

Parameters:
  • stage – The Usd.Stage to add path.

  • path – The desired path to create.

  • halfSize – The half size of the mesh.

omni.physx.scripts.physicsUtils.create_mesh_cone(
stage: Stage,
path: str | Path,
height: float,
radius: float,
tesselation: int = 32,
) Mesh#

Create UsdGeom.Mesh that represents a cone mesh.

Parameters:
  • stage – The Usd.Stage to add path.

  • path – The desired path to create.

  • height – The height of the cone.

  • radius – The radius of the cone.

  • tesselation – The tesselation of the cone mesh.

omni.physx.scripts.physicsUtils.create_mesh_cube(
stage: Stage,
path: str | Path,
halfSize: float,
) Mesh#

Create UsdGeom.Mesh that represents a cube mesh.

Parameters:
  • stage – The Usd.Stage to add path.

  • path – The desired path to create.

  • halfSize – The half size of the cube.

omni.physx.scripts.physicsUtils.create_mesh_cylinder(
stage: Stage,
path: str | Path,
height: float,
radius: float,
tesselation: int = 32,
) Mesh#

Create UsdGeom.Mesh that represents a cylinder mesh.

Parameters:
  • stage – The Usd.Stage to add path.

  • path – The desired path to create.

  • height – The height of the cylinder.

  • radius – The radius of the cylinder.

  • tesselation – The tesselation of the cylinder mesh.

omni.physx.scripts.physicsUtils.create_mesh_square_axis(
stage: Stage,
path: str | Path,
axis: str,
halfSize: float,
) Mesh#

Create UsdGeom.Mesh that represents a square.

Parameters:
  • stage – The Usd.Stage to add path.

  • path – The desired path to create.

  • axis – The up axis “Y”, “Z”.

  • halfSize – The half size of the square.

omni.physx.scripts.physicsUtils.get_stage_next_free_path(
stage: Stage,
path: str | Path,
prepend_default_prim: bool,
) str#

Gets valid path in stage, if the path already exists it will append number.

Parameters:
  • stage – The Usd.Stage to add path.

  • path – The desired path to create.

  • prepend_default_prim – Whether prepend default prim path name.

omni.physx.scripts.physicsUtils.get_translation(prim: Prim) Vec3f | Vec3d#

Return translate attribute value from the given prim.

Parameters:

prim – The Usd.Prim to check.

omni.physx.scripts.physicsUtils.is_in_collision_group(
stage: Stage,
collisionPath: str | Path,
collisionGroupPath: str | Path,
) bool#

Checks if a collision path belongs to a collision group include rel.

Parameters:
  • stage – The Usd.Stage to add path.

  • collisionPath – Collision path to add.

  • collisionGroupPath – Collision group prim path.

omni.physx.scripts.physicsUtils.remove_collision_from_collision_group(
stage: Stage,
collisionPath: str | Path,
collisionGroupPath: str | Path,
)#

Remove collision path to a collision group include rel.

Parameters:
  • stage – The Usd.Stage to add path.

  • collisionPath – Collision path to add.

  • collisionGroupPath – Collision group prim path.

omni.physx.scripts.physicsUtils.set_or_add_orient_op(
xformable: Xformable,
orient: Quatf | Quatd | Quath,
) XformOp#

Sets or adds the orient XformOp on the input Xformable to provided orient value.

Note that:
  • The precision of an added attribute is UsdGeom.XformOp.PrecisionFloat.

Parameters:
  • xformable – The Xformable to modify.

  • orient – The orient quaternion

Returns:

The set or added XformOp

omni.physx.scripts.physicsUtils.set_or_add_scale_op(
xformable: Xformable,
scale: Vec3f | Vec3d | Vec3h,
) XformOp#

Sets or adds the scale XformOp on the input Xformable to provided scale value.

Note that:
  • The precision of an added attribute is UsdGeom.XformOp.PrecisionFloat.

Parameters:
  • xformable – The Xformable to modify.

  • scale – The scale vector

Returns:

The set or added XformOp

omni.physx.scripts.physicsUtils.set_or_add_scale_orient_translate(
xformable: Xformable,
scale: Vec3f | Vec3d | Vec3h,
orient: Quatf | Quatd | Quath,
translate: Vec3f | Vec3d | Vec3h,
) List[XformOp]#

Sets or adds scale, orient, and translate XformOps of xformable.

Note that:
  • The precision of created attributes is UsdGeom.XformOp.PrecisionFloat.

Parameters:
  • xformable – The Xformable to modify.

  • scale – The scale vector

  • orient – The orientation quaternion

  • translate – The translation vector

Returns:

List of set and created xform ops that will be [translate, orient, scale]

omni.physx.scripts.physicsUtils.set_or_add_translate_op(
xformable: Xformable,
translate: Vec3f | Vec3d | Vec3h,
) XformOp#

Sets or adds the translate XformOp on the input Xformable to provided translate value.

Note that:
  • The precision of an added attribute is UsdGeom.XformOp.PrecisionFloat.

Parameters:
  • xformable – The Xformable to modify.

  • translate – The translate vector

Returns:

The set or added XformOp

omni.physx.scripts.physicsUtils.setup_transform_as_scale_orient_translate(
xformable: Xformable,
)#

Changes the local transform (ops) to the physics default scale->orient->translate stack.

Note that:
  • Any skew in the transform will be lost.

  • A resetXformStack is preserved, but not the XformOps that are ignored due to the reset.

  • The transform attribute precision is set to UsdGeom.XformOp.PrecisionFloat.

  • Obsolete xformOp: namespace attributes are not removed (and cannot be for layers)

Parameters:

xformable – The Xformable to modify.

omni.physx.scripts.deformableUtils.add_deformable_body_material(
stage,
path,
damping_scale=None,
density=None,
dynamic_friction=None,
elasticity_damping=None,
poissons_ratio=None,
youngs_modulus=None,
)#

DEPRECATED: Will be replaced by new deformable implementation in future release. Applies the PhysxSchema.PhysxDeformableSurfaceMaterialAPI to the prim at path on stage.

Parameters:
  • stage – The stage

  • path – Path to UsdShade.Material to which the material API should be applied to.

  • attributes (... schema) – See USD schema for documentation

Returns:

True if the API apply succeeded.

omni.physx.scripts.deformableUtils.add_deformable_surface_material(
stage,
path,
density=None,
dynamic_friction=None,
poissons_ratio=None,
thickness=None,
youngs_modulus=None,
)#

DEPRECATED: Will be replaced by new deformable implementation in future release. Applies the PhysxSchema.PhysxDeformableSurfaceMaterialAPI to the prim at path on stage.

Parameters:
  • stage – The stage

  • path – Path to UsdShade.Material to which the material API should be applied to.

  • attributes (... schema) – See USD schema for documentation

Returns:

True if the API apply succeeded.

omni.physx.scripts.deformableUtils.add_physx_deformable_body(
stage,
prim_path: Path,
collision_rest_points: List[Vec3f] | None = None,
collision_indices: List[int] | None = None,
kinematic_enabled: bool = False,
collision_simplification: bool = True,
collision_simplification_remeshing: bool = True,
collision_simplification_remeshing_resolution: int = 0,
collision_simplification_target_triangle_count: int = 0,
collision_simplification_force_conforming: bool = False,
simulation_rest_points: List[Vec3f] | None = None,
simulation_indices: List[int] | None = None,
embedding: List[int] | None = None,
simulation_hexahedral_resolution: int = 10,
solver_position_iteration_count: int | None = None,
vertex_velocity_damping: float | None = None,
sleep_damping: float | None = None,
sleep_threshold: float | None = None,
settling_threshold: float | None = None,
self_collision: bool | None = None,
self_collision_filter_distance: float | None = None,
) bool#

DEPRECATED: Will be replaced by new deformable implementation in future release. Applies the deformable body API to an Xform at prim_path on stage.

Parameters:
  • stage – The stage

  • prim_path – Path to UsdGeom.Mesh ‘skin mesh’ to which the PhysxSchema.PhysXDeformableBodyAPI is applied to.

  • collision_rest_points – List of vertices of the collision tetrahedral mesh at rest. If a collision mesh is provided, the simulation mesh needs to be provided too. If no collision mesh is provided, it will be computed implicitly based on the simplification parameter.

  • collision_indices – List of indices of the collision tetrahedral mesh.

  • kinematic_enabled – Enables kinematic body.

  • collision_simplification – Boolean flag indicating if simplification should be applied to the mesh before creating a softbody out of it. Is ignored if simulation mesh has been provided.

  • collision_simplification_remeshing – Boolean flag indicating if the simplification should be based on remeshing. Ignored if collision_simplification equals False.

  • collision_simplification_remeshing_resolution – The resolution used for remeshing. A value of 0 indicates that a heuristic is used to determine the resolution. Ignored if collision_simplification_remeshing is False.

  • collision_simplification_target_triangle_count – The target triangle count used for the simplification. A value of 0 indicates that a heuristic based on the simulation_hexahedral_resolution is to determine the target count. Ignored if collision_simplification equals False.

  • collision_simplification_force_conforming – Boolean flag indicating that the tretrahedralizer used to generate the collision mesh should produce tetrahedra that conform to the triangle mesh. If False the implementation chooses the tretrahedralizer used.

  • simulation_rest_points – List of vertices of the simulation tetrahedral mesh at rest. If a simulation mesh is provided, the collision mesh needs to be provided too. If no simulation mesh is provided it will be computed implicitly based on simulation_hexahedral_resolution.

  • simulation_indices – List of indices of the simulation tetrahedral mesh.

  • embedding – Optional embedding information mapping collision points to containing simulation tetrahedra.

  • simulation_hexahedral_resolution – Target resolution of voxel simulation mesh. Is ignored if simulation mesh has been provided.

  • ... – See USD schema for documentation

Returns:

True / False that indicates success of schema application

omni.physx.scripts.deformableUtils.add_physx_deformable_surface(
stage,
prim_path: Path,
simulation_rest_points: List[Vec3f] | None = None,
simulation_indices: List[int] | None = None,
bending_stiffness_scale: float | None = None,
solver_position_iteration_count: int | None = None,
vertex_velocity_damping: float | None = None,
sleep_damping: float | None = None,
sleep_threshold: float | None = None,
settling_threshold: float | None = None,
self_collision: bool | None = None,
self_collision_filter_distance: float | None = None,
) bool#

DEPRECATED: Will be replaced by new deformable implementation in future release. Applies the deformable surface API to an Xform at prim_path on stage.

Parameters:
  • stage – The stage

  • prim_path – Path to UsdGeom.Mesh ‘skin mesh’ to which the PhysxSchema.PhysXDeformableBodyAPI is applied to.

  • simulation_rest_points – List of vertices of the simulation mesh at rest.

  • simulation_indices – List of indices of the simulation mesh.

  • ... – See USD schema for documentation

Returns:

True / False that indicates success of schema application

omni.physx.scripts.deformableUtils.create_skin_mesh_from_tetrahedral_mesh(
target_path: Path,
stage: Stage,
source_tetrahedal_mesh_path: Path,
) Mesh#

DEPRECATED: Will be replaced by new deformable implementation in future release.

omni.physx.scripts.deformableUtils.create_triangle_mesh_square(dimx: int, dimy: int, scale: float = 1.0)#

Creates points and vertex data for a regular-grid flat triangle mesh square.

Parameters:
  • dimx – Mesh-vertex resolution in X

  • dimy – Mesh-vertex resolution in Y

  • scale – Uniform scale applied to vertices

Returns:

The vertex and index data

Return type:

points, indices