mirror of
https://github.com/lighttransport/tinyusdz.git
synced 2026-01-18 01:11:17 +01:00
159 lines
6.4 KiB
Plaintext
159 lines
6.4 KiB
Plaintext
#usda 1.0
|
|
(
|
|
"""
|
|
Copyright © 2020 Apple Inc.
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
|
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
This file describes the USD Physics schemata for code generation.
|
|
"""
|
|
subLayers = [
|
|
@usd/schema.usda@,
|
|
@usdGeom/schema.usda@
|
|
]
|
|
)
|
|
|
|
over "GLOBAL" (
|
|
customData = {
|
|
string libraryName = "usdPhysics"
|
|
string libraryPath = "pxr/usd/usdPhysics"
|
|
string libraryPrefix = "UsdPhysics"
|
|
string tokensPrefix = "UsdPhysics"
|
|
}
|
|
) {
|
|
}
|
|
|
|
class "Preliminary_PhysicsForce" (
|
|
doc = """Defines a physics based force base type.
|
|
"""
|
|
inherits = </Xformable>
|
|
customData = {
|
|
string className = "Preliminary_PhysicsForce"
|
|
}
|
|
)
|
|
{
|
|
}
|
|
|
|
class Preliminary_PhysicsGravitationalForce "Preliminary_PhysicsGravitationalForce" (
|
|
doc = """Physical force exerted by some gravitational field on objects within it.
|
|
"""
|
|
inherits = </Preliminary_PhysicsForce>
|
|
customData = {
|
|
string className = "Preliminary_PhysicsGravitationalForce"
|
|
}
|
|
)
|
|
{
|
|
uniform vector3d physics:gravitationalForce:acceleration = (0.0, -9.81, 0.0) (
|
|
doc = """Local space vector defining the direction and magnitude of the gravitational force's acceleration effect.
|
|
Units are in meters per second squared.
|
|
The default value is the Earth's gravity, assuming upAxis is +Y.
|
|
Affected by the value of upAxis and by its parent's transform
|
|
"""
|
|
)
|
|
}
|
|
|
|
class "Preliminary_PhysicsMaterialAPI" (
|
|
doc = """Specifies the physical properties of a material that a collider can be made of.
|
|
"""
|
|
inherits = </APISchemaBase>
|
|
customData = {
|
|
string className = "Preliminary_PhysicsMaterialAPI"
|
|
token apiSchemaType = "singleApply"
|
|
}
|
|
)
|
|
{
|
|
uniform double preliminary:physics:material:restitution (
|
|
|
|
doc = """Restitution of the material. Defines how elastic collisions are against objects made of this material
|
|
Values range between 0.0 and 1.0.
|
|
0.0 represents a completely inelastic material; while 1.0 represents a completely elastic material
|
|
No units, it is dimensionless as it is a coefficient.
|
|
"""
|
|
)
|
|
uniform double preliminary:physics:material:friction:static (
|
|
doc = """Friction coefficient of the material as an object that's made of it, as it is in contact with another, but not moving.
|
|
No units, it is dimensionless as it is a coefficient.
|
|
|
|
"""
|
|
)
|
|
uniform double preliminary:physics:material:friction:dynamic (
|
|
doc = """Friction coefficient of the material as an object that's made of it, rubs against another object.
|
|
No units, it is dimensionless as it is a coefficient.
|
|
|
|
"""
|
|
)
|
|
}
|
|
|
|
class "Preliminary_PhysicsRigidBodyAPI" (
|
|
doc = """Dual purpose interface for:
|
|
1) Retrieving the attributes of a prim that are related to a rigid body physical simulation.
|
|
2) Identifying the prim whose transforms values will be computed as a rigid body in the
|
|
simulation.
|
|
"""
|
|
inherits = </APISchemaBase>
|
|
customData = {
|
|
string className = "Preliminary_PhysicsRigidBodyAPI"
|
|
token apiSchemaType = "singleApply"
|
|
}
|
|
)
|
|
{
|
|
uniform double preliminary:physics:rigidBody:mass = 1.0 (
|
|
doc = """Physical mass of the rigid body in Kilograms. This property is uniformly scaled by the scale
|
|
component of the prim's transform.
|
|
"""
|
|
)
|
|
uniform bool preliminary:physics:rigidBody:initiallyActive = true (
|
|
doc = """Boolean that determines if a rigid body is active or not at physics simulation startup.
|
|
"""
|
|
)
|
|
}
|
|
|
|
class "Preliminary_PhysicsColliderAPI" (
|
|
doc = """Interface defining collision shapes of a prim participating in collisions of a physical simulation.
|
|
"""
|
|
inherits = </APISchemaBase>
|
|
customData = {
|
|
string className = "Preliminary_PhysicsColliderAPI"
|
|
token apiSchemaType = "singleApply"
|
|
}
|
|
)
|
|
{
|
|
rel preliminary:physics:collider:convexShape (
|
|
doc = """Relation pointing to an override that contains a prim hierarchy that defines the collider's geometry.
|
|
If the object pointed to by this relationship is different from the object's geometry then
|
|
it must have its purpose attribute set to guide.
|
|
Currently the only geometry primitives supported are: UsdGeomCapsule, UsdGeomSphere and UsdGeomCube.
|
|
UsdGeomCube is scaled to simulate a box collider's differing dimensions along each axis.
|
|
All other geometry primitives derived from UsdGeomGPrims will approximate the collider by using
|
|
a bounding box collider defined by its extent. The geometry of the collider is required to be convex.
|
|
"""
|
|
)
|
|
}
|
|
|
|
class "Preliminary_InfiniteColliderPlane" (
|
|
doc = """Defines a plane in space, but does not need to define any actual
|
|
mesh geometry for it, but could be have special rendering if its
|
|
purpose is guide for example.
|
|
|
|
Its extent is defined as [(-FLT_MAX, -FLT_MAX, -FLT_MAX), (FLT_MAX, FLT_MAX, FLT_MAX)]
|
|
"""
|
|
inherits = </Gprim>
|
|
customData = {
|
|
string className = "Preliminary_InfiniteColliderPlane"
|
|
}
|
|
)
|
|
{
|
|
point3d position = (0, 0, 0) (
|
|
doc = """Location of the plane in space.
|
|
"""
|
|
)
|
|
vector3d normal = (0, 1, 0) (
|
|
doc = """Normal of the plane in space.
|
|
"""
|
|
)
|
|
}
|