Phive

From EPD Wiki
Jump to navigation Jump to search

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.

Matter Rigid Body Specific Request Types
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.

Known Request Types (unofficial)
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".

ShapeType Enum (official, from Tears of the Kingdom)
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
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 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

Constraint types (unofficial table)
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.

LookingController

LookIKController

EyeTextureScrollController

EyeTexturePatternController

HelperBone

Cloth

RagdollStructure

FishBoneController

TailBoneController

FootIK

HandIK

SnakeIK

BoneModifier

ModelController

NavMeshCharacter