Commit Graph

690 Commits

Author SHA1 Message Date
Brian Savage 3bb33875b3 More PlacementMap functions 2022-01-29 17:37:42 -05:00
Brian Savage 7a3c0b261a Add initial PlacementMap functions 2022-01-29 07:51:03 -05:00
Léo Lam 532e83a2fa ksys/phys: Declare all remaining RigidBody functions 2022-01-29 13:01:57 +01:00
Léo Lam 61201ca54b ksys/phys: Rename RigidBody/UserTag broadphase border callbacks 2022-01-29 12:48:38 +01:00
Léo Lam 10d3f129b0 ksys/phys: Add RigidBody velocity calc and warping functions 2022-01-29 01:30:34 +01:00
Léo Lam e1f3e551cb ksys/phys: Add more RigidBody functions 2022-01-27 01:54:56 +01:00
Léo Lam b728917ef4 ksys/phys: Add RigidBody collision filter info functions
Including a bunch of BitFields additions so we can get the desired
codegen without sacrificing readability or flexibility.
(The alternative would be building masks and masking manually.)

getCollisionFilterInfo was changed to return a u32 instead of
EntityCollisionFilterInfo because a collision filter info mask
can be either an EntityCollisionFilterInfo or a ReceiverMask.

(Also at some point we'll probably want to rename
EntityCollisionFilterInfo because that is also used for sensor
rigid bodies and not just for entities.)
2022-01-25 00:15:29 +01:00
Léo Lam 4531c033a3 ksys/phys: Rename SystemGroupHandler mFilterIndex -> mLayerType
It is actually a ContactLayerType -- there's a comparison against
the contact layer type in RigidBody.
2022-01-24 12:38:05 +01:00
Léo Lam a33ebd2130 ksys/phys: Introduce {First,Last}{Entity,Sensor} constants to improve clarity 2022-01-23 17:00:44 +01:00
notyourav 3f793b24d9 Merge pull request #75 from savage13/PlacementMap
Add PlacementMap, stubs: PlacementMapMgr and PlacementMapMgrMapArray
2022-01-23 00:33:57 -08:00
Léo Lam dcd1a856bd ksys/act: Document some BaseProcMgr iteration functions 2022-01-22 21:06:10 +01:00
Léo Lam 719c5f02a7 ksys/phys: Add more RigidBody functions (motion, collision mask) 2022-01-22 20:09:57 +01:00
Léo Lam c36c03c6fb ksys/phys: Start adding ContactListener 2022-01-21 15:27:55 +01:00
Léo Lam c292675646 ksys/phys: Rename MemSystem to System
It was called MemSystem in the IDB because of a string in
ksys::InitializeApp that referred to MemSystem initialisation as
"Physics Memory System"; however that string actually referred to an
initialisation step for the physics system, not to the name of the
subsystem itself.
2022-01-21 12:43:24 +01:00
Léo Lam 98c69ebaef ksys/phys: Add one more RigidBody function 2022-01-21 12:20:05 +01:00
Brian Savage d11a43df25 Added missing include for sead::Buffer 2022-01-20 11:57:06 -05:00
Brian Savage c028190362 Use sead::Buffer<PlacementMap> 2022-01-20 10:17:58 -05:00
Brian Savage 1182f2fd75 Further fixes to variables types 2022-01-20 09:37:30 -05:00
Brian Savage 7d97bb6f40 Moved functions to correct places/files, formatting 2022-01-19 19:21:05 -05:00
Léo Lam a291d84b2b Havok: Move hkpConstraintInstance to the correct folder 2022-01-20 01:11:54 +01:00
Léo Lam 178108d42c ksys/phys: Update some RigidBody flag names for clarity 2022-01-19 15:23:01 +01:00
Brian Savage d61a13e4bd Add PlacementMap, stubs: PlacementMapMgr and PlacementMapMgrMapArray 2022-01-18 18:52:13 -05:00
Léo Lam c20142ab7b ksys/phys: Rename flag 0x80 to RigidBody::Flag::HighQualityCollidable 2022-01-19 00:37:32 +01:00
Léo Lam 52e2111ff3 ksys/phys: Add even more RigidBody functions 2022-01-19 00:33:49 +01:00
Léo Lam c343c3d9e3 ksys/phys: Mark RigidBody::m9 as pure virtual 2022-01-18 20:24:10 +01:00
Léo Lam 98aeceed40 ksys/phys: Add more RigidBody functions
And fix a bunch of hkVector4f / hkSimdFloat32 interop matching issues.
2022-01-18 19:04:27 +01:00
Léo Lam 87bca00e68 ksys/phys: Add more RigidBody functions and Havok utils 2022-01-17 22:29:21 +01:00
Léo Lam adad4553d6 ksys/phys: Add more RigidBody functions 2022-01-17 19:27:49 +01:00
Léo Lam ddef936b26 ksys/phys: Add RigidBody::isEntity to make certain checks clearer
The pattern we want to use is:

