diff --git a/nif.xml b/nif.xml index adf59e8f6bf44e895ec684db8ac078c10b4983a7..a0c2b21fba94a3d743f784fb600f754279d49033 100644 --- a/nif.xml +++ b/nif.xml @@ -4672,129 +4672,326 @@ </niobject> <niobject name="NiPhysXProp" abstract="0" inherit="NiObjectNET"> - Unknown PhysX node. - <add name="Unknown Float 1" type="float">Unknown</add> - <add name="Unknown Int 1" type="uint">Unknown</add> - <add name="Unknown Refs 1" type="Ref" template="NiObject" arr1="Unknown Int 1">Unknown</add> - <add name="Num Dests" type="int">Number of NiPhysXTransformDest references</add> - <add name="Transform Dests" type="Ref" template="NiPhysXTransformDest" arr1="Num Dests">Unknown</add> - <add name="Unknown Byte" type="byte">Unknown</add> - <add name="Unknown Int" type="int" ver1="20.5.0.0">Unknown</add><!-- in Krazy Rain 20.5.0.0 nifs, missing in the copetech 20.3.0.9 nifs --> - <add name="Prop Description" type="Ref" template="NiPhysXPropDesc">PhysX Property Description.</add> - </niobject> + A PhysX prop which holds information about PhysX actors in a Gamebryo scene + <add name="PhysX to World Scale" type="float" /> + <add name="Num Sources" type="uint" /> + <add name="Sources" type="Ref" template="NiObject" arr1="Num Sources" /> + <add name="Num Dests" type="int" /> + <add name="Dests" type="Ref" template="NiPhysXDest" arr1="Num Dests" /> + <add name="Num Modified Meshes" type="uint" ver1="20.4.0.0" /> + <add name="Modified Meshes" type="Ref" template="NiMesh" arr1="Num Modified Meshes" ver1="20.4.0.0" /> + <add name="Temp Name" type="string" ver1="30.1.0.2" ver2="30.2.0.2" /> + <add name="Keep Meshes" type="bool" /> + <add name="Prop Description" type="Ref" template="NiPhysXPropDesc" /> + </niobject> + + <compound name="PhysXMaterialRef"> + <add name="Key" type="ushort" /> + <add name="Material Desc" type="Ref" template="NiPhysXMaterialDesc" /> + </compound> - <compound name="physXMaterialRef"> - <add name="Number" type="byte">Unknown</add> - <add name="Unknown Byte 1" type="byte">Unknown</add> - <add name="Material Desc" type="Ref" template="NiPhysXMaterialDesc" >PhysX Material Description</add> + <compound name="PhysXStateName"> + <add name="Name" type="string" /> + <add name="Index" type="uint" /> </compound> <niobject name="NiPhysXPropDesc" abstract="0" inherit="NiObject"> - Unknown PhysX node. - <add name="Num Dests" type="int">Number of NiPhysXActorDesc references</add> - <add name="Actor Descs" type="Ref" template="NiPhysXActorDesc" arr1="Num Dests">Unknown</add> - <add name="Num Joints" type="uint">Unknown</add> - <add name="Joint Descs" type="Ref" template="NiPhysXD6JointDesc" arr1="Num Joints">PhysX Joint Descriptions</add> - <add name="Unknown Int 1" type="int">Unknown</add> - <add name="Num Materials" type="uint">Unknown</add> - <add name="Material Descs" type="physXMaterialRef" arr1="Num Materials">PhysX Material Descriptions</add> - <add name="Unknown Int 2" type="uint">Unknown</add> - <add name="Unknown Int 3" type="uint" ver1="20.5.0.0">Unknown</add><!-- in Krazy Rain 20.5.0.0 nifs, not in copetech nifs --> - <add name="Unknown String 4" type="string" ver1="20.5.0.0">Unknown</add><!-- in Krazy Rain 20.5.0.0 nifs, not in copetech nifs --> - <add name="Unknown Int 5" type="uint" ver1="20.5.0.0">Unknown</add><!-- in Krazy Rain 20.5.0.0 nifs, not in copetech nifs --> - <add name="Unknown Byte 6" type="byte" ver1="20.5.0.0">Unknown</add><!-- in Krazy Rain 20.5.0.0 nifs, not in copetech nifs --> + For serialization of PhysX objects and to attach them to the scene. + <add name="Num Actors" type="int" /> + <add name="Actors" type="Ref" template="NiPhysXActorDesc" arr1="Num Actors" /> + <add name="Num Joints" type="uint" /> + <add name="Joints" type="Ref" template="NiPhysXJointDesc" arr1="Num Joints" /> + <add name="Num Clothes" type="uint" ver1="20.3.0.5" /> + <add name="Clothes" type="Ref" template="NiObject" arr1="Num Clothes" ver1="20.3.0.5" /> <!-- NiPhysXClothDesc --> + <add name="Num Materials" type="uint" /> + <add name="Materials" type="PhysXMaterialRef" arr1="Num Materials" /> + <add name="Num States" type="uint" /> + <add name="Num State Names" type="uint" ver1="20.4.0.0" /> + <add name="State Names" type="PhysXStateName" arr1="Num State Names" ver1="20.4.0.0" /> + <add name="Flags" type="byte" ver1="20.4.0.0" /> </niobject> <niobject name="NiPhysXActorDesc" abstract="0" inherit="NiObject"> - Unknown PhysX node. - <add name="Unknown Int 1" type="int">Unknown</add> - <add name="Unknown Int 2" type="int">Unknown</add> - <add name="Unknown Quat 1" type="Quaternion">Unknown</add> - <add name="Unknown Quat 2" type="Quaternion">Unknown</add> - <add name="Unknown Quat 3" type="Quaternion">Unknown</add> - <add name="Unknown Ref 0" type="Ref" template="NiPhysXBodyDesc">Unknown</add> - <add name="Unknown Int 4" type="float">Unknown</add> - <add name="Unknown Int 5" type="int">Unknown</add> - <add name="Unknown Byte 1" type="byte">Unknown</add> - <add name="Unknown Byte 2" type="byte">Unknown</add> - <add name="Unknown Int 6" type="int">Unknown</add> - <add name="Shape Description" type="Ref" template="NiPhysXShapeDesc">PhysX Shape Description</add> - <add name="Unknown Ref 1" type="Ref" template="NiObject">Unknown</add> - <add name="Unknown Ref 2" type="Ref" template="NiObject">Unknown</add> - <add name="Unknown Refs 3" type="Ref" template="NiObject" arr1="Unknown Int 6">Unknown</add> - </niobject> + For serializing NxActor objects. + <add name="Actor Name" type="string" /> + <add name="Num Poses" type="uint" /> + <add name="Poses" type="Matrix34" arr1="Num Poses" /> + <add name="Body Desc" type="Ref" template="NiPhysXBodyDesc" /> + <add name="Density" type="float" /> + <add name="Actor Flags" type="uint" /> + <add name="Actor Group" type="ushort" /> + <add name="Dominance Group" type="ushort" ver1="20.4.0.0" /> + <add name="Contact Report Flags" type="uint" ver1="20.4.0.0" /> + <add name="Force Field Material" type="ushort" ver1="20.4.0.0" /> + <add name="Dummy" type="uint" ver1="20.3.0.1" ver2="20.3.0.5" /> + <add name="Num Shape Descs" type="uint" /> + <add name="Shape Descriptions" type="Ref" template="NiPhysXShapeDesc" arr1="Num Shape Descs" /> + <add name="Actor Parent" type="Ref" template="NiPhysXActorDesc" /> + <add name="Source" type="Ref" template="NiPhysXRigidBodySrc" /> + <add name="Dest" type="Ref" template="NiPhysXRigidBodyDest" /> + </niobject> + + <compound name="PhysXBodyStoredVels"> + <add name="Linear Velocity" type="Vector3" /> + <add name="Angular Velocity" type="Vector3" /> + <add name="Sleep" type="bool" ver1="30.2.0.3" /> + </compound> <niobject name="NiPhysXBodyDesc" inherit="NiObject"> - Unknown PhysX node. - <add name="Unknown Bytes" type="byte" arr1="136" ver1="20.3.0.6">Unknown</add> - </niobject> + For serializing NxBodyDesc objects. + <add name="Local Pose" type="Matrix34" /> + <add name="Space Inertia" type="Vector3" /> + <add name="Mass" type="float" /> + <add name="Num Vels" type="uint" /> + <add name="Vels" type="PhysXBodyStoredVels" arr1="Num Vels" /> + <add name="Wake Up Counter" type="float" /> + <add name="Linear Damping" type="float" /> + <add name="Angular Damping" type="float" /> + <add name="Max Angular Velocity" type="float" /> + <add name="CCD Motion Threshold" type="float" /> + <add name="Flags" type="uint" /> + <add name="Sleep Linear Velocity" type="float" /> + <add name="Sleep Angular Velocity" type="float" /> + <add name="Solver Iteration Count" type="uint" /> + <add name="Sleep Energy Threshold" type="float" ver1="20.3.0.0" /> + <add name="Sleep Damping" type="float" ver1="20.3.0.0" /> + <add name="Contact Report Threshold" type="float" /> + </niobject> + + <enum name="NxJointType" storage="uint"> + <option name="NX_JOINT_PRISMATIC" value="0" /> + <option name="NX_JOINT_REVOLUTE" value="1" /> + <option name="NX_JOINT_CYLINDRICAL" value="2" /> + <option name="NX_JOINT_SPHERICAL" value="3" /> + <option name="NX_JOINT_POINT_ON_LINE" value="4" /> + <option name="NX_JOINT_POINT_IN_PLANE" value="5" /> + <option name="NX_JOINT_DISTANCE" value="6" /> + <option name="NX_JOINT_PULLEY" value="7" /> + <option name="NX_JOINT_FIXED" value="8" /> + <option name="NX_JOINT_D6" value="9" /> + </enum> - <niobject name="NiPhysXD6JointDesc" inherit="NiObject"> - Unknown PhysX node. - <add name="Unknown Bytes" type="byte" arr1="388" ver1="20.3.0.6">Unknown</add> - </niobject> + <enum name="NxD6JointMotion" storage="uint"> + <option name="NX_D6JOINT_MOTION_LOCKED" value="0" /> + <option name="NX_D6JOINT_MOTION_LIMITED" value="1" /> + <option name="NX_D6JOINT_MOTION_FREE" value="2" /> + </enum> + + <enum name="NxD6JointDriveType" storage="uint"> + <option name="NX_D6JOINT_DRIVE_POSITION" value="1" /> + <option name="NX_D6JOINT_DRIVE_VELOCITY" value="2" /> + </enum> + + <enum name="NxJointProjectionMode" storage="uint"> + <option name="NX_JPM_NONE" value="0" /> + <option name="NX_JPM_POINT_MINDIST" value="1" /> + <option name="NX_JPM_LINEAR_MINDIST" value="2" /> + </enum> + + <compound name="NiPhysXJointActor"> + <add name="Actor" type="Ref" template="NiPhysXActorDesc" /> + <add name="Local Normal" type="Vector3" /> + <add name="Local Axis" type="Vector3" /> + <add name="Local Anchor" type="Vector3" /> + </compound> + + <compound name="NxJointLimitSoftDesc"> + <add name="Value" type="float" /> + <add name="Restitution" type="float" /> + <add name="Spring" type="float" /> + <add name="Damping" type="float" /> + </compound> + + <compound name="NxJointDriveDesc"> + <add name="Drive Type" type="NxD6JointDriveType" /> + <add name="Restitution" type="float" /> + <add name="Spring" type="float" /> + <add name="Damping" type="float" /> + </compound> + + <compound name="NiPhysXJointLimit"> + <add name="Limit Plane Normal" type="Vector3" /> + <add name="Limit Plane D" type="float" /> + <add name="Limit Plane R" type="float" ver1="20.4.0.0" /> + </compound> + + <niobject name="NiPhysXJointDesc" inherit="NiObject" abstract="1"> + A PhysX Joint abstract base class. + <add name="Joint Type" type="NxJointType" /> + <add name="Joint Name" type="string" /> + <add name="Actors" type="NiPhysXJointActor" arr1="2" /> + <add name="Max Force" type="float" /> + <add name="Max Torque" type="float" /> + <add name="Solver Extrapolation Factor" type="float" ver1="20.5.0.3" /> + <add name="Use Acceleration Spring" type="uint" ver1="20.5.0.3" /> + <add name="Joint Flags" type="uint" /> + <add name="Limit Point" type="Vector3" /> + <add name="Num Limits" type="uint" /> + <add name="Limits" type="NiPhysXJointLimit" arr1="Num Limits" /> + </niobject> + + <niobject name="NiPhysXD6JointDesc" inherit="NiPhysXJointDesc"> + A 6DOF (6 degrees of freedom) joint. + <add name="X Motion" type="NxD6JointMotion" /> + <add name="Y Motion" type="NxD6JointMotion" /> + <add name="Z Motion" type="NxD6JointMotion" /> + <add name="Swing 1 Motion" type="NxD6JointMotion" /> + <add name="Swing 2 Motion" type="NxD6JointMotion" /> + <add name="Twist Motion" type="NxD6JointMotion" /> + <add name="Linear Limit" type="NxJointLimitSoftDesc" /> + <add name="Swing 1 Limit" type="NxJointLimitSoftDesc" /> + <add name="Swing 2 Limit" type="NxJointLimitSoftDesc" /> + <add name="Twist Low Limit" type="NxJointLimitSoftDesc" /> + <add name="Twist High Limit" type="NxJointLimitSoftDesc" /> + <add name="X Drive" type="NxJointDriveDesc" /> + <add name="Y Drive" type="NxJointDriveDesc" /> + <add name="Z Drive" type="NxJointDriveDesc" /> + <add name="Swing Drive" type="NxJointDriveDesc" /> + <add name="Twist Drive" type="NxJointDriveDesc" /> + <add name="Slerp Drive" type="NxJointDriveDesc" /> + <add name="Drive Position" type="Vector3" /> + <add name="Drive Orientation" type="Quaternion" /> + <add name="Drive Linear Velocity" type="Vector3" /> + <add name="Drive Angular Velocity" type="Vector3" /> + <add name="Projection Mode" type="NxJointProjectionMode" /> + <add name="Projection Distance" type="float" /> + <add name="Projection Angle" type="float" /> + <add name="Gear Ratio" type="float" /> + <add name="Flags" type="uint" /> + </niobject> + + <enum name="NxShapeType" storage="uint"> + <option name="NX_SHAPE_PLANE" value="0" /> + <option name="NX_SHAPE_SPHERE" value="1" /> + <option name="NX_SHAPE_BOX" value="2" /> + <option name="NX_SHAPE_CAPSULE" value="3" /> + <option name="NX_SHAPE_WHEEL" value="4" /> + <option name="NX_SHAPE_CONVEX" value="5" /> + <option name="NX_SHAPE_MESH" value="6" /> + <option name="NX_SHAPE_HEIGHTFIELD" value="7" /> + <option name="NX_SHAPE_RAW_MESH" value="8" /> + <option name="NX_SHAPE_COMPOUND" value="9" /> + </enum> + + <compound name="NxPlane"> + <add name="Val 1" type="float" /> + <add name="Point 1" type="Vector3" /> + </compound> + + <compound name="NxCapsule"> + <add name="Val 1" type="float" /> + <add name="Val 2" type="float" /> + <add name="Capsule Flags" type="uint" /> + </compound> <niobject name="NiPhysXShapeDesc" abstract="0" inherit="NiObject"> - Unknown PhysX node. - <add name="Unknown Int 1" type="int">Unknown</add> - <add name="Unknown Quat 1" type="Quaternion">Unknown</add> - <add name="Unknown Quat 2" type="Quaternion">Unknown</add> - <add name="Unknown Quat 3" type="Quaternion">Unknown</add> - <add name="Unknown Short 1" type="short">Unknown</add> - <add name="Unknown Int 2" type="int">Unknown</add> - <add name="Unknown Short 2" type="short">Unknown</add> - <add name="Unknown Float 1" type="float">Unknown</add> - <add name="Unknown Float 2" type="float">Unknown</add> - <add name="Unknown Float 3" type="float">Unknown</add> - <add name="Unknown Int 3" type="int">Unknown</add> - <add name="Unknown Int 4" type="int">Unknown</add> - <add name="Unknown Int 5" type="int">Unknown</add> - <add name="Unknown Int 7" type="int">Unknown</add> - <add name="Unknown Int 8" type="int">Unknown</add> - <!--<add name="Unknown Bytes 1" type="byte" arr1="8" ver1="20.3.0.6">Unknown. Wrong, but better than nothing.</add>--> - <add name="Mesh Description" type="Ref" template="NiPhysXMeshDesc">PhysX Mesh Description</add> - <!-- todo: fix invalid link failure on Ficus.nif from the emerge demo --> + For serializing NxShapeDesc objects + <add name="Shape Type" type="NxShapeType" /> + <add name="Local Pose" type="Matrix34" /> + <add name="Shape Flags" type="uint" /> + <add name="Collision Group" type="ushort" /> + <add name="Material Index" type="ushort" /> + <add name="Density" type="float" /> + <add name="Mass" type="float" /> + <add name="Skin Width" type="float" /> + <add name="Shape Name" type="string" /> + <add name="Non-Interacting Compartment Types" type="uint" ver1="20.4.0.0" /> + <add name="Collision Bits" type="uint" arr1="4" /> + <add name="Shape" type="NxPlane" cond="Shape Type == 0" /> + <add name="Sphere Radius" type="float" cond="Shape Type == 1" /> + <add name="Box Half Extents" type="Vector3" cond="Shape Type == 2" /> + <add name="Shape" type="NxCapsule" cond="Shape Type == 3" /> + <add name="Shape" type="Ref" template="NiPhysXMeshDesc" cond="(Shape Type == 5) || (Shape Type == 6)" /> </niobject> <niobject name="NiPhysXMeshDesc" abstract="0" inherit="NiObject"> - Unknown PhysX node. - <add name="Unknown Short 1" type="short">Unknown</add> - <add name="Unknown Float 1" type="float">Unknown</add> - <add name="Unknown Short 2" type="short">Unknown</add> - <add name="Unknown Bytes 0" type="byte" arr1="3">NXS</add> - <add name="Unknown Byte 1" type="byte">Unknown</add> - <add name="Unknown Bytes 1" type="byte" arr1="4">MESH</add> - <add name="Unknown Bytes 2" type="byte" arr1="8">Unknown</add> - <add name="Unknown Float 2" type="float">Unknown</add> - <add name="Unknown Int 1" type="int">Unknown</add> - <add name="Unknown Int 2" type="int">Unknown</add> - <add name="Num Vertices" type="int">Number of mesh vertices</add> - <add name="Unknown Int 4" type="int">Unknown</add> - <add name="Vertices" type="Vector3" arr1="Num Vertices">Vertices</add> - <add name="Unknown Bytes 3" type="byte" arr1="982">Unknown</add> - <add name="Unknown Shorts 1" type="short" arr1="368">Unknown</add> - <add name="Unknown Ints 1" type="uint" arr1="3328">Unknown</add> - <add name="Unknown Byte 2" type="byte">Unknown</add> - </niobject> + Holds mesh data for streaming. + <add name="Is Convex" type="bool" ver2="20.3.0.4" /> + <add name="Mesh Name" type="string" /> + <add name="Mesh Data" type="ByteArray" /> + <add name="Mesh Size" type="ushort" ver1="20.3.0.5" ver2="30.2.0.2" /> + <add name="Mesh Data" type="ushort" arr1="Mesh Size" ver1="20.3.0.5" ver2="30.2.0.2" /> + <add name="Mesh Flags" type="uint" /> + <add name="Mesh Paging Mode" type="uint" ver1="20.3.0.1" /> + <add name="Is Hardware" type="bool" ver1="20.3.0.2" ver2="20.3.0.4" /> + <add name="Flags" type="byte" ver1="20.3.0.5" /> + </niobject> + + <bitflags name="NxMaterialFlag" storage="uint"> + <option name="NX_MF_ANISOTROPIC" value="1" /> + <option name="NX_MF_DUMMY1" value="2" /> + <option name="NX_MF_DUMMY2" value="3" /> + <option name="NX_MF_DUMMY3" value="4" /> + <option name="NX_MF_DISABLE_FRICTION" value="5" /> + <option name="NX_MF_DISABLE_STRONG_FRICTION" value="6" /> + </bitflags> + + <compound name="NxSpringDesc"> + <add name="Spring" type="float" /> + <add name="Damper" type="float" /> + <add name="Target Value" type="float" /> + </compound> + + <enum name="NxCombineMode" storage="uint"> + <option name="NX_CM_AVERAGE" value="0" /> + <option name="NX_CM_MIN" value="1" /> + <option name="NX_CM_MULTIPLY" value="2" /> + <option name="NX_CM_MAX" value="3" /> + </enum> + + <compound name="NxMaterialDesc"> + <add name="Dynamic Friction" type="float" /> + <add name="Static Friction" type="float" /> + <add name="Restitution" type="float" /> + <add name="Dynamic Friction V" type="float" /> + <add name="Static Friction V" type="float" /> + <add name="Direction of Anisotropy" type="Vector3" /> + <add name="Flags" type="NxMaterialFlag" /> + <add name="Friction Combine Mode" type="NxCombineMode" /> + <add name="Restitution Combine Mode" type="NxCombineMode" /> + <add name="Has Spring" type="bool" ver2="20.2.3.0" /> + <add name="Spring" type="NxSpringDesc" ver2="20.2.3.0" cond="Has Spring" /> + </compound> <niobject name="NiPhysXMaterialDesc" abstract="0" inherit="NiObject"> - Unknown node. - <add name="Unknown Int" type="uint" arr1="12">Unknown</add> - <add name="Unknown Byte 1" type="byte">Unknown</add> - <add name="Unknown Byte 2" type="byte">Unknown</add> + For serializing NxMaterialDesc objects. + <add name="Index" type="ushort" /> + <add name="Num States" type="uint" /> + <add name="Material Descs" type="NxMaterialDesc" arr1="Num States" /> </niobject> - <niobject name="NiPhysXKinematicSrc" inherit="NiObject"> - Unknown PhysX node. - <add name="Unknown Bytes" type="byte" arr1="6" ver1="20.3.0.6">Unknown</add> + <niobject name="NiPhysXDest" inherit="NiObject" abstract="1"> + A destination is a link between a PhysX actor and a Gamebryo object being driven by the physics. + <add name="Active" type="bool" /> + <add name="Interpolate" type="bool" /> </niobject> - <niobject name="NiPhysXTransformDest" inherit="NiObject"> - Unknown PhysX node. - <add name="Unknown Byte 1" type="byte">Unknown. =1?</add> - <add name="Unknown Byte 2" type="byte">Unknown. =0</add> - <add name="Node" type="Ptr" template="NiNode" >Affected node?</add> + <niobject name="NiPhysXRigidBodyDest" inherit="NiPhysXDest" abstract="1"> + Base for destinations that set a rigid body state. + </niobject> + + <niobject name="NiPhysXTransformDest" inherit="NiPhysXRigidBodyDest"> + Connects PhysX rigid body actors to a scene node. + <add name="Target" type="Ptr" template="NiAVObject" /> + </niobject> + + <niobject name="NiPhysXSrc" inherit="NiObject" abstract="1"> + A source is a link between a Gamebryo object and a PhysX actor. + <add name="Active" type="bool" /> + <add name="Interpolate" type="bool" /> + </niobject> + + <niobject name="NiPhysXRigidBodySrc" inherit="NiPhysXSrc" abstract="1"> + Sets state of a rigid body PhysX actor. + <add name="Source" type="Ptr" template="NiAVObject" /> + </niobject> + + <niobject name="NiPhysXKinematicSrc" inherit="NiPhysXRigidBodySrc"> + Sets state of kinematic PhysX actor. + </niobject> + <niobject name="NiPhysXDynamicSrc" inherit="NiPhysXRigidBodySrc"> + Sends Gamebryo scene state to a PhysX dynamic actor. </niobject> <niobject name="NiArkAnimationExtraData" inherit="NiExtraData">