1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//! UsdPhysics schema reader.
//!
//! Decodes Pixar's `UsdPhysics` schema family from a composed
//! [`crate::usd::Stage`]. Mirrors the C++ surface in
//! `pxr/usd/usdPhysics/`:
//!
//! Concrete prim types:
//! - [`tokens::T_PHYSICS_SCENE`] — simulation-wide settings (gravity).
//! - [`tokens::T_PHYSICS_JOINT`] — generic 6-DOF joint base.
//! - [`tokens::T_PHYSICS_FIXED_JOINT`] — locks all DOFs.
//! - [`tokens::T_PHYSICS_REVOLUTE_JOINT`] — single-axis rotation.
//! - [`tokens::T_PHYSICS_PRISMATIC_JOINT`] — single-axis translation.
//! - [`tokens::T_PHYSICS_SPHERICAL_JOINT`] — ball joint with cone limits.
//! - [`tokens::T_PHYSICS_DISTANCE_JOINT`] — min/max distance constraint.
//! - [`tokens::T_PHYSICS_COLLISION_GROUP`] — coarse collision filtering.
//!
//! Single-apply API schemas:
//! - [`tokens::API_RIGID_BODY`] — mark prim as physics-driven.
//! - [`tokens::API_MASS`] — explicit mass / inertia / centre-of-mass.
//! - [`tokens::API_COLLISION`] — enable collision on a prim.
//! - [`tokens::API_MESH_COLLISION`] — mesh shape approximation token.
//! - [`tokens::API_PHYSICS_MATERIAL`] — friction / restitution / density.
//! - [`tokens::API_ARTICULATION_ROOT`] — mark a reduced-coordinate articulation.
//! - [`tokens::API_FILTERED_PAIRS`] — fine-grained pair filtering.
//!
//! Multi-apply API schemas (one instance per DOF):
//! - [`tokens::API_LIMIT`] — per-DOF lock / range.
//! - [`tokens::API_DRIVE`] — per-DOF spring-damper actuator.
//!
//! ## Conventions
//!
//! Reader functions return values in the scene's authored units:
//! - Linear values stay in scene units (caller applies `metersPerUnit`).
//! - Mass values stay in scene mass units (caller applies `kilogramsPerUnit`).
//! - Rotational values stay in degrees (USD's authoring convention).
//! - Quaternions stay in USD's textual `(w, x, y, z)` order.
//! - `lower > upper` on any limit encodes a locked DOF.
//!
//! ## Example
//!
//! ```ignore
//! use openusd::{physics, usd};
//!
//! let stage = usd::Stage::open("scene.usd")?;
//! let physics = physics::find_physics_prims(&stage)?;
//! for joint_path in &physics.joints {
//! let path = openusd::sdf::path(joint_path)?;
//! if let Some(joint) = physics::read_joint(&stage, &path)? {
//! println!("{}: {:?} body0={:?} body1={:?}",
//! joint.path, joint.kind, joint.body0, joint.body1);
//! }
//! }
//! # anyhow::Ok(())
//! ```
pub use ;
pub use ;
pub use ;