```
if (isEntity())
  do entity stuff (e.g. get entity motion accessor)
```

or

```
if (!isEntity())
  return;

do entity stuff
```

That's clearer than

```
if (isSensor())
  return;

do entity stuff
```

because the fact that !isSensor() is equivalent to isEntity() is not
always immediately clear.
2022-01-17 17:22:27 +01:00
Léo Lam a2cba75b19 ksys/phys: Rename MotionAccessor classes to reflect entity/sensor split 2022-01-17 17:16:43 +01:00
Léo Lam 8dd5608b79 ksys/phys: Rename RigidBody "isMassScaling" mode to "isSensor"
That also explains the comparison against 1 (ContactLayerType::Sensor)
in the constructor.
2022-01-17 17:02:11 +01:00
Léo Lam 392c0973c7 ksys/phys: Add a bunch of easy RigidBody functions 2022-01-17 16:58:22 +01:00
Léo Lam 05abdf7e77 ksys/phys: Add easy RigidBodyRequestMgr functions 2022-01-17 01:52:21 +01:00
Léo Lam 4eb07ca88c ksys/phys: Start adding RigidBodyRequestMgr 2022-01-16 23:29:48 +01:00
Léo Lam 71fda30853 ksys/util: Add LockFreeQueue 2022-01-16 23:21:52 +01:00
Léo Lam cba2a5b8b0 ksys: Declutter Utils by creating new Utils/Container folder 2022-01-16 22:24:00 +01:00
Léo Lam 99b913f86d ksys/phys: Move RigidBodyRequestMgr to its own header 2022-01-16 15:55:42 +01:00
Léo Lam 2a8dc8ad25 ksys/phys: Add two RigidBody init functions (and prerequisites) 2022-01-16 15:50:56 +01:00
Léo Lam 2ed36c7dc0 ksys/phys: Add prerequisites for RigidBody (RigidBodyParam fixes)
Seems to have fixed _ZN4ksys4phys11InstanceSet14sub_7100FBB00CEPNS0_9RigidBodyEPNS0_14RigidBodyParamE
2022-01-16 13:00:35 +01:00
Léo Lam 544c33e2eb ksys/phys: Finish RigidBodyMotionProxy 2022-01-16 02:36:36 +01:00
Léo Lam a5b87ccf97 ksys/phys: Fix #include type for Havok header 2022-01-15 19:59:06 +01:00
Léo Lam cee7b169af ksys/phys: Finish RigidBodyMotion 2022-01-15 19:57:59 +01:00
Léo Lam c6f0a3cb4c ksys/phys: Rename flags for clarity in RigidBody 2022-01-15 18:37:35 +01:00
Léo Lam 7fbd3a0e8d ksys/phys: Remove useless semicolon 2022-01-15 18:15:03 +01:00
Léo Lam b298ec2b28 ksys/phys: Add remaining RigidBodyMotionProxy functions (except one) 2022-01-15 18:13:27 +01:00
Léo Lam ea9cc90f29 ksys/phys: Fix indirect <cstring> include in RigidBodyMotion 2022-01-14 13:14:24 +01:00
Léo Lam 97938cc48e ksys/phys: Start adding RigidBodyMotion 2022-01-14 13:04:25 +01:00
Léo Lam 359fb2685b ksys/phys: Rename getMotionInfo to getMotionType for clarity 2022-01-13 19:10:11 +01:00
Léo Lam 5831b9581d ksys/phys: Make MotionAccessor's getMotion less ambiguous
RigidBodyMotion has its own hkpMotion so we should make it clearer that
getMotion returns the rigid body's own internal motion.
2022-01-13 18:01:23 +01:00
Léo Lam 2b83356056 ksys/phys: Start adding RigidBodyMotionProxy 2022-01-13 16:32:27 +01:00