mirror of https://github.com/zeldaret/botw.git
ksys/phys: Rename MotionAccessor classes to reflect entity/sensor split
This commit is contained in:
parent
8dd5608b79
commit
a2cba75b19
|
@ -82977,7 +82977,7 @@ Address,Quality,Size,Name
|
|||
0x0000007100f8d210,O,000012,_ZNK4ksys4phys9RigidBody16isMotionFlag2SetEv
|
||||
0x0000007100f8d21c,O,000236,_ZN4ksys4phys9RigidBody14sub_7100F8D21CEv
|
||||
0x0000007100f8d308,U,000888,phys::RigidBody::x_6
|
||||
0x0000007100f8d680,O,000140,_ZNK4ksys4phys9RigidBody17getMotionAccessorEv
|
||||
0x0000007100f8d680,O,000140,_ZNK4ksys4phys9RigidBody23getEntityMotionAccessorEv
|
||||
0x0000007100f8d70c,O,000156,_ZNK4ksys4phys9RigidBody18getLinkedRigidBodyEv
|
||||
0x0000007100f8d7a8,O,000152,_ZNK4ksys4phys9RigidBody20resetLinkedRigidBodyEv
|
||||
0x0000007100f8d840,U,001156,phys::RigidBody::x_8
|
||||
|
@ -83036,7 +83036,7 @@ Address,Quality,Size,Name
|
|||
0x0000007100f90094,U,000968,phys::RigidBody::x_3
|
||||
0x0000007100f9045c,U,001132,phys::RigidBody::x_39
|
||||
0x0000007100f908c8,U,001632,phys::RigidBody::x_40
|
||||
0x0000007100f90f28,O,000140,_ZNK4ksys4phys9RigidBody25getMotionAccessorForProxyEv
|
||||
0x0000007100f90f28,O,000140,_ZNK4ksys4phys9RigidBody32getEntityMotionAccessorForSensorEv
|
||||
0x0000007100f90fb4,U,000332,phys::RigidBody::x_41
|
||||
0x0000007100f91100,U,000140,phys::RigidBody::x_42
|
||||
0x0000007100f9118c,O,000032,_ZNK4ksys4phys9RigidBody17getLinearVelocityEPN4sead7Vector3IfEE
|
||||
|
@ -83358,92 +83358,92 @@ Address,Quality,Size,Name
|
|||
0x0000007100fa195c,U,000008,
|
||||
0x0000007100fa1964,U,000288,
|
||||
0x0000007100fa1a84,U,000092,
|
||||
0x0000007100fa1ae0,O,000188,_ZN4ksys4phys15RigidBodyMotionC1EPNS0_9RigidBodyE
|
||||
0x0000007100fa1b9c,O,000072,_ZN4ksys4phys15RigidBodyMotionD1Ev
|
||||
0x0000007100fa1be4,O,000080,_ZN4ksys4phys15RigidBodyMotionD0Ev
|
||||
0x0000007100fa1c34,O,000172,_ZN4ksys4phys15RigidBodyMotion4initERKNS0_22RigidBodyInstanceParamEPN4sead4HeapE
|
||||
0x0000007100fa1ce0,O,000496,_ZN4ksys4phys15RigidBodyMotion12setTransformERKN4sead8Matrix34IfEEb
|
||||
0x0000007100fa1ed0,O,000288,_ZN4ksys4phys15RigidBodyMotion11setPositionERKN4sead7Vector3IfEEb
|
||||
0x0000007100fa1ff0,O,000076,_ZN4ksys4phys15RigidBodyMotion11getPositionEPN4sead7Vector3IfEE
|
||||
0x0000007100fa203c,O,000092,_ZN4ksys4phys15RigidBodyMotion11getRotationEPN4sead4QuatIfEE
|
||||
0x0000007100fa2098,O,000168,_ZN4ksys4phys15RigidBodyMotion12getTransformEPN4sead8Matrix34IfEE
|
||||
0x0000007100fa2140,O,000124,_ZN4ksys4phys15RigidBodyMotion22setCenterOfMassInLocalERKN4sead7Vector3IfEE
|
||||
0x0000007100fa21bc,O,000024,_ZN4ksys4phys15RigidBodyMotion22getCenterOfMassInLocalEPN4sead7Vector3IfEE
|
||||
0x0000007100fa21d4,O,000220,_ZN4ksys4phys15RigidBodyMotion17setLinearVelocityERKN4sead7Vector3IfEEf
|
||||
0x0000007100fa22b0,O,000172,_ZN4ksys4phys15RigidBodyMotion17setLinearVelocityERK10hkVector4ff
|
||||
0x0000007100fa235c,O,000076,_ZN4ksys4phys15RigidBodyMotion17getLinearVelocityEPN4sead7Vector3IfEE
|
||||
0x0000007100fa23a8,O,000220,_ZN4ksys4phys15RigidBodyMotion18setAngularVelocityERKN4sead7Vector3IfEEf
|
||||
0x0000007100fa2484,O,000172,_ZN4ksys4phys15RigidBodyMotion18setAngularVelocityERK10hkVector4ff
|
||||
0x0000007100fa2530,O,000076,_ZN4ksys4phys15RigidBodyMotion18getAngularVelocityEPN4sead7Vector3IfEE
|
||||
0x0000007100fa257c,O,000060,_ZN4ksys4phys15RigidBodyMotion20setMaxLinearVelocityEf
|
||||
0x0000007100fa25b8,O,000060,_ZN4ksys4phys15RigidBodyMotion20getMaxLinearVelocityEv
|
||||
0x0000007100fa25f4,O,000060,_ZN4ksys4phys15RigidBodyMotion21setMaxAngularVelocityEf
|
||||
0x0000007100fa2630,O,000060,_ZN4ksys4phys15RigidBodyMotion21getMaxAngularVelocityEv
|
||||
0x0000007100fa266c,O,000272,_ZN4ksys4phys15RigidBodyMotion18applyLinearImpulseERKN4sead7Vector3IfEE
|
||||
0x0000007100fa277c,O,000308,_ZN4ksys4phys15RigidBodyMotion19applyAngularImpulseERKN4sead7Vector3IfEE
|
||||
0x0000007100fa28b0,O,000460,_ZN4ksys4phys15RigidBodyMotion17applyPointImpulseERKN4sead7Vector3IfEES6_
|
||||
0x0000007100fa2a7c,O,000168,_ZN4ksys4phys15RigidBodyMotion7setMassEf
|
||||
0x0000007100fa2b24,O,000028,_ZNK4ksys4phys15RigidBodyMotion7getMassEv
|
||||
0x0000007100fa2b40,O,000040,_ZNK4ksys4phys15RigidBodyMotion10getMassInvEv
|
||||
0x0000007100fa2b68,O,000776,_ZN4ksys4phys15RigidBodyMotion15setInertiaLocalERKN4sead7Vector3IfEE
|
||||
0x0000007100fa2e70,O,000040,_ZNK4ksys4phys15RigidBodyMotion16getGravityFactorEv
|
||||
0x0000007100fa2e98,O,000420,_ZN4ksys4phys15RigidBodyMotion32updateRigidBodyMotionExceptStateEv
|
||||
0x0000007100fa303c,O,000112,_ZNK4ksys4phys15RigidBodyMotion15getInertiaLocalEPN4sead7Vector3IfEE
|
||||
0x0000007100fa30ac,O,000176,_ZN4ksys4phys15RigidBodyMotion16setLinearDampingEf
|
||||
0x0000007100fa315c,O,000040,_ZNK4ksys4phys15RigidBodyMotion16getLinearDampingEv
|
||||
0x0000007100fa3184,O,000176,_ZN4ksys4phys15RigidBodyMotion17setAngularDampingEf
|
||||
0x0000007100fa3234,O,000040,_ZNK4ksys4phys15RigidBodyMotion17getAngularDampingEv
|
||||
0x0000007100fa325c,O,000132,_ZN4ksys4phys15RigidBodyMotion16setGravityFactorEf
|
||||
0x0000007100fa32e0,O,000036,_ZN4ksys4phys15RigidBodyMotion13setTimeFactorEf
|
||||
0x0000007100fa3304,O,000020,_ZN4ksys4phys15RigidBodyMotion13getTimeFactorEv
|
||||
0x0000007100fa3318,O,000068,_ZN4ksys4phys15RigidBodyMotion11getRotationEP13hkQuaternionf
|
||||
0x0000007100fa335c,O,000396,_ZN4ksys4phys15RigidBodyMotion18processUpdateFlagsEv
|
||||
0x0000007100fa34e8,O,000392,_ZN4ksys4phys15RigidBodyMotion38updateRigidBodyMotionExceptStateAndVelEv
|
||||
0x0000007100fa3670,O,000404,_ZN4ksys4phys15RigidBodyMotion16registerAccessorEPNS0_20RigidBodyMotionProxyE
|
||||
0x0000007100fa3804,O,000188,_ZN4ksys4phys15RigidBodyMotion18deregisterAccessorEPNS0_20RigidBodyMotionProxyE
|
||||
0x0000007100fa38c0,O,000156,_ZN4ksys4phys15RigidBodyMotion22deregisterAllAccessorsEv
|
||||
0x0000007100fa395c,O,000164,_ZN4ksys4phys15RigidBodyMotion30copyTransformToAllLinkedBodiesEv
|
||||
0x0000007100fa3a00,O,000124,_ZN4ksys4phys15RigidBodyMotion27copyMotionToAllLinkedBodiesEv
|
||||
0x0000007100fa3a7c,O,000520,_ZN4ksys4phys15RigidBodyMotion6freezeEbbb
|
||||
0x0000007100fa3c84,O,000204,_ZNK4ksys4phys15RigidBodyMotion27checkDerivedRuntimeTypeInfoEPKN4sead15RuntimeTypeInfo9InterfaceE
|
||||
0x0000007100fa3d50,O,000092,_ZNK4ksys4phys15RigidBodyMotion18getRuntimeTypeInfoEv
|
||||
0x0000007100fa3dac,O,000020,_ZN4ksys4phys15RigidBodyMotion16resetFrozenStateEv
|
||||
0x0000007100fa1ae0,O,000188,_ZN4ksys4phys21RigidBodyMotionEntityC1EPNS0_9RigidBodyE
|
||||
0x0000007100fa1b9c,O,000072,_ZN4ksys4phys21RigidBodyMotionEntityD1Ev
|
||||
0x0000007100fa1be4,O,000080,_ZN4ksys4phys21RigidBodyMotionEntityD0Ev
|
||||
0x0000007100fa1c34,O,000172,_ZN4ksys4phys21RigidBodyMotionEntity4initERKNS0_22RigidBodyInstanceParamEPN4sead4HeapE
|
||||
0x0000007100fa1ce0,O,000496,_ZN4ksys4phys21RigidBodyMotionEntity12setTransformERKN4sead8Matrix34IfEEb
|
||||
0x0000007100fa1ed0,O,000288,_ZN4ksys4phys21RigidBodyMotionEntity11setPositionERKN4sead7Vector3IfEEb
|
||||
0x0000007100fa1ff0,O,000076,_ZN4ksys4phys21RigidBodyMotionEntity11getPositionEPN4sead7Vector3IfEE
|
||||
0x0000007100fa203c,O,000092,_ZN4ksys4phys21RigidBodyMotionEntity11getRotationEPN4sead4QuatIfEE
|
||||
0x0000007100fa2098,O,000168,_ZN4ksys4phys21RigidBodyMotionEntity12getTransformEPN4sead8Matrix34IfEE
|
||||
0x0000007100fa2140,O,000124,_ZN4ksys4phys21RigidBodyMotionEntity22setCenterOfMassInLocalERKN4sead7Vector3IfEE
|
||||
0x0000007100fa21bc,O,000024,_ZN4ksys4phys21RigidBodyMotionEntity22getCenterOfMassInLocalEPN4sead7Vector3IfEE
|
||||
0x0000007100fa21d4,O,000220,_ZN4ksys4phys21RigidBodyMotionEntity17setLinearVelocityERKN4sead7Vector3IfEEf
|
||||
0x0000007100fa22b0,O,000172,_ZN4ksys4phys21RigidBodyMotionEntity17setLinearVelocityERK10hkVector4ff
|
||||
0x0000007100fa235c,O,000076,_ZN4ksys4phys21RigidBodyMotionEntity17getLinearVelocityEPN4sead7Vector3IfEE
|
||||
0x0000007100fa23a8,O,000220,_ZN4ksys4phys21RigidBodyMotionEntity18setAngularVelocityERKN4sead7Vector3IfEEf
|
||||
0x0000007100fa2484,O,000172,_ZN4ksys4phys21RigidBodyMotionEntity18setAngularVelocityERK10hkVector4ff
|
||||
0x0000007100fa2530,O,000076,_ZN4ksys4phys21RigidBodyMotionEntity18getAngularVelocityEPN4sead7Vector3IfEE
|
||||
0x0000007100fa257c,O,000060,_ZN4ksys4phys21RigidBodyMotionEntity20setMaxLinearVelocityEf
|
||||
0x0000007100fa25b8,O,000060,_ZN4ksys4phys21RigidBodyMotionEntity20getMaxLinearVelocityEv
|
||||
0x0000007100fa25f4,O,000060,_ZN4ksys4phys21RigidBodyMotionEntity21setMaxAngularVelocityEf
|
||||
0x0000007100fa2630,O,000060,_ZN4ksys4phys21RigidBodyMotionEntity21getMaxAngularVelocityEv
|
||||
0x0000007100fa266c,O,000272,_ZN4ksys4phys21RigidBodyMotionEntity18applyLinearImpulseERKN4sead7Vector3IfEE
|
||||
0x0000007100fa277c,O,000308,_ZN4ksys4phys21RigidBodyMotionEntity19applyAngularImpulseERKN4sead7Vector3IfEE
|
||||
0x0000007100fa28b0,O,000460,_ZN4ksys4phys21RigidBodyMotionEntity17applyPointImpulseERKN4sead7Vector3IfEES6_
|
||||
0x0000007100fa2a7c,O,000168,_ZN4ksys4phys21RigidBodyMotionEntity7setMassEf
|
||||
0x0000007100fa2b24,O,000028,_ZNK4ksys4phys21RigidBodyMotionEntity7getMassEv
|
||||
0x0000007100fa2b40,O,000040,_ZNK4ksys4phys21RigidBodyMotionEntity10getMassInvEv
|
||||
0x0000007100fa2b68,O,000776,_ZN4ksys4phys21RigidBodyMotionEntity15setInertiaLocalERKN4sead7Vector3IfEE
|
||||
0x0000007100fa2e70,O,000040,_ZNK4ksys4phys21RigidBodyMotionEntity16getGravityFactorEv
|
||||
0x0000007100fa2e98,O,000420,_ZN4ksys4phys21RigidBodyMotionEntity32updateRigidBodyMotionExceptStateEv
|
||||
0x0000007100fa303c,O,000112,_ZNK4ksys4phys21RigidBodyMotionEntity15getInertiaLocalEPN4sead7Vector3IfEE
|
||||
0x0000007100fa30ac,O,000176,_ZN4ksys4phys21RigidBodyMotionEntity16setLinearDampingEf
|
||||
0x0000007100fa315c,O,000040,_ZNK4ksys4phys21RigidBodyMotionEntity16getLinearDampingEv
|
||||
0x0000007100fa3184,O,000176,_ZN4ksys4phys21RigidBodyMotionEntity17setAngularDampingEf
|
||||
0x0000007100fa3234,O,000040,_ZNK4ksys4phys21RigidBodyMotionEntity17getAngularDampingEv
|
||||
0x0000007100fa325c,O,000132,_ZN4ksys4phys21RigidBodyMotionEntity16setGravityFactorEf
|
||||
0x0000007100fa32e0,O,000036,_ZN4ksys4phys21RigidBodyMotionEntity13setTimeFactorEf
|
||||
0x0000007100fa3304,O,000020,_ZN4ksys4phys21RigidBodyMotionEntity13getTimeFactorEv
|
||||
0x0000007100fa3318,O,000068,_ZN4ksys4phys21RigidBodyMotionEntity11getRotationEP13hkQuaternionf
|
||||
0x0000007100fa335c,O,000396,_ZN4ksys4phys21RigidBodyMotionEntity18processUpdateFlagsEv
|
||||
0x0000007100fa34e8,O,000392,_ZN4ksys4phys21RigidBodyMotionEntity38updateRigidBodyMotionExceptStateAndVelEv
|
||||
0x0000007100fa3670,O,000404,_ZN4ksys4phys21RigidBodyMotionEntity16registerAccessorEPNS0_21RigidBodyMotionSensorE
|
||||
0x0000007100fa3804,O,000188,_ZN4ksys4phys21RigidBodyMotionEntity18deregisterAccessorEPNS0_21RigidBodyMotionSensorE
|
||||
0x0000007100fa38c0,O,000156,_ZN4ksys4phys21RigidBodyMotionEntity22deregisterAllAccessorsEv
|
||||
0x0000007100fa395c,O,000164,_ZN4ksys4phys21RigidBodyMotionEntity30copyTransformToAllLinkedBodiesEv
|
||||
0x0000007100fa3a00,O,000124,_ZN4ksys4phys21RigidBodyMotionEntity27copyMotionToAllLinkedBodiesEv
|
||||
0x0000007100fa3a7c,O,000520,_ZN4ksys4phys21RigidBodyMotionEntity6freezeEbbb
|
||||
0x0000007100fa3c84,O,000204,_ZNK4ksys4phys21RigidBodyMotionEntity27checkDerivedRuntimeTypeInfoEPKN4sead15RuntimeTypeInfo9InterfaceE
|
||||
0x0000007100fa3d50,O,000092,_ZNK4ksys4phys21RigidBodyMotionEntity18getRuntimeTypeInfoEv
|
||||
0x0000007100fa3dac,O,000020,_ZN4ksys4phys21RigidBodyMotionEntity16resetFrozenStateEv
|
||||
0x0000007100fa3dc0,O,000088,_ZN16hkpMaxSizeMotionD0Ev
|
||||
0x0000007100fa3e18,O,000220,_ZN4ksys4phys20RigidBodyMotionProxyC1EPNS0_9RigidBodyE
|
||||
0x0000007100fa3ef4,O,000152,_ZN4ksys4phys20RigidBodyMotionProxyD1Ev
|
||||
0x0000007100fa3f8c,O,000144,_ZN4ksys4phys20RigidBodyMotionProxy20resetLinkedRigidBodyEv
|
||||
0x0000007100fa401c,O,000036,_ZN4ksys4phys20RigidBodyMotionProxyD0Ev
|
||||
0x0000007100fa4040,O,000032,_ZN4ksys4phys20RigidBodyMotionProxy4initERKNS0_22RigidBodyInstanceParamEPN4sead4HeapE
|
||||
0x0000007100fa4060,O,000332,_ZN4ksys4phys20RigidBodyMotionProxy12setTransformERKN4sead8Matrix34IfEEb
|
||||
0x0000007100fa41ac,O,000364,_ZN4ksys4phys20RigidBodyMotionProxy11setPositionERKN4sead7Vector3IfEEb
|
||||
0x0000007100fa4318,O,000636,_ZN4ksys4phys20RigidBodyMotionProxy26setTransformFromLinkedBodyERKN4sead8Matrix34IfEE
|
||||
0x0000007100fa4594,m,000920,_ZN4ksys4phys20RigidBodyMotionProxy26setTransformFromLinkedBodyERK10hkVector4fRK13hkQuaternionf
|
||||
0x0000007100fa492c,O,000096,_ZN4ksys4phys20RigidBodyMotionProxy11getPositionEPN4sead7Vector3IfEE
|
||||
0x0000007100fa498c,O,000260,_ZN4ksys4phys20RigidBodyMotionProxy11getRotationEPN4sead4QuatIfEE
|
||||
0x0000007100fa4a90,O,000188,_ZN4ksys4phys20RigidBodyMotionProxy12getTransformEPN4sead8Matrix34IfEE
|
||||
0x0000007100fa4b4c,O,000132,_ZN4ksys4phys20RigidBodyMotionProxy22setCenterOfMassInLocalERKN4sead7Vector3IfEE
|
||||
0x0000007100fa4bd0,O,000088,_ZN4ksys4phys20RigidBodyMotionProxy22getCenterOfMassInLocalEPN4sead7Vector3IfEE
|
||||
0x0000007100fa4c28,O,000132,_ZN4ksys4phys20RigidBodyMotionProxy17setLinearVelocityERKN4sead7Vector3IfEEf
|
||||
0x0000007100fa4cac,O,000064,_ZN4ksys4phys20RigidBodyMotionProxy17setLinearVelocityERK10hkVector4ff
|
||||
0x0000007100fa4cec,O,000088,_ZN4ksys4phys20RigidBodyMotionProxy17getLinearVelocityEPN4sead7Vector3IfEE
|
||||
0x0000007100fa4d44,O,000156,_ZN4ksys4phys20RigidBodyMotionProxy18setAngularVelocityERKN4sead7Vector3IfEEf
|
||||
0x0000007100fa4de0,O,000064,_ZN4ksys4phys20RigidBodyMotionProxy18setAngularVelocityERK10hkVector4ff
|
||||
0x0000007100fa4e20,O,000088,_ZN4ksys4phys20RigidBodyMotionProxy18getAngularVelocityEPN4sead7Vector3IfEE
|
||||
0x0000007100fa4e78,O,000012,_ZN4ksys4phys20RigidBodyMotionProxy20setMaxLinearVelocityEf
|
||||
0x0000007100fa4e84,O,000092,_ZN4ksys4phys20RigidBodyMotionProxy20getMaxLinearVelocityEv
|
||||
0x0000007100fa4ee0,O,000012,_ZN4ksys4phys20RigidBodyMotionProxy21setMaxAngularVelocityEf
|
||||
0x0000007100fa4eec,O,000092,_ZN4ksys4phys20RigidBodyMotionProxy21getMaxAngularVelocityEv
|
||||
0x0000007100fa4f48,O,000252,_ZN4ksys4phys20RigidBodyMotionProxy18setLinkedRigidBodyEPNS0_9RigidBodyE
|
||||
0x0000007100fa5044,O,000008,_ZNK4ksys4phys20RigidBodyMotionProxy18getLinkedRigidBodyEv
|
||||
0x0000007100fa504c,O,000012,_ZNK4ksys4phys20RigidBodyMotionProxy14isFlag40000SetEv
|
||||
0x0000007100fa5058,O,000812,_ZN4ksys4phys20RigidBodyMotionProxy29copyMotionFromLinkedRigidBodyEv
|
||||
0x0000007100fa5384,O,000088,_ZN4ksys4phys20RigidBodyMotionProxy11getRotationEP13hkQuaternionf
|
||||
0x0000007100fa53dc,O,000012,_ZN4ksys4phys20RigidBodyMotionProxy13setTimeFactorEf
|
||||
0x0000007100fa53e8,O,000008,_ZN4ksys4phys20RigidBodyMotionProxy13getTimeFactorEv
|
||||
0x0000007100fa53f0,O,000184,_ZN4ksys4phys20RigidBodyMotionProxy6freezeEbbb
|
||||
0x0000007100fa54a8,O,000204,_ZNK4ksys4phys20RigidBodyMotionProxy27checkDerivedRuntimeTypeInfoEPKN4sead15RuntimeTypeInfo9InterfaceE
|
||||
0x0000007100fa5574,O,000092,_ZNK4ksys4phys20RigidBodyMotionProxy18getRuntimeTypeInfoEv
|
||||
0x0000007100fa55d0,O,000012,_ZN4ksys4phys20RigidBodyMotionProxy16resetFrozenStateEv
|
||||
0x0000007100fa3e18,O,000220,_ZN4ksys4phys21RigidBodyMotionSensorC1EPNS0_9RigidBodyE
|
||||
0x0000007100fa3ef4,O,000152,_ZN4ksys4phys21RigidBodyMotionSensorD1Ev
|
||||
0x0000007100fa3f8c,O,000144,_ZN4ksys4phys21RigidBodyMotionSensor20resetLinkedRigidBodyEv
|
||||
0x0000007100fa401c,O,000036,_ZN4ksys4phys21RigidBodyMotionSensorD0Ev
|
||||
0x0000007100fa4040,O,000032,_ZN4ksys4phys21RigidBodyMotionSensor4initERKNS0_22RigidBodyInstanceParamEPN4sead4HeapE
|
||||
0x0000007100fa4060,O,000332,_ZN4ksys4phys21RigidBodyMotionSensor12setTransformERKN4sead8Matrix34IfEEb
|
||||
0x0000007100fa41ac,O,000364,_ZN4ksys4phys21RigidBodyMotionSensor11setPositionERKN4sead7Vector3IfEEb
|
||||
0x0000007100fa4318,O,000636,_ZN4ksys4phys21RigidBodyMotionSensor26setTransformFromLinkedBodyERKN4sead8Matrix34IfEE
|
||||
0x0000007100fa4594,m,000920,_ZN4ksys4phys21RigidBodyMotionSensor26setTransformFromLinkedBodyERK10hkVector4fRK13hkQuaternionf
|
||||
0x0000007100fa492c,O,000096,_ZN4ksys4phys21RigidBodyMotionSensor11getPositionEPN4sead7Vector3IfEE
|
||||
0x0000007100fa498c,O,000260,_ZN4ksys4phys21RigidBodyMotionSensor11getRotationEPN4sead4QuatIfEE
|
||||
0x0000007100fa4a90,O,000188,_ZN4ksys4phys21RigidBodyMotionSensor12getTransformEPN4sead8Matrix34IfEE
|
||||
0x0000007100fa4b4c,O,000132,_ZN4ksys4phys21RigidBodyMotionSensor22setCenterOfMassInLocalERKN4sead7Vector3IfEE
|
||||
0x0000007100fa4bd0,O,000088,_ZN4ksys4phys21RigidBodyMotionSensor22getCenterOfMassInLocalEPN4sead7Vector3IfEE
|
||||
0x0000007100fa4c28,O,000132,_ZN4ksys4phys21RigidBodyMotionSensor17setLinearVelocityERKN4sead7Vector3IfEEf
|
||||
0x0000007100fa4cac,O,000064,_ZN4ksys4phys21RigidBodyMotionSensor17setLinearVelocityERK10hkVector4ff
|
||||
0x0000007100fa4cec,O,000088,_ZN4ksys4phys21RigidBodyMotionSensor17getLinearVelocityEPN4sead7Vector3IfEE
|
||||
0x0000007100fa4d44,O,000156,_ZN4ksys4phys21RigidBodyMotionSensor18setAngularVelocityERKN4sead7Vector3IfEEf
|
||||
0x0000007100fa4de0,O,000064,_ZN4ksys4phys21RigidBodyMotionSensor18setAngularVelocityERK10hkVector4ff
|
||||
0x0000007100fa4e20,O,000088,_ZN4ksys4phys21RigidBodyMotionSensor18getAngularVelocityEPN4sead7Vector3IfEE
|
||||
0x0000007100fa4e78,O,000012,_ZN4ksys4phys21RigidBodyMotionSensor20setMaxLinearVelocityEf
|
||||
0x0000007100fa4e84,O,000092,_ZN4ksys4phys21RigidBodyMotionSensor20getMaxLinearVelocityEv
|
||||
0x0000007100fa4ee0,O,000012,_ZN4ksys4phys21RigidBodyMotionSensor21setMaxAngularVelocityEf
|
||||
0x0000007100fa4eec,O,000092,_ZN4ksys4phys21RigidBodyMotionSensor21getMaxAngularVelocityEv
|
||||
0x0000007100fa4f48,O,000252,_ZN4ksys4phys21RigidBodyMotionSensor18setLinkedRigidBodyEPNS0_9RigidBodyE
|
||||
0x0000007100fa5044,O,000008,_ZNK4ksys4phys21RigidBodyMotionSensor18getLinkedRigidBodyEv
|
||||
0x0000007100fa504c,O,000012,_ZNK4ksys4phys21RigidBodyMotionSensor14isFlag40000SetEv
|
||||
0x0000007100fa5058,O,000812,_ZN4ksys4phys21RigidBodyMotionSensor29copyMotionFromLinkedRigidBodyEv
|
||||
0x0000007100fa5384,O,000088,_ZN4ksys4phys21RigidBodyMotionSensor11getRotationEP13hkQuaternionf
|
||||
0x0000007100fa53dc,O,000012,_ZN4ksys4phys21RigidBodyMotionSensor13setTimeFactorEf
|
||||
0x0000007100fa53e8,O,000008,_ZN4ksys4phys21RigidBodyMotionSensor13getTimeFactorEv
|
||||
0x0000007100fa53f0,O,000184,_ZN4ksys4phys21RigidBodyMotionSensor6freezeEbbb
|
||||
0x0000007100fa54a8,O,000204,_ZNK4ksys4phys21RigidBodyMotionSensor27checkDerivedRuntimeTypeInfoEPKN4sead15RuntimeTypeInfo9InterfaceE
|
||||
0x0000007100fa5574,O,000092,_ZNK4ksys4phys21RigidBodyMotionSensor18getRuntimeTypeInfoEv
|
||||
0x0000007100fa55d0,O,000012,_ZN4ksys4phys21RigidBodyMotionSensor16resetFrozenStateEv
|
||||
0x0000007100fa55dc,O,000332,_ZN4ksys4phys19RigidBodyRequestMgrC1Ev
|
||||
0x0000007100fa5728,U,000484,phys::RigidBodyRequestMgr::x
|
||||
0x0000007100fa590c,O,000352,_ZN4ksys4phys19RigidBodyRequestMgrD1Ev
|
||||
|
|
Can't render this file because it is too large.
|
|
@ -23,10 +23,10 @@ target_sources(uking PRIVATE
|
|||
RigidBody/physRigidBodyAccessor.h
|
||||
RigidBody/physRigidBodyFactory.cpp
|
||||
RigidBody/physRigidBodyFactory.h
|
||||
RigidBody/physRigidBodyMotion.cpp
|
||||
RigidBody/physRigidBodyMotion.h
|
||||
RigidBody/physRigidBodyMotionProxy.cpp
|
||||
RigidBody/physRigidBodyMotionProxy.h
|
||||
RigidBody/physRigidBodyMotionEntity.cpp
|
||||
RigidBody/physRigidBodyMotionEntity.h
|
||||
RigidBody/physRigidBodyMotionSensor.cpp
|
||||
RigidBody/physRigidBodyMotionSensor.h
|
||||
RigidBody/physRigidBodyParam.cpp
|
||||
RigidBody/physRigidBodyParam.h
|
||||
RigidBody/physRigidBodyRequestMgr.cpp
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
#include <Havok/Physics2012/Dynamics/Motion/Rigid/hkpKeyframedRigidMotion.h>
|
||||
#include <cmath>
|
||||
#include "KingSystem/Physics/RigidBody/physMotionAccessor.h"
|
||||
#include "KingSystem/Physics/RigidBody/physRigidBodyMotion.h"
|
||||
#include "KingSystem/Physics/RigidBody/physRigidBodyMotionProxy.h"
|
||||
#include "KingSystem/Physics/RigidBody/physRigidBodyMotionEntity.h"
|
||||
#include "KingSystem/Physics/RigidBody/physRigidBodyMotionSensor.h"
|
||||
#include "KingSystem/Physics/RigidBody/physRigidBodyParam.h"
|
||||
#include "KingSystem/Physics/RigidBody/physRigidBodyRequestMgr.h"
|
||||
#include "KingSystem/Physics/System/physMemSystem.h"
|
||||
|
@ -61,9 +61,9 @@ RigidBody::~RigidBody() {
|
|||
|
||||
inline void RigidBody::createMotionAccessor(sead::Heap* heap) {
|
||||
if (isSensor())
|
||||
mMotionAccessor = new (heap) RigidBodyMotionProxy(this);
|
||||
mMotionAccessor = new (heap) RigidBodyMotionSensor(this);
|
||||
else
|
||||
mMotionAccessor = new (heap) RigidBodyMotion(this);
|
||||
mMotionAccessor = new (heap) RigidBodyMotionEntity(this);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
@ -213,34 +213,34 @@ void RigidBody::sub_7100F8D21C() {
|
|||
}
|
||||
}
|
||||
|
||||
RigidBodyMotion* RigidBody::getMotionAccessor() const {
|
||||
return sead::DynamicCast<RigidBodyMotion>(mMotionAccessor);
|
||||
RigidBodyMotionEntity* RigidBody::getEntityMotionAccessor() const {
|
||||
return sead::DynamicCast<RigidBodyMotionEntity>(mMotionAccessor);
|
||||
}
|
||||
|
||||
RigidBodyMotion* RigidBody::getMotionAccessorForProxy() const {
|
||||
return getMotionAccessor();
|
||||
RigidBodyMotionEntity* RigidBody::getEntityMotionAccessorForSensor() const {
|
||||
return getEntityMotionAccessor();
|
||||
}
|
||||
|
||||
RigidBodyMotionProxy* RigidBody::getMotionProxy() const {
|
||||
RigidBodyMotionSensor* RigidBody::getSensorMotionAccessor() const {
|
||||
if (!isSensor())
|
||||
return nullptr;
|
||||
if (!mMotionAccessor)
|
||||
return nullptr;
|
||||
return sead::DynamicCast<RigidBodyMotionProxy>(mMotionAccessor);
|
||||
return sead::DynamicCast<RigidBodyMotionSensor>(mMotionAccessor);
|
||||
}
|
||||
|
||||
RigidBody* RigidBody::getLinkedRigidBody() const {
|
||||
auto* proxy = getMotionProxy();
|
||||
if (!proxy)
|
||||
auto* accessor = getSensorMotionAccessor();
|
||||
if (!accessor)
|
||||
return nullptr;
|
||||
return proxy->getLinkedRigidBody();
|
||||
return accessor->getLinkedRigidBody();
|
||||
}
|
||||
|
||||
void RigidBody::resetLinkedRigidBody() const {
|
||||
auto* proxy = getMotionProxy();
|
||||
if (!proxy)
|
||||
auto* accessor = getSensorMotionAccessor();
|
||||
if (!accessor)
|
||||
return;
|
||||
proxy->resetLinkedRigidBody();
|
||||
accessor->resetLinkedRigidBody();
|
||||
}
|
||||
|
||||
MotionType RigidBody::getMotionType() const {
|
||||
|
@ -444,7 +444,7 @@ void RigidBody::applyLinearImpulse(const sead::Vector3f& impulse) {
|
|||
}
|
||||
|
||||
if (!isSensor())
|
||||
getMotionAccessor()->applyLinearImpulse(impulse);
|
||||
getEntityMotionAccessor()->applyLinearImpulse(impulse);
|
||||
}
|
||||
|
||||
void RigidBody::applyAngularImpulse(const sead::Vector3f& impulse) {
|
||||
|
@ -460,7 +460,7 @@ void RigidBody::applyAngularImpulse(const sead::Vector3f& impulse) {
|
|||
}
|
||||
|
||||
if (!isSensor())
|
||||
getMotionAccessor()->applyAngularImpulse(impulse);
|
||||
getEntityMotionAccessor()->applyAngularImpulse(impulse);
|
||||
}
|
||||
|
||||
void RigidBody::applyPointImpulse(const sead::Vector3f& impulse, const sead::Vector3f& point) {
|
||||
|
@ -481,25 +481,25 @@ void RigidBody::applyPointImpulse(const sead::Vector3f& impulse, const sead::Vec
|
|||
}
|
||||
|
||||
if (!isSensor())
|
||||
getMotionAccessor()->applyPointImpulse(impulse, point);
|
||||
getEntityMotionAccessor()->applyPointImpulse(impulse, point);
|
||||
}
|
||||
|
||||
void RigidBody::setMass(float mass) {
|
||||
if (isSensor())
|
||||
return;
|
||||
getMotionAccessor()->setMass(mass);
|
||||
getEntityMotionAccessor()->setMass(mass);
|
||||
}
|
||||
|
||||
float RigidBody::getMass() const {
|
||||
if (isSensor())
|
||||
return 0.0;
|
||||
return getMotionAccessor()->getMass();
|
||||
return getEntityMotionAccessor()->getMass();
|
||||
}
|
||||
|
||||
float RigidBody::getMassInv() const {
|
||||
if (isSensor())
|
||||
return 0.0;
|
||||
return getMotionAccessor()->getMassInv();
|
||||
return getEntityMotionAccessor()->getMassInv();
|
||||
}
|
||||
|
||||
void RigidBody::lock(bool also_lock_world) {
|
||||
|
|
|
@ -21,8 +21,8 @@ namespace ksys::phys {
|
|||
|
||||
class MotionAccessor;
|
||||
struct RigidBodyInstanceParam;
|
||||
class RigidBodyMotion;
|
||||
class RigidBodyMotionProxy;
|
||||
class RigidBodyMotionEntity;
|
||||
class RigidBodyMotionSensor;
|
||||
class RigidContactPoints;
|
||||
class UserTag;
|
||||
|
||||
|
@ -137,17 +137,17 @@ public:
|
|||
// 0x0000007100f8d308
|
||||
bool x_6();
|
||||
|
||||
/// Get the motion accessor if it is a RigidBodyMotion. Returns nullptr otherwise.
|
||||
RigidBodyMotion* getMotionAccessor() const;
|
||||
/// Get the motion accessor if it is a RigidBodyMotion. Returns nullptr otherwise.
|
||||
/// Get the motion accessor if it is a RigidBodyMotionEntity. Returns nullptr otherwise.
|
||||
RigidBodyMotionEntity* getEntityMotionAccessor() const;
|
||||
/// Get the motion accessor if it is a RigidBodyMotionEntity. Returns nullptr otherwise.
|
||||
/// For internal use by the physics system.
|
||||
RigidBodyMotion* getMotionAccessorForProxy() const;
|
||||
RigidBodyMotionEntity* getEntityMotionAccessorForSensor() const;
|
||||
|
||||
/// Get the motion accessor if it is a RigidBodyMotionProxy. Returns nullptr otherwise.
|
||||
RigidBodyMotionProxy* getMotionProxy() const;
|
||||
/// Get the linked rigid body from the motion proxy (or nullptr if there is none).
|
||||
/// Get the motion accessor if it is a RigidBodyMotionSensor. Returns nullptr otherwise.
|
||||
RigidBodyMotionSensor* getSensorMotionAccessor() const;
|
||||
/// Get the linked rigid body from the sensor motion accessor (or nullptr if there is none).
|
||||
RigidBody* getLinkedRigidBody() const;
|
||||
/// Reset the linked rigid body if we have a motion proxy.
|
||||
/// Reset the linked rigid body if we have a sensor motion accessor.
|
||||
void resetLinkedRigidBody() const;
|
||||
|
||||
// 0x0000007100f8d840
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "KingSystem/Physics/RigidBody/physRigidBodyMotion.h"
|
||||
#include "KingSystem/Physics/RigidBody/physRigidBodyMotionEntity.h"
|
||||
#include <Havok/Physics2012/Dynamics/Entity/hkpRigidBody.h>
|
||||
#include <Havok/Physics2012/Dynamics/Motion/Rigid/hkpBoxMotion.h>
|
||||
#include <Havok/Physics2012/Dynamics/Motion/Rigid/hkpKeyframedRigidMotion.h>
|
||||
|
@ -8,7 +8,7 @@
|
|||
#include <cstring>
|
||||
#include <prim/seadSafeString.h>
|
||||
#include <prim/seadScopedLock.h>
|
||||
#include "KingSystem/Physics/RigidBody/physRigidBodyMotionProxy.h"
|
||||
#include "KingSystem/Physics/RigidBody/physRigidBodyMotionSensor.h"
|
||||
#include "KingSystem/Physics/RigidBody/physRigidBodyParam.h"
|
||||
#include "KingSystem/Physics/physConversions.h"
|
||||
#include "KingSystem/Utils/Debug.h"
|
||||
|
@ -18,16 +18,16 @@ namespace ksys::phys {
|
|||
static float sImpulseEpsilon = 1e-05;
|
||||
static float sMaxImpulse = 1700.0;
|
||||
|
||||
RigidBodyMotion::RigidBodyMotion(RigidBody* body) : MotionAccessor(body) {}
|
||||
RigidBodyMotionEntity::RigidBodyMotionEntity(RigidBody* body) : MotionAccessor(body) {}
|
||||
|
||||
RigidBodyMotion::~RigidBodyMotion() {
|
||||
RigidBodyMotionEntity::~RigidBodyMotionEntity() {
|
||||
if (mMotion) {
|
||||
delete[] reinterpret_cast<u8*>(mMotion);
|
||||
mMotion = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
bool RigidBodyMotion::init(const RigidBodyInstanceParam& params, sead::Heap* heap) {
|
||||
bool RigidBodyMotionEntity::init(const RigidBodyInstanceParam& params, sead::Heap* heap) {
|
||||
auto* motion_storage = new (heap, alignof(hkpMaxSizeMotion)) u8[sizeof(hkpMaxSizeMotion)];
|
||||
mMotion = new (motion_storage) hkpMaxSizeMotion;
|
||||
mBody->createMotion(static_cast<hkpMaxSizeMotion*>(mMotion), MotionType::Dynamic, params);
|
||||
|
@ -41,7 +41,8 @@ bool RigidBodyMotion::init(const RigidBodyInstanceParam& params, sead::Heap* hea
|
|||
return true;
|
||||
}
|
||||
|
||||
void RigidBodyMotion::setTransform(const sead::Matrix34f& mtx, bool propagate_to_linked_motions) {
|
||||
void RigidBodyMotionEntity::setTransform(const sead::Matrix34f& mtx,
|
||||
bool propagate_to_linked_motions) {
|
||||
hkTransformf transform;
|
||||
toHkTransform(&transform, mtx);
|
||||
mMotion->setTransform(transform);
|
||||
|
@ -62,8 +63,8 @@ void RigidBodyMotion::setTransform(const sead::Matrix34f& mtx, bool propagate_to
|
|||
}
|
||||
}
|
||||
|
||||
void RigidBodyMotion::setPosition(const sead::Vector3f& position,
|
||||
bool propagate_to_linked_motions) {
|
||||
void RigidBodyMotionEntity::setPosition(const sead::Vector3f& position,
|
||||
bool propagate_to_linked_motions) {
|
||||
auto* motion = getHkBodyMotionOrLocalMotionIf(RigidBody::MotionFlag::DirtyTransform);
|
||||
const auto hk_position = toHkVec4(position);
|
||||
const auto& hk_rotate = motion->getRotation();
|
||||
|
@ -84,31 +85,31 @@ void RigidBodyMotion::setPosition(const sead::Vector3f& position,
|
|||
}
|
||||
}
|
||||
|
||||
void RigidBodyMotion::getPosition(sead::Vector3f* position) {
|
||||
void RigidBodyMotionEntity::getPosition(sead::Vector3f* position) {
|
||||
storeToVec3(position, getPosition());
|
||||
}
|
||||
|
||||
hkVector4f RigidBodyMotion::getPosition() const {
|
||||
hkVector4f RigidBodyMotionEntity::getPosition() const {
|
||||
auto* motion = getHkBodyMotionOrLocalMotionIf(RigidBody::MotionFlag::DirtyTransform);
|
||||
return motion->getPosition();
|
||||
}
|
||||
|
||||
void RigidBodyMotion::getRotation(sead::Quatf* rotation) {
|
||||
void RigidBodyMotionEntity::getRotation(sead::Quatf* rotation) {
|
||||
toQuat(rotation, getRotation());
|
||||
}
|
||||
|
||||
hkQuaternionf RigidBodyMotion::getRotation() const {
|
||||
hkQuaternionf RigidBodyMotionEntity::getRotation() const {
|
||||
auto* motion = getHkBodyMotionOrLocalMotionIf(RigidBody::MotionFlag::DirtyTransform);
|
||||
return motion->getRotation();
|
||||
}
|
||||
|
||||
void RigidBodyMotion::getTransform(sead::Matrix34f* mtx) {
|
||||
void RigidBodyMotionEntity::getTransform(sead::Matrix34f* mtx) {
|
||||
auto* motion = getHkBodyMotionOrLocalMotionIf(RigidBody::MotionFlag::DirtyTransform);
|
||||
setMtxRotation(mtx, motion->getTransform().getRotation());
|
||||
setMtxTranslation(mtx, motion->getTransform().getTranslation());
|
||||
}
|
||||
|
||||
void RigidBodyMotion::setCenterOfMassInLocal(const sead::Vector3f& center) {
|
||||
void RigidBodyMotionEntity::setCenterOfMassInLocal(const sead::Vector3f& center) {
|
||||
const auto hk_center = toHkVec4(center);
|
||||
mMotion->setCenterOfMassInLocal(hk_center);
|
||||
|
||||
|
@ -118,12 +119,12 @@ void RigidBodyMotion::setCenterOfMassInLocal(const sead::Vector3f& center) {
|
|||
getHkBody()->setCenterOfMassLocal(hk_center);
|
||||
}
|
||||
|
||||
void RigidBodyMotion::getCenterOfMassInLocal(sead::Vector3f* center) {
|
||||
void RigidBodyMotionEntity::getCenterOfMassInLocal(sead::Vector3f* center) {
|
||||
const auto hk_center = mMotion->getCenterOfMassLocal();
|
||||
storeToVec3(center, hk_center);
|
||||
}
|
||||
|
||||
bool RigidBodyMotion::setLinearVelocity(const sead::Vector3f& velocity, float epsilon) {
|
||||
bool RigidBodyMotionEntity::setLinearVelocity(const sead::Vector3f& velocity, float epsilon) {
|
||||
sead::Vector3f current_vel;
|
||||
getLinearVelocity(¤t_vel);
|
||||
if (current_vel.equals(velocity, epsilon))
|
||||
|
@ -134,7 +135,7 @@ bool RigidBodyMotion::setLinearVelocity(const sead::Vector3f& velocity, float ep
|
|||
return true;
|
||||
}
|
||||
|
||||
bool RigidBodyMotion::setLinearVelocity(const hkVector4f& velocity, float epsilon) {
|
||||
bool RigidBodyMotionEntity::setLinearVelocity(const hkVector4f& velocity, float epsilon) {
|
||||
auto* motion = getHkBodyMotionOrLocalMotionIf(RigidBody::MotionFlag::DirtyLinearVelocity);
|
||||
if (velocity.allEqual<3>(motion->getLinearVelocity(), epsilon))
|
||||
return false;
|
||||
|
@ -144,13 +145,13 @@ bool RigidBodyMotion::setLinearVelocity(const hkVector4f& velocity, float epsilo
|
|||
return true;
|
||||
}
|
||||
|
||||
void RigidBodyMotion::getLinearVelocity(sead::Vector3f* velocity) {
|
||||
void RigidBodyMotionEntity::getLinearVelocity(sead::Vector3f* velocity) {
|
||||
auto* motion = getHkBodyMotionOrLocalMotionIf(RigidBody::MotionFlag::DirtyLinearVelocity);
|
||||
const auto hk_vel = motion->getLinearVelocity();
|
||||
storeToVec3(velocity, hk_vel);
|
||||
}
|
||||
|
||||
bool RigidBodyMotion::setAngularVelocity(const sead::Vector3f& velocity, float epsilon) {
|
||||
bool RigidBodyMotionEntity::setAngularVelocity(const sead::Vector3f& velocity, float epsilon) {
|
||||
sead::Vector3f current_vel;
|
||||
getAngularVelocity(¤t_vel);
|
||||
if (current_vel.equals(velocity, epsilon))
|
||||
|
@ -161,7 +162,7 @@ bool RigidBodyMotion::setAngularVelocity(const sead::Vector3f& velocity, float e
|
|||
return true;
|
||||
}
|
||||
|
||||
bool RigidBodyMotion::setAngularVelocity(const hkVector4f& velocity, float epsilon) {
|
||||
bool RigidBodyMotionEntity::setAngularVelocity(const hkVector4f& velocity, float epsilon) {
|
||||
auto* motion = getHkBodyMotionOrLocalMotionIf(RigidBody::MotionFlag::DirtyAngularVelocity);
|
||||
if (velocity.allEqual<3>(motion->getAngularVelocity(), epsilon))
|
||||
return false;
|
||||
|
@ -171,31 +172,31 @@ bool RigidBodyMotion::setAngularVelocity(const hkVector4f& velocity, float epsil
|
|||
return true;
|
||||
}
|
||||
|
||||
void RigidBodyMotion::getAngularVelocity(sead::Vector3f* velocity) {
|
||||
void RigidBodyMotionEntity::getAngularVelocity(sead::Vector3f* velocity) {
|
||||
auto* motion = getHkBodyMotionOrLocalMotionIf(RigidBody::MotionFlag::DirtyAngularVelocity);
|
||||
const auto hk_vel = motion->getAngularVelocity();
|
||||
storeToVec3(velocity, hk_vel);
|
||||
}
|
||||
|
||||
void RigidBodyMotion::setMaxLinearVelocity(float max) {
|
||||
void RigidBodyMotionEntity::setMaxLinearVelocity(float max) {
|
||||
mMotion->getMotionState()->m_maxLinearVelocity = max;
|
||||
setMotionFlag(RigidBody::MotionFlag::DirtyMaxVelOrTimeFactor);
|
||||
}
|
||||
|
||||
float RigidBodyMotion::getMaxLinearVelocity() {
|
||||
float RigidBodyMotionEntity::getMaxLinearVelocity() {
|
||||
return mMotion->getMotionState()->m_maxLinearVelocity;
|
||||
}
|
||||
|
||||
void RigidBodyMotion::setMaxAngularVelocity(float max) {
|
||||
void RigidBodyMotionEntity::setMaxAngularVelocity(float max) {
|
||||
mMotion->getMotionState()->m_maxAngularVelocity = max;
|
||||
setMotionFlag(RigidBody::MotionFlag::DirtyMaxVelOrTimeFactor);
|
||||
}
|
||||
|
||||
float RigidBodyMotion::getMaxAngularVelocity() {
|
||||
float RigidBodyMotionEntity::getMaxAngularVelocity() {
|
||||
return mMotion->getMotionState()->m_maxAngularVelocity;
|
||||
}
|
||||
|
||||
bool RigidBodyMotion::applyLinearImpulse(const sead::Vector3f& impulse) {
|
||||
bool RigidBodyMotionEntity::applyLinearImpulse(const sead::Vector3f& impulse) {
|
||||
if (getMotionType() != MotionType::Dynamic)
|
||||
return false;
|
||||
|
||||
|
@ -214,7 +215,7 @@ bool RigidBodyMotion::applyLinearImpulse(const sead::Vector3f& impulse) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool RigidBodyMotion::applyAngularImpulse(const sead::Vector3f& impulse) {
|
||||
bool RigidBodyMotionEntity::applyAngularImpulse(const sead::Vector3f& impulse) {
|
||||
if (getMotionType() != MotionType::Dynamic)
|
||||
return false;
|
||||
|
||||
|
@ -238,8 +239,8 @@ bool RigidBodyMotion::applyAngularImpulse(const sead::Vector3f& impulse) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool RigidBodyMotion::applyPointImpulse(const sead::Vector3f& impulse,
|
||||
const sead::Vector3f& point) {
|
||||
bool RigidBodyMotionEntity::applyPointImpulse(const sead::Vector3f& impulse,
|
||||
const sead::Vector3f& point) {
|
||||
if (getMotionType() != MotionType::Dynamic)
|
||||
return false;
|
||||
|
||||
|
@ -275,7 +276,7 @@ bool RigidBodyMotion::applyPointImpulse(const sead::Vector3f& impulse,
|
|||
return true;
|
||||
}
|
||||
|
||||
void RigidBodyMotion::setMass(float mass) {
|
||||
void RigidBodyMotionEntity::setMass(float mass) {
|
||||
if (arePropertyChangesBlocked()) {
|
||||
mMass = mass;
|
||||
return;
|
||||
|
@ -288,14 +289,14 @@ void RigidBodyMotion::setMass(float mass) {
|
|||
getHkBody()->getMotion()->setMass(mass);
|
||||
}
|
||||
|
||||
float RigidBodyMotion::getMass() const {
|
||||
float RigidBodyMotionEntity::getMass() const {
|
||||
if (arePropertyChangesBlocked())
|
||||
return mMass;
|
||||
|
||||
return mMotion->getMass();
|
||||
}
|
||||
|
||||
float RigidBodyMotion::getMassInv() const {
|
||||
float RigidBodyMotionEntity::getMassInv() const {
|
||||
if (arePropertyChangesBlocked())
|
||||
return 1.0f / mMass;
|
||||
|
||||
|
@ -310,7 +311,7 @@ static inline float min3(float a, float b, float c) {
|
|||
return sead::Mathf::min(a < b ? a : b, c);
|
||||
}
|
||||
|
||||
void RigidBodyMotion::setInertiaLocal(const sead::Vector3f& inertia) {
|
||||
void RigidBodyMotionEntity::setInertiaLocal(const sead::Vector3f& inertia) {
|
||||
if (mBody->isCharacterControllerType())
|
||||
return;
|
||||
|
||||
|
@ -383,7 +384,7 @@ void RigidBodyMotion::setInertiaLocal(const sead::Vector3f& inertia) {
|
|||
}
|
||||
}
|
||||
|
||||
void RigidBodyMotion::getInertiaLocal(sead::Vector3f* inertia) const {
|
||||
void RigidBodyMotionEntity::getInertiaLocal(sead::Vector3f* inertia) const {
|
||||
if (arePropertyChangesBlocked()) {
|
||||
inertia->e = mInertiaLocal.e;
|
||||
return;
|
||||
|
@ -396,7 +397,7 @@ void RigidBodyMotion::getInertiaLocal(sead::Vector3f* inertia) const {
|
|||
inertia->z = hk_inertia.getColumn(2).getZ();
|
||||
}
|
||||
|
||||
void RigidBodyMotion::setLinearDamping(float value) {
|
||||
void RigidBodyMotionEntity::setLinearDamping(float value) {
|
||||
if (arePropertyChangesBlocked()) {
|
||||
mLinearDamping = value;
|
||||
return;
|
||||
|
@ -409,14 +410,14 @@ void RigidBodyMotion::setLinearDamping(float value) {
|
|||
getHkBody()->setLinearDamping(getTimeFactor() * value);
|
||||
}
|
||||
|
||||
float RigidBodyMotion::getLinearDamping() const {
|
||||
float RigidBodyMotionEntity::getLinearDamping() const {
|
||||
if (arePropertyChangesBlocked())
|
||||
return mLinearDamping;
|
||||
|
||||
return mMotion->getLinearDamping();
|
||||
}
|
||||
|
||||
void RigidBodyMotion::setAngularDamping(float value) {
|
||||
void RigidBodyMotionEntity::setAngularDamping(float value) {
|
||||
if (arePropertyChangesBlocked()) {
|
||||
mAngularDamping = value;
|
||||
return;
|
||||
|
@ -429,14 +430,14 @@ void RigidBodyMotion::setAngularDamping(float value) {
|
|||
getHkBody()->setAngularDamping(getTimeFactor() * value);
|
||||
}
|
||||
|
||||
float RigidBodyMotion::getAngularDamping() const {
|
||||
float RigidBodyMotionEntity::getAngularDamping() const {
|
||||
if (arePropertyChangesBlocked())
|
||||
return mAngularDamping;
|
||||
|
||||
return mMotion->getAngularDamping();
|
||||
}
|
||||
|
||||
void RigidBodyMotion::setGravityFactor(float value) {
|
||||
void RigidBodyMotionEntity::setGravityFactor(float value) {
|
||||
if (arePropertyChangesBlocked()) {
|
||||
mGravityFactor = value;
|
||||
return;
|
||||
|
@ -449,28 +450,28 @@ void RigidBodyMotion::setGravityFactor(float value) {
|
|||
getHkBody()->setGravityFactor(value);
|
||||
}
|
||||
|
||||
float RigidBodyMotion::getGravityFactor() const {
|
||||
float RigidBodyMotionEntity::getGravityFactor() const {
|
||||
if (arePropertyChangesBlocked())
|
||||
return mGravityFactor;
|
||||
|
||||
return mMotion->getGravityFactor();
|
||||
}
|
||||
|
||||
void RigidBodyMotion::setTimeFactor(float factor) {
|
||||
void RigidBodyMotionEntity::setTimeFactor(float factor) {
|
||||
mMotion->setTimeFactor(factor);
|
||||
setMotionFlag(RigidBody::MotionFlag::DirtyMaxVelOrTimeFactor);
|
||||
}
|
||||
|
||||
float RigidBodyMotion::getTimeFactor() {
|
||||
float RigidBodyMotionEntity::getTimeFactor() {
|
||||
return mMotion->getTimeFactor();
|
||||
}
|
||||
|
||||
void RigidBodyMotion::getRotation(hkQuaternionf* quat) {
|
||||
void RigidBodyMotionEntity::getRotation(hkQuaternionf* quat) {
|
||||
auto* motion = getHkBodyMotionOrLocalMotionIf(RigidBody::MotionFlag::DirtyTransform);
|
||||
*quat = motion->getRotation();
|
||||
}
|
||||
|
||||
void RigidBodyMotion::processUpdateFlags() {
|
||||
void RigidBodyMotionEntity::processUpdateFlags() {
|
||||
auto* body = getHkBody();
|
||||
auto* body_motion = body->getMotion();
|
||||
|
||||
|
@ -507,7 +508,7 @@ void RigidBodyMotion::processUpdateFlags() {
|
|||
}
|
||||
}
|
||||
|
||||
void RigidBodyMotion::updateRigidBodyMotionExceptState() {
|
||||
void RigidBodyMotionEntity::updateRigidBodyMotionExceptState() {
|
||||
// Copy everything from our hkpMotion to the rigid body's internal motion
|
||||
// except the hkMotionState data.
|
||||
const hkMotionState state = *getHkBody()->getMotion()->getMotionState();
|
||||
|
@ -547,7 +548,7 @@ void RigidBodyMotion::updateRigidBodyMotionExceptState() {
|
|||
getHkBody()->updateCachedShapeInfo(shape, extent_out);
|
||||
}
|
||||
|
||||
void RigidBodyMotion::updateRigidBodyMotionExceptStateAndVel() {
|
||||
void RigidBodyMotionEntity::updateRigidBodyMotionExceptStateAndVel() {
|
||||
// See updateRigidBodyMotionExceptState() for explanations.
|
||||
const hkMotionState state = *getHkBody()->getMotion()->getMotionState();
|
||||
const auto linear_vel = getHkBody()->getMotion()->getLinearVelocity();
|
||||
|
@ -566,7 +567,7 @@ void RigidBodyMotion::updateRigidBodyMotionExceptStateAndVel() {
|
|||
getHkBody()->getMotion()->m_deactivationIntegrateCounter = deactivation_counter;
|
||||
}
|
||||
|
||||
bool RigidBodyMotion::registerAccessor(RigidBodyMotionProxy* accessor) {
|
||||
bool RigidBodyMotionEntity::registerAccessor(RigidBodyMotionSensor* accessor) {
|
||||
auto lock = sead::makeScopedLock(mCS);
|
||||
|
||||
if (mLinkedAccessors.isFull()) {
|
||||
|
@ -589,7 +590,7 @@ bool RigidBodyMotion::registerAccessor(RigidBodyMotionProxy* accessor) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool RigidBodyMotion::deregisterAccessor(RigidBodyMotionProxy* accessor) {
|
||||
bool RigidBodyMotionEntity::deregisterAccessor(RigidBodyMotionSensor* accessor) {
|
||||
auto lock = sead::makeScopedLock(mCS);
|
||||
|
||||
const int idx = mLinkedAccessors.indexOf(accessor);
|
||||
|
@ -603,7 +604,7 @@ bool RigidBodyMotion::deregisterAccessor(RigidBodyMotionProxy* accessor) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool RigidBodyMotion::deregisterAllAccessors() {
|
||||
bool RigidBodyMotionEntity::deregisterAllAccessors() {
|
||||
auto lock = sead::makeScopedLock(mCS);
|
||||
|
||||
// For efficiency reasons, deregister starting from the end of the array.
|
||||
|
@ -618,7 +619,7 @@ bool RigidBodyMotion::deregisterAllAccessors() {
|
|||
return true;
|
||||
}
|
||||
|
||||
void RigidBodyMotion::copyTransformToAllLinkedBodies() {
|
||||
void RigidBodyMotionEntity::copyTransformToAllLinkedBodies() {
|
||||
auto lock = sead::makeScopedLock(mCS);
|
||||
|
||||
for (int i = 0, n = mLinkedAccessors.size(); i < n; ++i) {
|
||||
|
@ -631,7 +632,7 @@ void RigidBodyMotion::copyTransformToAllLinkedBodies() {
|
|||
}
|
||||
}
|
||||
|
||||
void RigidBodyMotion::copyMotionToAllLinkedBodies() {
|
||||
void RigidBodyMotionEntity::copyMotionToAllLinkedBodies() {
|
||||
auto lock = sead::makeScopedLock(mCS);
|
||||
|
||||
for (int i = 0, n = mLinkedAccessors.size(); i < n; ++i) {
|
||||
|
@ -639,7 +640,8 @@ void RigidBodyMotion::copyMotionToAllLinkedBodies() {
|
|||
}
|
||||
}
|
||||
|
||||
void RigidBodyMotion::freeze(bool freeze, bool preserve_velocities, bool preserve_max_impulse) {
|
||||
void RigidBodyMotionEntity::freeze(bool freeze, bool preserve_velocities,
|
||||
bool preserve_max_impulse) {
|
||||
if (!freeze) {
|
||||
setLinearVelocity(mLinearVelocity, sead::Mathf::epsilon());
|
||||
setAngularVelocity(mAngularVelocity, sead::Mathf::epsilon());
|
||||
|
@ -682,11 +684,11 @@ void RigidBodyMotion::freeze(bool freeze, bool preserve_velocities, bool preserv
|
|||
mMaxImpulse = sMaxImpulse;
|
||||
}
|
||||
|
||||
void RigidBodyMotion::setImpulseEpsilon(float epsilon) {
|
||||
void RigidBodyMotionEntity::setImpulseEpsilon(float epsilon) {
|
||||
sImpulseEpsilon = epsilon;
|
||||
}
|
||||
|
||||
void RigidBodyMotion::setMaxImpulse(float max_impulse) {
|
||||
void RigidBodyMotionEntity::setMaxImpulse(float max_impulse) {
|
||||
sMaxImpulse = max_impulse;
|
||||
}
|
||||
|
|
@ -12,10 +12,10 @@ class hkpMotion;
|
|||
|
||||
namespace ksys::phys {
|
||||
|
||||
class RigidBodyMotionProxy;
|
||||
class RigidBodyMotionSensor;
|
||||
|
||||
class RigidBodyMotion : public MotionAccessor {
|
||||
SEAD_RTTI_OVERRIDE(RigidBodyMotion, MotionAccessor)
|
||||
class RigidBodyMotionEntity : public MotionAccessor {
|
||||
SEAD_RTTI_OVERRIDE(RigidBodyMotionEntity, MotionAccessor)
|
||||
public:
|
||||
enum class Flag {
|
||||
_1 = 1 << 0,
|
||||
|
@ -23,7 +23,7 @@ public:
|
|||
_200 = 1 << 9,
|
||||
};
|
||||
|
||||
explicit RigidBodyMotion(RigidBody* body);
|
||||
explicit RigidBodyMotionEntity(RigidBody* body);
|
||||
|
||||
void setTransform(const sead::Matrix34f& mtx, bool propagate_to_linked_motions) override;
|
||||
void setPosition(const sead::Vector3f& position, bool propagate_to_linked_motions) override;
|
||||
|
@ -48,7 +48,7 @@ public:
|
|||
void setMaxAngularVelocity(float max) override;
|
||||
float getMaxAngularVelocity() override;
|
||||
|
||||
~RigidBodyMotion() override;
|
||||
~RigidBodyMotionEntity() override;
|
||||
|
||||
bool init(const RigidBodyInstanceParam& params, sead::Heap* heap) override;
|
||||
void getRotation(hkQuaternionf* quat) override;
|
||||
|
@ -83,8 +83,8 @@ public:
|
|||
void updateRigidBodyMotionExceptState();
|
||||
void updateRigidBodyMotionExceptStateAndVel();
|
||||
|
||||
bool registerAccessor(RigidBodyMotionProxy* accessor);
|
||||
bool deregisterAccessor(RigidBodyMotionProxy* accessor);
|
||||
bool registerAccessor(RigidBodyMotionSensor* accessor);
|
||||
bool deregisterAccessor(RigidBodyMotionSensor* accessor);
|
||||
bool deregisterAllAccessors();
|
||||
void copyTransformToAllLinkedBodies();
|
||||
void copyMotionToAllLinkedBodies();
|
||||
|
@ -111,7 +111,7 @@ private:
|
|||
float mGravityFactor{};
|
||||
float mMaxImpulseCopy{};
|
||||
hkpMotion* mMotion{};
|
||||
sead::FixedPtrArray<RigidBodyMotionProxy, 8> mLinkedAccessors;
|
||||
sead::FixedPtrArray<RigidBodyMotionSensor, 8> mLinkedAccessors;
|
||||
float mWaterBuoyancyScale = 1.0f;
|
||||
float mWaterFlowEffectiveRate = 1.0f;
|
||||
float mMagneMassScalingFactor = 1.0f;
|
|
@ -1,26 +1,26 @@
|
|||
#include "KingSystem/Physics/RigidBody/physRigidBodyMotionProxy.h"
|
||||
#include "KingSystem/Physics/RigidBody/physRigidBodyMotionSensor.h"
|
||||
#include <Havok/Common/Base/hkBase.h>
|
||||
#include <Havok/Physics2012/Dynamics/Entity/hkpRigidBody.h>
|
||||
#include "KingSystem/Physics/RigidBody/physRigidBodyMotion.h"
|
||||
#include "KingSystem/Physics/RigidBody/physRigidBodyMotionEntity.h"
|
||||
#include "KingSystem/Physics/RigidBody/physRigidBodyParam.h"
|
||||
#include "KingSystem/Physics/physConversions.h"
|
||||
|
||||
namespace ksys::phys {
|
||||
|
||||
RigidBodyMotionProxy::RigidBodyMotionProxy(RigidBody* body) : MotionAccessor(body) {}
|
||||
RigidBodyMotionSensor::RigidBodyMotionSensor(RigidBody* body) : MotionAccessor(body) {}
|
||||
|
||||
RigidBodyMotionProxy::~RigidBodyMotionProxy() {
|
||||
RigidBodyMotionSensor::~RigidBodyMotionSensor() {
|
||||
resetLinkedRigidBody();
|
||||
}
|
||||
|
||||
bool RigidBodyMotionProxy::init(const RigidBodyInstanceParam& params, sead::Heap* heap) {
|
||||
bool RigidBodyMotionSensor::init(const RigidBodyInstanceParam& params, sead::Heap* heap) {
|
||||
mMaxLinearVelocity = params.max_linear_velocity;
|
||||
mMaxAngularVelocity = params.max_angular_velocity_rad;
|
||||
mTimeFactor = params.time_factor;
|
||||
return true;
|
||||
}
|
||||
|
||||
KSYS_ALWAYS_INLINE void RigidBodyMotionProxy::setTransformImpl(const sead::Matrix34f& mtx) {
|
||||
KSYS_ALWAYS_INLINE void RigidBodyMotionSensor::setTransformImpl(const sead::Matrix34f& mtx) {
|
||||
if (mBody->isFlag8Set()) { // flag 8 = block updates?
|
||||
setMotionFlag(RigidBody::MotionFlag::DirtyTransform);
|
||||
return;
|
||||
|
@ -31,14 +31,14 @@ KSYS_ALWAYS_INLINE void RigidBodyMotionProxy::setTransformImpl(const sead::Matri
|
|||
mBody->getHkBody()->getMotion()->setTransform(transform);
|
||||
}
|
||||
|
||||
void RigidBodyMotionProxy::setTransform(const sead::Matrix34f& mtx,
|
||||
bool propagate_to_linked_motions) {
|
||||
void RigidBodyMotionSensor::setTransform(const sead::Matrix34f& mtx,
|
||||
bool propagate_to_linked_motions) {
|
||||
mTransform = mtx;
|
||||
setTransformImpl(mtx);
|
||||
}
|
||||
|
||||
void RigidBodyMotionProxy::setPosition(const sead::Vector3f& position,
|
||||
bool propagate_to_linked_motions) {
|
||||
void RigidBodyMotionSensor::setPosition(const sead::Vector3f& position,
|
||||
bool propagate_to_linked_motions) {
|
||||
if (hasMotionFlagDisabled(RigidBody::MotionFlag::DirtyTransform)) {
|
||||
getTransform(&mTransform);
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ void RigidBodyMotionProxy::setPosition(const sead::Vector3f& position,
|
|||
setTransformImpl(mTransform);
|
||||
}
|
||||
|
||||
void RigidBodyMotionProxy::setTransformFromLinkedBody(const sead::Matrix34f& mtx) {
|
||||
void RigidBodyMotionSensor::setTransformFromLinkedBody(const sead::Matrix34f& mtx) {
|
||||
if (mFlags.isOff(Flag::HasExtraTranslateForLinkedRigidBody) &&
|
||||
mFlags.isOff(Flag::HasExtraRotateForLinkedRigidBody)) {
|
||||
setTransform(mtx, false);
|
||||
|
@ -124,8 +124,8 @@ static sead::Matrix34f makeRT(const hkQuaternionf& r, const hkVector4f& t) {
|
|||
}
|
||||
|
||||
// NON_MATCHING: two fmul instructions reordered in sead::Matrix34f mtx = makeRT(...)
|
||||
void RigidBodyMotionProxy::setTransformFromLinkedBody(const hkVector4f& hk_translate,
|
||||
const hkQuaternionf& hk_rotate) {
|
||||
void RigidBodyMotionSensor::setTransformFromLinkedBody(const hkVector4f& hk_translate,
|
||||
const hkQuaternionf& hk_rotate) {
|
||||
if (mFlags.isOff(Flag::HasExtraTranslateForLinkedRigidBody) &&
|
||||
mFlags.isOff(Flag::HasExtraRotateForLinkedRigidBody)) {
|
||||
setTransform(makeRT(hk_rotate, hk_translate), false);
|
||||
|
@ -152,7 +152,7 @@ void RigidBodyMotionProxy::setTransformFromLinkedBody(const hkVector4f& hk_trans
|
|||
setTransform(mtx, false);
|
||||
}
|
||||
|
||||
void RigidBodyMotionProxy::getPosition(sead::Vector3f* position) {
|
||||
void RigidBodyMotionSensor::getPosition(sead::Vector3f* position) {
|
||||
if (hasMotionFlagSet(RigidBody::MotionFlag::DirtyTransform)) {
|
||||
mTransform.getTranslation(*position);
|
||||
} else {
|
||||
|
@ -161,7 +161,7 @@ void RigidBodyMotionProxy::getPosition(sead::Vector3f* position) {
|
|||
}
|
||||
}
|
||||
|
||||
void RigidBodyMotionProxy::getRotation(sead::Quatf* rotation) {
|
||||
void RigidBodyMotionSensor::getRotation(sead::Quatf* rotation) {
|
||||
if (hasMotionFlagSet(RigidBody::MotionFlag::DirtyTransform)) {
|
||||
mTransform.toQuat(*rotation);
|
||||
} else {
|
||||
|
@ -171,7 +171,7 @@ void RigidBodyMotionProxy::getRotation(sead::Quatf* rotation) {
|
|||
rotation->normalize();
|
||||
}
|
||||
|
||||
void RigidBodyMotionProxy::getTransform(sead::Matrix34f* mtx) {
|
||||
void RigidBodyMotionSensor::getTransform(sead::Matrix34f* mtx) {
|
||||
if (hasMotionFlagSet(RigidBody::MotionFlag::DirtyTransform)) {
|
||||
*mtx = mTransform;
|
||||
} else {
|
||||
|
@ -181,7 +181,7 @@ void RigidBodyMotionProxy::getTransform(sead::Matrix34f* mtx) {
|
|||
}
|
||||
}
|
||||
|
||||
void RigidBodyMotionProxy::setCenterOfMassInLocal(const sead::Vector3f& center) {
|
||||
void RigidBodyMotionSensor::setCenterOfMassInLocal(const sead::Vector3f& center) {
|
||||
mCenterOfMassInLocal.e = center.e;
|
||||
|
||||
if (mBody->isFlag8Set()) {
|
||||
|
@ -192,7 +192,7 @@ void RigidBodyMotionProxy::setCenterOfMassInLocal(const sead::Vector3f& center)
|
|||
mBody->getHkBody()->setCenterOfMassLocal(toHkVec4(center));
|
||||
}
|
||||
|
||||
void RigidBodyMotionProxy::getCenterOfMassInLocal(sead::Vector3f* center) {
|
||||
void RigidBodyMotionSensor::getCenterOfMassInLocal(sead::Vector3f* center) {
|
||||
if (hasMotionFlagSet(RigidBody::MotionFlag::DirtyCenterOfMassLocal)) {
|
||||
center->e = mCenterOfMassInLocal.e;
|
||||
} else {
|
||||
|
@ -201,7 +201,7 @@ void RigidBodyMotionProxy::getCenterOfMassInLocal(sead::Vector3f* center) {
|
|||
}
|
||||
}
|
||||
|
||||
bool RigidBodyMotionProxy::setLinearVelocity(const sead::Vector3f& velocity, float epsilon) {
|
||||
bool RigidBodyMotionSensor::setLinearVelocity(const sead::Vector3f& velocity, float epsilon) {
|
||||
if (velocity.equals(mLinearVelocity, epsilon))
|
||||
return false;
|
||||
|
||||
|
@ -210,13 +210,13 @@ bool RigidBodyMotionProxy::setLinearVelocity(const sead::Vector3f& velocity, flo
|
|||
return true;
|
||||
}
|
||||
|
||||
bool RigidBodyMotionProxy::setLinearVelocity(const hkVector4f& velocity, float epsilon) {
|
||||
bool RigidBodyMotionSensor::setLinearVelocity(const hkVector4f& velocity, float epsilon) {
|
||||
sead::Vector3f vec;
|
||||
storeToVec3(&vec, velocity);
|
||||
return setLinearVelocity(vec, epsilon);
|
||||
}
|
||||
|
||||
void RigidBodyMotionProxy::getLinearVelocity(sead::Vector3f* velocity) {
|
||||
void RigidBodyMotionSensor::getLinearVelocity(sead::Vector3f* velocity) {
|
||||
if (hasMotionFlagSet(RigidBody::MotionFlag::DirtyLinearVelocity)) {
|
||||
velocity->e = mLinearVelocity.e;
|
||||
} else {
|
||||
|
@ -225,7 +225,7 @@ void RigidBodyMotionProxy::getLinearVelocity(sead::Vector3f* velocity) {
|
|||
}
|
||||
}
|
||||
|
||||
bool RigidBodyMotionProxy::setAngularVelocity(const sead::Vector3f& velocity, float epsilon) {
|
||||
bool RigidBodyMotionSensor::setAngularVelocity(const sead::Vector3f& velocity, float epsilon) {
|
||||
if (velocity.equals(mAngularVelocity, sead::Mathf::epsilon()))
|
||||
return false;
|
||||
|
||||
|
@ -234,13 +234,13 @@ bool RigidBodyMotionProxy::setAngularVelocity(const sead::Vector3f& velocity, fl
|
|||
return true;
|
||||
}
|
||||
|
||||
bool RigidBodyMotionProxy::setAngularVelocity(const hkVector4f& velocity, float epsilon) {
|
||||
bool RigidBodyMotionSensor::setAngularVelocity(const hkVector4f& velocity, float epsilon) {
|
||||
sead::Vector3f vec;
|
||||
storeToVec3(&vec, velocity);
|
||||
return setAngularVelocity(vec, epsilon);
|
||||
}
|
||||
|
||||
void RigidBodyMotionProxy::getAngularVelocity(sead::Vector3f* velocity) {
|
||||
void RigidBodyMotionSensor::getAngularVelocity(sead::Vector3f* velocity) {
|
||||
if (hasMotionFlagSet(RigidBody::MotionFlag::DirtyAngularVelocity)) {
|
||||
velocity->e = mAngularVelocity.e;
|
||||
} else {
|
||||
|
@ -249,31 +249,31 @@ void RigidBodyMotionProxy::getAngularVelocity(sead::Vector3f* velocity) {
|
|||
}
|
||||
}
|
||||
|
||||
void RigidBodyMotionProxy::setMaxLinearVelocity(float max) {
|
||||
void RigidBodyMotionSensor::setMaxLinearVelocity(float max) {
|
||||
mMaxLinearVelocity = max;
|
||||
setMotionFlag(RigidBody::MotionFlag::DirtyMaxVelOrTimeFactor);
|
||||
}
|
||||
|
||||
float RigidBodyMotionProxy::getMaxLinearVelocity() {
|
||||
float RigidBodyMotionSensor::getMaxLinearVelocity() {
|
||||
if (hasMotionFlagSet(RigidBody::MotionFlag::DirtyMaxVelOrTimeFactor))
|
||||
return mMaxLinearVelocity;
|
||||
|
||||
return getRigidBodyMotion()->getMotionState()->m_maxLinearVelocity;
|
||||
}
|
||||
|
||||
void RigidBodyMotionProxy::setMaxAngularVelocity(float max) {
|
||||
void RigidBodyMotionSensor::setMaxAngularVelocity(float max) {
|
||||
mMaxAngularVelocity = max;
|
||||
setMotionFlag(RigidBody::MotionFlag::DirtyMaxVelOrTimeFactor);
|
||||
}
|
||||
|
||||
float RigidBodyMotionProxy::getMaxAngularVelocity() {
|
||||
float RigidBodyMotionSensor::getMaxAngularVelocity() {
|
||||
if (hasMotionFlagSet(RigidBody::MotionFlag::DirtyMaxVelOrTimeFactor))
|
||||
return mMaxAngularVelocity;
|
||||
|
||||
return getRigidBodyMotion()->getMotionState()->m_maxAngularVelocity;
|
||||
}
|
||||
|
||||
void RigidBodyMotionProxy::setLinkedRigidBody(RigidBody* body) {
|
||||
void RigidBodyMotionSensor::setLinkedRigidBody(RigidBody* body) {
|
||||
auto lock = mBody->makeScopedLock(mBody->isFlag8Set());
|
||||
|
||||
if (mLinkedRigidBody == body)
|
||||
|
@ -281,13 +281,13 @@ void RigidBodyMotionProxy::setLinkedRigidBody(RigidBody* body) {
|
|||
|
||||
if (mLinkedRigidBody) {
|
||||
// If we already have a linked rigid body, unlink it first.
|
||||
mLinkedRigidBody->getMotionAccessorForProxy()->deregisterAccessor(this);
|
||||
mLinkedRigidBody->getEntityMotionAccessorForSensor()->deregisterAccessor(this);
|
||||
mLinkedRigidBody = nullptr;
|
||||
}
|
||||
|
||||
if (body) {
|
||||
if (!body->isSensor() && mFlags.isOff(Flag::HasLinkedRigidBodyWithoutFlag10)) {
|
||||
RigidBodyMotion* accessor = body->getMotionAccessorForProxy();
|
||||
RigidBodyMotionEntity* accessor = body->getEntityMotionAccessorForSensor();
|
||||
if (accessor && accessor->registerAccessor(this)) {
|
||||
mLinkedRigidBody = body;
|
||||
if (mBody->hasFlag(RigidBody::Flag::_10))
|
||||
|
@ -302,30 +302,30 @@ void RigidBodyMotionProxy::setLinkedRigidBody(RigidBody* body) {
|
|||
}
|
||||
}
|
||||
|
||||
void RigidBodyMotionProxy::resetLinkedRigidBody() {
|
||||
void RigidBodyMotionSensor::resetLinkedRigidBody() {
|
||||
if (!mLinkedRigidBody)
|
||||
return;
|
||||
|
||||
auto lock = mBody->makeScopedLock(mBody->isFlag8Set());
|
||||
if (mLinkedRigidBody) {
|
||||
mLinkedRigidBody->getMotionAccessorForProxy()->deregisterAccessor(this);
|
||||
mLinkedRigidBody->getEntityMotionAccessorForSensor()->deregisterAccessor(this);
|
||||
mLinkedRigidBody = nullptr;
|
||||
mFlags.reset(Flag::HasLinkedRigidBodyWithoutFlag10);
|
||||
}
|
||||
}
|
||||
|
||||
RigidBody* RigidBodyMotionProxy::getLinkedRigidBody() const {
|
||||
RigidBody* RigidBodyMotionSensor::getLinkedRigidBody() const {
|
||||
return mLinkedRigidBody;
|
||||
}
|
||||
|
||||
bool RigidBodyMotionProxy::isFlag40000Set() const {
|
||||
bool RigidBodyMotionSensor::isFlag40000Set() const {
|
||||
return mFlags.isOn(Flag::_40000);
|
||||
}
|
||||
|
||||
void RigidBodyMotionProxy::copyMotionFromLinkedRigidBody() {
|
||||
void RigidBodyMotionSensor::copyMotionFromLinkedRigidBody() {
|
||||
auto lock = mBody->makeScopedLock(mBody->isFlag8Set());
|
||||
|
||||
auto* accessor = mLinkedRigidBody->getMotionAccessorForProxy();
|
||||
auto* accessor = mLinkedRigidBody->getEntityMotionAccessorForSensor();
|
||||
auto* linked_hk_body = mLinkedRigidBody->getHkBody();
|
||||
auto* this_hk_body = mBody->getHkBody();
|
||||
|
||||
|
@ -399,23 +399,23 @@ void RigidBodyMotionProxy::copyMotionFromLinkedRigidBody() {
|
|||
hkpRigidBody::updateBroadphaseAndResetCollisionInformationOfWarpedBody(this_hk_body);
|
||||
}
|
||||
|
||||
void RigidBodyMotionProxy::getRotation(hkQuaternionf* quat) {
|
||||
void RigidBodyMotionSensor::getRotation(hkQuaternionf* quat) {
|
||||
sead::Quatf rotation;
|
||||
getRotation(&rotation);
|
||||
toHkQuat(quat, rotation);
|
||||
}
|
||||
|
||||
void RigidBodyMotionProxy::setTimeFactor(float factor) {
|
||||
void RigidBodyMotionSensor::setTimeFactor(float factor) {
|
||||
mTimeFactor = factor;
|
||||
setMotionFlag(RigidBody::MotionFlag::DirtyMaxVelOrTimeFactor);
|
||||
}
|
||||
|
||||
float RigidBodyMotionProxy::getTimeFactor() {
|
||||
float RigidBodyMotionSensor::getTimeFactor() {
|
||||
return mTimeFactor;
|
||||
}
|
||||
|
||||
void RigidBodyMotionProxy::freeze(bool freeze, bool preserve_velocities,
|
||||
bool preserve_max_impulse) {
|
||||
void RigidBodyMotionSensor::freeze(bool freeze, bool preserve_velocities,
|
||||
bool preserve_max_impulse) {
|
||||
if (!freeze) {
|
||||
mBody->setLinearVelocity(mFrozenLinearVelocity);
|
||||
mBody->setAngularVelocity(mFrozenAngularVelocity);
|
|
@ -7,8 +7,8 @@
|
|||
namespace ksys::phys {
|
||||
|
||||
/// A MotionAccessor that uses the RigidBody's internal motion instance directly.
|
||||
class RigidBodyMotionProxy : public MotionAccessor {
|
||||
SEAD_RTTI_OVERRIDE(RigidBodyMotionProxy, MotionAccessor)
|
||||
class RigidBodyMotionSensor : public MotionAccessor {
|
||||
SEAD_RTTI_OVERRIDE(RigidBodyMotionSensor, MotionAccessor)
|
||||
public:
|
||||
enum class Flag {
|
||||
_40000 = 1 << 18,
|
||||
|
@ -17,7 +17,7 @@ public:
|
|||
HasLinkedRigidBodyWithoutFlag10 = 1 << 21,
|
||||
};
|
||||
|
||||
explicit RigidBodyMotionProxy(RigidBody* body);
|
||||
explicit RigidBodyMotionSensor(RigidBody* body);
|
||||
|
||||
void setTransform(const sead::Matrix34f& mtx, bool propagate_to_linked_motions) override;
|
||||
void setPosition(const sead::Vector3f& position, bool propagate_to_linked_motions) override;
|
||||
|
@ -48,7 +48,7 @@ public:
|
|||
bool isFlag40000Set() const;
|
||||
void copyMotionFromLinkedRigidBody();
|
||||
|
||||
~RigidBodyMotionProxy() override;
|
||||
~RigidBodyMotionSensor() override;
|
||||
|
||||
bool init(const RigidBodyInstanceParam& params, sead::Heap* heap) override;
|
||||
void getRotation(hkQuaternionf* quat) override;
|
Loading…
Reference in New Issue