Commit Graph

760 Commits

Author SHA1 Message Date
Daniel Chappuis
6d75edd782 Merge branch 'develop' into 'master' 2020-05-29 00:03:44 +02:00
Daniel Chappuis
875064c851 Check that the initial transforms when creating a body or a collider are valid 2020-05-27 23:09:23 +02:00
Daniel Chappuis
09dc35f635 Update dates and version numbers in files 2020-05-27 16:15:35 +02:00
Daniel Chappuis
4351081189 Make smooth triangle normal computation more robust 2020-05-26 18:22:17 +02:00
Daniel Chappuis
834de3254b Add again Timer.h and Timer.cpp 2020-05-25 21:54:36 +02:00
Daniel Chappuis
fa4eb297bf Add logs, remove warnings, ... 2020-05-25 21:40:44 +02:00
Daniel Chappuis
8893f22e70 Remove the Timer class which is not needed anymore 2020-05-25 10:55:04 +02:00
Daniel Chappuis
9d35d5d7d2 Log errors in PhysicsCommon when destroying a collision shape that is still used by some colliders 2020-05-25 10:48:25 +02:00
Daniel Chappuis
a81a2f5393 Improve Doxygen API Reference documentation 2020-05-25 10:36:36 +02:00
Daniel Chappuis
23041d474b Make memory allocators thread safe 2020-05-25 10:10:40 +02:00
Daniel Chappuis
cfdab52573 Improve Doxygen API Reference documentation 2020-05-25 00:27:13 +02:00
Daniel Chappuis
ab86620412 Small modifications 2020-05-24 16:52:44 +02:00
Daniel Chappuis
bd4a26d5c7 Small modifications 2020-05-24 16:13:44 +02:00
Daniel Chappuis
39bbd6ec6d Refactor CMakeLists.txt files to use more modern CMAKE 2020-05-11 12:38:59 +02:00
Daniel Chappuis
3df602edfa Refactor the way to create a logger and a profiler 2020-05-11 11:13:26 +02:00
Daniel Chappuis
e04565fb48 Rename RigidBody::applyForce() to RigidBody::applyForceAtWorldPosition() and add RigidBody::applyForceAtLocalPosition() method 2020-05-09 00:09:38 +02:00
Daniel Chappuis
dfc6710dc0 Merge and fix conflicts 2020-05-08 23:54:28 +02:00
Daniel Chappuis
c1f40ac456 Fix issue with limits of HingeJoint and SliderJoint 2020-05-08 15:10:49 +02:00
Daniel Chappuis
67e89e081b Working on debug renderer 2020-05-07 15:12:59 +02:00
Daniel Chappuis
0321cf4f89 Working on debug renderer 2020-05-06 15:21:25 +02:00
Daniel Chappuis
56077bba6b Working on debug renderer 2020-05-06 00:34:56 +02:00
Daniel Chappuis
92aa06ac35 Fix compilation error 2020-04-27 18:16:46 +02:00
Daniel Chappuis
2efe9d65da Fix issue with overlap callback 2020-04-27 15:54:57 +02:00
Daniel Chappuis
e03ee08462 Rename Logger class to DefaultLogger and create abstract Logger class 2020-04-26 18:41:59 +02:00
Daniel Chappuis
dcd71ef103 Improve EventListener: add onTrigger() method, add event types, add triggers, ... 2020-04-18 20:43:13 +02:00
Daniel Chappuis
a190bba8c0 Refactor where the headers are store for better installation of the library 2020-03-18 07:28:34 +01:00
Daniel Chappuis
7dde393fa5 Use Vector3 instead of Matrix3x3 for the local inertia tensor of a rigid body 2020-03-10 07:23:51 +01:00
Daniel Chappuis
cda466f9da Refactor the way to set/update the center of mass, mass and inertia tensor of a rigid body 2020-03-01 16:39:16 +01:00
Daniel Chappuis
28560d034e Add methods for the user to retrieve Colliders, CollisionBodies and RigidBodies 2020-02-17 17:36:44 +01:00
Daniel Chappuis
0ec26f5184 Compute the fat AABB by adding a percentage of the size of the initial AABB instead of using a constant offset. Do not use linear displacement anymore in inflate the AABB in direction of the motion in the broad-phase 2020-02-14 17:08:02 +01:00
Daniel Chappuis
7477460e4f Make possible to resize the collision shapes after their creation 2020-02-11 21:56:42 +01:00
Daniel Chappuis
9d776e32dc Make possible to change the size of the collision shapes after their creation 2020-02-06 07:21:13 +01:00
Daniel Chappuis
c5873dbc6b The Material is now part of the Collider instead of the RigidBody, fixes compilation errors with Logger and Profiler. 2020-02-01 13:41:30 +01:00
Daniel Chappuis
d36edcdb6e Rename DynamicsWorld class to PhysicsWorld 2020-01-27 17:46:00 +01:00
Daniel Chappuis
b0fde22678 Rename ProxyShape to Collider 2020-01-20 21:22:46 +01:00
Daniel Chappuis
eb270af309 Fix issue and make sure we use the correct memory allocators 2020-01-15 20:18:11 +01:00
Daniel Chappuis
77940a43f7 Add new memory allocator HeapAllocator 2020-01-13 17:02:59 +01:00
Daniel Chappuis
581f642280 Remove the MemoryManager::setBaseAllocator() method 2019-12-13 11:20:17 +01:00
Daniel Chappuis
45b02abaec Add PhysicsCommon class and use it as a factory for other library objects and add pile demo in testbed application 2019-12-12 18:50:18 +01:00
Daniel Chappuis
2dfe254c86 Use memory allocators from ecs branch 2019-11-27 22:41:38 +01:00
Daniel Chappuis
815182aae9 Merge ecs into develop and fix conflicts 2019-11-27 22:14:29 +01:00
Daniel Chappuis
b94fbf7874 Some optimizations and fix issues in collision detection 2019-11-25 21:22:25 +01:00
Daniel Chappuis
acb5e0e51e Remove TODO 2019-11-25 17:33:46 +01:00
Daniel Chappuis
58df6cdaff Optimizations 2019-11-22 21:31:51 +01:00
Daniel Chappuis
46d19bf550 Some optimizations 2019-11-21 23:23:03 +01:00
Daniel Chappuis
901fc6aeb9 Revert "Small modifications"
This reverts commit 2746a8cfc0.
2019-11-19 22:28:36 +01:00
Daniel Chappuis
2746a8cfc0 Small modifications 2019-11-19 21:58:02 +01:00
Daniel Chappuis
d894a40d2e Working on middle-phase collision detection 2019-11-19 18:35:22 +01:00
Daniel Chappuis
7dcc86d746 Working on middle-phase collision detection 2019-11-18 07:29:04 +01:00
Daniel Chappuis
6b3a65b914 Working on middle-phase collision detection 2019-11-17 20:52:18 +01:00
Daniel Chappuis
44e07e0bd9 Working on making middle-phase collision detection faster 2019-11-09 23:55:54 +01:00
Daniel Chappuis
294d3b6665 Small fix 2019-10-28 23:16:26 +01:00
Daniel Chappuis
8580ab545b Fix issues 2019-10-28 23:08:42 +01:00
Daniel Chappuis
87614b7dad Add profiling code 2019-10-22 17:34:36 +02:00
Daniel Chappuis
f991717cc1 Optimizations 2019-10-22 07:10:57 +02:00
Daniel Chappuis
130eb00136 Refactoring 2019-10-18 07:13:45 +02:00
Daniel Chappuis
2c2b75def7 Move local-to-world transform of ProxyShape into the ProxyShapeComponents 2019-10-15 20:29:22 +02:00
Daniel Chappuis
5f05fa372d Move contacts creation before islands creation 2019-10-11 17:01:53 +02:00
Daniel Chappuis
92b39ca6c0 Take care of TODOs 2019-10-10 17:51:31 +02:00
Daniel Chappuis
59cdc6b8f8 Take care of TODOs 2019-10-10 07:53:25 +02:00
Daniel Chappuis
d491665332 Add SolveSliderJointSystem class 2019-10-07 20:50:37 +02:00
Daniel Chappuis
afb34b4355 Add SolveHingeJointSystem class 2019-10-05 17:45:35 +02:00
Daniel Chappuis
ab02d98f3a Add SolveFixedJointSystem class 2019-10-02 17:48:28 +02:00
Daniel Chappuis
22810e0857 Working on SolveBallAndSocketJointSystem 2019-10-01 22:39:50 +02:00
Daniel Chappuis
f0b8121795 Working on joints ECS 2019-09-27 07:20:30 +02:00
Daniel Chappuis
f29810334e Working on JointComponents 2019-09-24 17:45:43 +02:00
Daniel Chappuis
170a1bfdfd Working on SliderJointComponents class 2019-09-19 17:12:52 +02:00
Daniel Chappuis
0c0ff46d34 Add SliderJointComponents class 2019-09-13 07:15:48 +02:00
Daniel Chappuis
06132e3d41 Add HingeJointComponents class 2019-09-11 21:13:45 +02:00
Daniel Chappuis
67d8411623 Add FixedJointComponents class 2019-09-04 12:44:42 +02:00
Daniel Chappuis
8187c19fa3 Add BallAndSocketJointComponents class 2019-09-02 14:15:03 +02:00
Daniel Chappuis
cef1f6cd22 Working on JointComponents 2019-08-19 18:38:14 +02:00
Daniel Chappuis
0230b74462 Working on joints components 2019-08-19 07:23:19 +02:00
Daniel Chappuis
2144b8e571 Add JointComponents class 2019-08-15 18:12:46 +02:00
Daniel Chappuis
df04be0e6d Rename CollisionDetection class to CollisionDetectionSystem 2019-08-09 07:13:15 +02:00
Daniel Chappuis
9b38fc1626 Add DynamicsSystem class 2019-08-08 17:45:22 +02:00
Daniel Chappuis
db995ea52c Do not use callbacks for middle-phase collision detection 2019-08-04 23:24:48 +02:00
Daniel Chappuis
9deb90dc6f Make attributes public in ContactManifold 2019-07-22 18:28:19 +02:00
Daniel Chappuis
0191244b57 Simplify code 2019-07-21 22:44:10 +02:00
Daniel Chappuis
3d09a28dd1 Remove DynamicsComponents 2019-07-21 22:36:30 +02:00
Daniel Chappuis
6f9adc3a32 Move attributes from RigidBodyComponents to DynamicsComponents 2019-07-19 21:57:17 +02:00
Daniel Chappuis
466455d15a Move attribute in RigidBodyComponents 2019-07-19 20:51:43 +02:00
Daniel Chappuis
ca80d95d84 Add RigidBodyComponents class 2019-07-16 07:15:13 +02:00
Daniel Chappuis
b93ba5c476 Rename BodyComponents class to CollisionBodyComponents 2019-07-15 17:44:45 +02:00
Daniel Chappuis
569964e365 Remove Body class 2019-07-15 17:38:20 +02:00
Daniel Chappuis
16f564edea Move Body attributes to BodyComponents 2019-07-08 17:41:10 +02:00
Daniel Chappuis
236a855c8d Remove Body::mId attribute 2019-07-04 20:24:09 +02:00
Daniel Chappuis
bcb4febb16 Merge branch 'master' into develop 2019-07-01 20:54:37 +02:00
Daniel Chappuis
f9fa2a227c Changes for release of version 0.7.1 2019-07-01 08:42:27 +02:00
Daniel Chappuis
cde8273f6a Merge branch 'allocators' into develop 2019-06-28 08:08:02 +02:00
Daniel Chappuis
eccc4faa6d Disable previous axis clipping (temporal coherence) in SAT algorithm for testCollision() methods 2019-06-27 07:12:17 +02:00
Daniel Chappuis
9740c699dc Modify default value for restitutionVelocityThreshold 2019-06-26 12:09:19 +02:00
Daniel Chappuis
74b442077f Working on testCollision() and testOverlap() methods 2019-06-25 23:26:06 +02:00
Daniel Chappuis
3f5916a280 Working on testOverlap() and testCollisionMethods 2019-06-03 07:12:50 +02:00
Daniel Chappuis
251333a6ef Working on contacts 2019-05-24 07:15:31 +02:00
Daniel Chappuis
669e74d528 Clean code 2019-05-21 20:40:11 +02:00
Daniel Chappuis
1bc7e0710b Add constrained position/orientation to DynamicsComponents 2019-05-20 07:42:24 +02:00
Daniel Chappuis
a11d884ce1 Move isGravityEnabled and inertia tensors in DynamicsComponents 2019-05-20 07:12:09 +02:00
Daniel Chappuis
ed4f76f7c6 Add initMass and massInverse to DynamicsComponents 2019-05-18 21:52:51 +02:00
Daniel Chappuis
29c8587c85 Add linear/angular damping into DynamicsComponents 2019-05-18 14:00:25 +02:00
Daniel Chappuis
aa4935f396 Add external force/torque in DynamicsComponents 2019-05-17 17:39:30 +02:00
Daniel Chappuis
81303fbaeb Add split velocities into the DynamicsComponents 2019-05-17 07:29:54 +02:00
Daniel Chappuis
9afedae1a7 Use DynamicsComponents for constrained linear/angular velocities in solvers 2019-05-16 17:46:26 +02:00
Daniel Chappuis
ac0e620f02 Remove old code 2019-05-12 14:26:55 +02:00
Daniel Chappuis
e672c0d617 Refactor contacts and islands 2019-05-10 17:37:11 +02:00
Daniel Chappuis
1c91ef7d48 Refactor islands creation 2019-04-27 15:02:21 +02:00
Daniel Chappuis
d9342c55f5 Working on contacts refactoring 2019-04-22 16:15:47 +02:00
Daniel Chappuis
95210623e3 Fix for issue79 2019-04-19 11:25:56 +02:00
Daniel Chappuis
bf3ca2c4d6 Refactor contacts management 2019-04-19 11:20:21 +02:00
Daniel Chappuis
d8e9f15339 Simplify broad-phase 2019-03-31 00:48:46 +01:00
Daniel Chappuis
f9451e1fe1 Refactor Stack class and add Set::toList() method in Set 2019-03-31 00:48:05 +01:00
Daniel Chappuis
d0fbab77ce Simplify broad-phase 2019-03-26 22:57:38 +01:00
Daniel Chappuis
8911351c8f Fix issue in DynamicsComponents 2019-03-26 22:56:29 +01:00
Daniel Chappuis
102651832a Simplify broad-phase collision detection 2019-03-25 18:47:42 +01:00
Daniel Chappuis
703f91b4d3 Modifs in Map and Set containers 2019-03-25 07:35:40 +01:00
Daniel Chappuis
dcc07447a8 Remove localBoundsAABB from ProxyShapesComponents 2019-03-21 17:36:35 +01:00
Daniel Chappuis
fe81c3fd6e Add DynamicsComponents class 2019-03-21 07:29:59 +01:00
Daniel Chappuis
1d6155aa6c Remove code to update proxy-shape broad-phase state from proxy-shape, move it to broad-phase system 2019-03-17 22:50:10 +01:00
Daniel Chappuis
ae076ad815 Handle disabled components 2019-03-16 08:40:50 +01:00
Daniel Chappuis
91416ae5ba Refactor components 2019-03-16 07:50:34 +01:00
Daniel Chappuis
d02b25d32a The proxy-shapes are now entities 2019-03-15 17:27:11 +01:00
Daniel Chappuis
246f2312b9 Merge branch 'master' into allocators 2019-03-11 11:14:27 +01:00
Daniel Chappuis
061469a539 Check that proxy-shape is part of broad-phase before updating it in RigidBody 2019-03-11 11:12:42 +01:00
Daniel Chappuis
4b919fb4fc Make BroadPhaseAlgorithm a system 2019-03-04 17:29:27 +01:00
Daniel Chappuis
ca87fb624d Remove mutexes and do not use static pool and single frame memory allocators 2019-02-28 17:25:37 +01:00
Daniel Chappuis
2ce0f8d76f Make memory allocators thread-safe 2019-02-22 07:27:47 +01:00
Daniel Chappuis
117cbdafb7 Fix issue with friction constraint in contact solver 2019-02-12 20:25:38 +01:00
Daniel Chappuis
528d7bfd45 Fix issue in SAT algorithm 2019-01-28 18:51:04 +01:00
Daniel Chappuis
6bcb586d52 Fix issue with bias in SATAlgorithm and add asserts 2019-01-24 17:50:50 +01:00
Daniel Chappuis
827b14f1b0 Small modifs in ECS 2019-01-18 17:46:19 +01:00
Daniel Chappuis
6ef177329b Fix issue with very small determinant when inverting a 3x3 matrix 2019-01-16 20:43:16 +01:00
Daniel Chappuis
c5c7e81260 Add fields to ProxyShapesComponents 2019-01-14 18:35:51 +01:00
Daniel Chappuis
7d8f043cdb Replacing ProxyShape data by corresponding component data 2019-01-12 18:56:55 +01:00
Daniel Chappuis
449beaf7a6 Replacing ProxyShape data by corresponding component data 2019-01-11 17:34:30 +01:00
Daniel Chappuis
9fb8580830 Replacing ProxyShape data by corresponding component data 2019-01-11 07:38:55 +01:00
Daniel Chappuis
176186e126 Replacing ProxyShape data by corresponding component data 2019-01-11 07:25:35 +01:00
Daniel Chappuis
5a1d10a991 Add proxy-shapes mapping in ProxyShapesComponents 2019-01-10 07:41:10 +01:00
Daniel Chappuis
d8d490bff9 Fix issues with components and remove components when entities are destroyed 2019-01-09 12:19:58 +01:00
Daniel Chappuis
4e438d3ccc Add ProxyShapesComponents 2019-01-08 18:39:36 +01:00
Daniel Chappuis
96b02cfcca Modifs in TransformComponents 2019-01-03 14:01:11 +01:00
Daniel Chappuis
3d892a6689 Handle sleeping bodies in TransformComponents 2018-12-28 22:15:34 +01:00
Daniel Chappuis
8b6249829a Add Transform component 2018-12-26 23:33:36 +01:00
Daniel Chappuis
fa9b1817fe Start working on ECS 2018-12-23 23:18:05 +01:00
Daniel Chappuis
d905ff5c7f Small changes in Deque and Pair 2018-12-23 23:15:39 +01:00
Daniel Chappuis
0c3f5ae5e6 Add Deque container 2018-12-14 00:02:40 +01:00
Daniel Chappuis
6e67b83ca4 Modifs in NarrowPhaseBatch info classes 2018-12-01 13:17:32 +01:00
Daniel Chappuis
05d05c3fd8 Create SphereVsCapsuleNarrowPhaseInfoBatch 2018-11-29 17:33:27 +01:00
Daniel Chappuis
11ddc3f079 Create CapsuleVsCapsuleNarrowPhaseInfoBatch class 2018-11-29 07:08:39 +01:00
Daniel Chappuis
6413d479ad Create SphereVsSphereNarrowPhaseInfoBatch class 2018-11-27 07:27:38 +01:00
Daniel Chappuis
5e57ea896a Refactor NarrowPhaseAlgorithm and make possible to use single frame allocator for NarrowPhaseInput memory allocation 2018-11-09 17:19:28 +01:00