Phive: Difference between revisions
(add category) |
(Add some NSO PT additions, rephrase a bit.) |
||
Line 1: | Line 1: | ||
Phive is Nintendo's physics library built on top of an external physics library, either Havok or PhysX 3.4 have been observed. The PhysX branch doesn't implement the full feature set and is unused by the game it appears in. The library has an optional cloth and navigation mesh extension. It's responsible for providing actors many different physics controllers in a ControllerSet. | Phive is Nintendo's physics library built on top of an external physics library, either Havok or PhysX 3.4 have been observed. The PhysX branch doesn't implement the full feature set and is unused by the game it appears in. The library has an optional cloth and navigation mesh extension for when Havok Navigation and/or Animation are present. It's responsible for providing actors many different physics controllers in a ControllerSet. | ||
=== PhiveBackEnd === | === PhiveBackEnd === | ||
Top-level manager responsible for bootstrapping and handling the memory management of the external physics library. | |||
=== PhiveConfig === | === PhiveConfig === | ||
Global application settings for phive. | |||
=== DynamicsFramework === | === DynamicsFramework === | ||
Line 11: | Line 11: | ||
=== ControllerSetBinder === | === ControllerSetBinder === | ||
Loads all controller set resources. | |||
=== ControllerSetConfig === | === ControllerSetConfig === | ||
Unpacks binder. | |||
=== ControllerSet === | === ControllerSet === | ||
Line 18: | Line 20: | ||
=== CharacterController === | === CharacterController === | ||
Character controllers | Character controllers provide a framework for kinematics controlled characters. The game can extend character controllers with Update, Result, MoveState, and External components. | ||
==== CharacterProperty ==== | ==== CharacterProperty ==== | ||
Line 56: | Line 58: | ||
==== CharacterExternal ==== | ==== CharacterExternal ==== | ||
=== BulletBodyControllerEntity === | |||
=== RigidBodyControllerEntity === | === RigidBodyControllerEntity === | ||
Top level controller for a | Top level controller for a set of rigid body entities. Phive config defines the set of possible controller names under "RigidBodyControllerNameEntityCollection". | ||
=== RigidBodyControllerSensor === | === RigidBodyControllerSensor === | ||
Top level controller for a | Top level controller for a set of rigid body sensors. Phive config defines the set of possible controller names under "RigidBodyControllerNameSensorCollection". | ||
=== RigidBody === | === RigidBody === | ||
Line 131: | Line 135: | ||
These are rigid bodies that exist for the purpose of being a physical object. | These are rigid bodies that exist for the purpose of being a physical object. | ||
=== RigidBodyEntityForceField === | ==== RigidBodyEntityForceField ==== | ||
=== RigidBodySensor === | === RigidBodySensor === | ||
Line 141: | Line 145: | ||
=== Shape === | === Shape === | ||
Shapes are used to provide form to a RigidBody | Shapes are used to provide form to a RigidBody. Each shape defines a material, sub material, and can be tagged with up to 64 tags, tags as named under phive config "UserShapeTagMaskCollection". | ||
{| class="wikitable" | {| class="wikitable" | ||
|+ShapeType Enum (official) | |+ShapeType Enum (official, from Tears of the Kingdom) | ||
!Name | !Name | ||
!Value | !Value | ||
Line 158: | Line 162: | ||
|Polytope | |Polytope | ||
|2 | |2 | ||
|A shape created out of an array of vertices | |A shape created out of an array of up to 255 vertices. Must be convex. | ||
|- | |- | ||
|Box | |Box | ||
Line 178: | Line 182: | ||
|Compound | |Compound | ||
|7 | |7 | ||
| | |"Instances" shapes into a single "compound" from a set of shapes | ||
|- | |- | ||
|Mesh | |Mesh | ||
Line 214: | Line 218: | ||
|SDFSurfaceOfRevolution | |SDFSurfaceOfRevolution | ||
|16 | |16 | ||
|Shape created by the revolution of an up to 16 point 2d curve around a radius. | |||
|- | |||
|SDFHeightField | |||
|17 | |||
|Height field for dynamic modification at runtime | |||
|- | |||
|Dummy | |||
|18 | |||
| | |||
|} | |||
{| class="wikitable" | |||
|+ShapeType Enum (official, from Nintendo Switch Online: Playtest Program) | |||
!Name | |||
!Value | |||
!Description | |||
|- | |||
|Sphere | |||
|0 | |||
| | |||
|- | |||
|Capsule | |||
|1 | |||
| | |||
|- | |||
|Polytope | |||
|2 | |||
|A shape created out of an array of up to 255 vertices. Must be convex. | |||
|- | |||
|Box | |||
|3 | |||
| | |||
|- | |||
|Cylinder | |||
|4 | |||
| | |||
|- | |||
|Cone | |||
|5 | |||
| | |||
|- | |||
|CharacterPrism | |||
|6 | |||
| | | | ||
|- | |||
|Compound | |||
|7 | |||
|"Instances" shapes into a single "compound" from a set of shapes | |||
|- | |||
|Mesh | |||
|8 | |||
|A shape created from the mesh of a Bphsh file | |||
|- | |- | ||
|SDFHeightField | |SDFHeightField | ||
|9 | |||
|Height field for dynamic modification at runtime | |||
|- | |||
|HeightField | |||
|10 | |||
|Base class for all height fields | |||
|- | |||
|HeightFieldBox | |||
|11 | |||
|Used in Bphsc for Water | |||
|- | |||
|HeightFieldSphere | |||
|12 | |||
| | |||
|- | |||
|HeightFieldCylinder | |||
|13 | |||
|Used in Bphsc for Water | |||
|- | |||
|HeightFieldQuadrant | |||
|14 | |||
|Used in Bphsc for Water | |||
|- | |||
|StaticCompound | |||
|15 | |||
|Used in Bphsc for compound shapes | |||
|- | |||
|SDFSurfaceOfRevolution | |||
|16 | |||
|Shape created by the revolution of an up to 16 point 2d curve around a radius. | |||
|- | |||
|Breakable | |||
|17 | |17 | ||
| | | | ||
Line 273: | Line 359: | ||
==== PhiveEntityControlExtension ==== | ==== PhiveEntityControlExtension ==== | ||
==== InteractiveWaterControllerExtension ==== | |||
=== GraphicsControllerSet === | === GraphicsControllerSet === |
Latest revision as of 07:20, 14 April 2025
Phive is Nintendo's physics library built on top of an external physics library, either Havok or PhysX 3.4 have been observed. The PhysX branch doesn't implement the full feature set and is unused by the game it appears in. The library has an optional cloth and navigation mesh extension for when Havok Navigation and/or Animation are present. It's responsible for providing actors many different physics controllers in a ControllerSet.
PhiveBackEnd
Top-level manager responsible for bootstrapping and handling the memory management of the external physics library.
PhiveConfig
Global application settings for phive.
DynamicsFramework
This is the main application manager for phive. It provides an additional set of managers.
ControllerSetBinder
Loads all controller set resources.
ControllerSetConfig
Unpacks binder.
ControllerSet
This is a set of all physics controller for an actor. Wrapped by ModuleSystem's PhysicsComponent.
CharacterController
Character controllers provide a framework for kinematics controlled characters. The game can extend character controllers with Update, Result, MoveState, and External components.
CharacterProperty
CharacterMatterRigidBodyEntity
Extension of RigidBodyEntity for character controllers.
Name | Function Arguments | Description |
---|---|---|
ChangeIsRigidBodyMode | Appears to toggle whether the rigid body is treated as such? | |
SetAngularVelocity | Extension to base request. | |
SetLinearVelocity | Extension to base request. | |
SetPositionAndRotation | Extension to base request. |
CharacterParam
CharacterUpdate
CharacterMoveState
CharacterResult
CharacterExternal
BulletBodyControllerEntity
RigidBodyControllerEntity
Top level controller for a set of rigid body entities. Phive config defines the set of possible controller names under "RigidBodyControllerNameEntityCollection".
RigidBodyControllerSensor
Top level controller for a set of rigid body sensors. Phive config defines the set of possible controller names under "RigidBodyControllerNameSensorCollection".
RigidBody
The base RigidBody class. The game can file change requests for a RigidBody which will be applied in the next frame.
Name | Function Arguments | Description |
---|---|---|
AddToWorld | Adds RigidBody as a member of their respective Physics world | |
RemoveFromWorld | ||
NoHit | ||
ChangeCollisionQuality | ||
ChangeEnableHitRayCast | ||
ChangeLayerMask | ||
ChangeMotionType | ||
ChangeShape | ||
SetLayer | ||
SetLayerMask | ||
SetAngularVelocity | ||
SetLinearVelocity | ||
SetPositionAndRotation | ||
SetSubLayer |
RigidBodyEntity
These are rigid bodies that exist for the purpose of being a physical object.
RigidBodyEntityForceField
RigidBodySensor
These are rigid bodies that exist for the purpose of sensing.
ContactCollectionEntity
ContactCollectionSensor
Shape
Shapes are used to provide form to a RigidBody. Each shape defines a material, sub material, and can be tagged with up to 64 tags, tags as named under phive config "UserShapeTagMaskCollection".
Name | Value | Description |
---|---|---|
Sphere | 0 | |
Capsule | 1 | |
Polytope | 2 | A shape created out of an array of up to 255 vertices. Must be convex. |
Box | 3 | |
Cylinder | 4 | |
Cone | 5 | |
CharacterPrism | 6 | |
Compound | 7 | "Instances" shapes into a single "compound" from a set of shapes |
Mesh | 8 | A shape created from the mesh of a Bphsh file |
HeightField | 9 | Base class for all height fields |
HeightFieldBox | 10 | Used in Bphsc for Water |
HeightFieldSphere | 11 | |
HeightFieldCylinder | 12 | Used in Bphsc for Water |
HeightFieldQuadrant | 13 | Used in Bphsc for Water |
HeightFieldVertices | 14 | |
StaticCompound | 15 | Used in Bphsc for compound shapes |
SDFSurfaceOfRevolution | 16 | Shape created by the revolution of an up to 16 point 2d curve around a radius. |
SDFHeightField | 17 | Height field for dynamic modification at runtime |
Dummy | 18 |
Name | Value | Description |
---|---|---|
Sphere | 0 | |
Capsule | 1 | |
Polytope | 2 | A shape created out of an array of up to 255 vertices. Must be convex. |
Box | 3 | |
Cylinder | 4 | |
Cone | 5 | |
CharacterPrism | 6 | |
Compound | 7 | "Instances" shapes into a single "compound" from a set of shapes |
Mesh | 8 | A shape created from the mesh of a Bphsh file |
SDFHeightField | 9 | Height field for dynamic modification at runtime |
HeightField | 10 | Base class for all height fields |
HeightFieldBox | 11 | Used in Bphsc for Water |
HeightFieldSphere | 12 | |
HeightFieldCylinder | 13 | Used in Bphsc for Water |
HeightFieldQuadrant | 14 | Used in Bphsc for Water |
StaticCompound | 15 | Used in Bphsc for compound shapes |
SDFSurfaceOfRevolution | 16 | Shape created by the revolution of an up to 16 point 2d curve around a radius. |
Breakable | 17 | |
Dummy | 18 |
ConstraintController
Constraint
Name | Description |
---|---|
BallAndSocket | |
CogWheel | |
Fixed | |
FreeSlider | |
Hinge | |
Pulley | |
RackAndPinion | |
Range | |
Slider | |
SpringDamper |
Placement
StaticCompoundController
Extension
RopeExtension
PhiveEntityControlExtension
InteractiveWaterControllerExtension
GraphicsControllerSet
This is a sub controller set of phive::ControllerSet responsible for physics controllers used for graphical effects.