198 Commits

Author SHA1 Message Date
Irlan
bd4ca5d143 fix assert 2018-04-20 22:31:03 -03:00
Irlan
57a0809bcb optimization 2018-04-20 22:12:41 -03:00
Irlan
1f3fe9f873 optimize conversion 2018-04-20 19:24:01 -03:00
Irlan
63f034535e erase dep, constexpr, cleanup 2018-04-20 19:22:20 -03:00
Irlan
231b9c29d0 contact cluster return number of iterations 2018-04-20 03:08:21 -03:00
Irlan
ffed35d10a cleanup hull validation 2018-04-20 01:23:08 -03:00
Irlan
0e0438e0a9 assert 2018-04-19 20:23:43 -03:00
Irlan
a4f861a93a make centroid computation more robust too 2018-04-19 19:54:32 -03:00
Irlan
7d71713bea store hull features on the stack 2018-04-19 19:42:37 -03:00
Irlan
18f4e59518 make hull inertia more robust
Use a point inside the hull as the reference point.

Of course, had to shift the inertia to the local center of mass then to the world body origin.
2018-04-19 15:06:31 -03:00
Irlan
6d76caad1d move capsule inertia to the body frame
With this bugfix capsule motions are realistic.
2018-04-19 03:21:50 -03:00
Irlan
efae0fc202 use unsigned integers instead of integers in some collision code 2018-04-18 17:20:39 -03:00
Irlan
235b59a560 typo 2018-04-18 14:41:48 -03:00
Irlan
d497fa4a23 typo 2018-04-18 14:30:19 -03:00
Irlan
849133a75e typo 2018-04-17 14:07:20 -03:00
Irlan
46a0f2497e optimization 2018-04-17 03:21:02 -03:00
Irlan
75fe47b453 comment, bugfix, and simplification 2018-04-17 03:11:35 -03:00
Irlan
9b01af3d70 typo 2018-04-17 02:38:01 -03:00
Irlan
1bb6eb9649 typos 2018-04-17 02:33:48 -03:00
Irlan
01eea90b3c typos 2018-04-17 02:29:37 -03:00
Irlan
7d1c0ab017 typo 2018-04-17 02:19:04 -03:00
Irlan
eb428d169f typo 2018-04-17 02:03:28 -03:00
Irlan
bfb2665930 rewrite hull inertia computation 2018-04-17 02:00:21 -03:00
Irlan
28367b8108 add b3QHull object
b3QHull allows users to create hull shapes from a list of points quickly. Example usage:

vec3* points = 0;
uint count = create_points(points);

b3QHull hull;
hull.Set(points, count);
2018-04-17 01:58:36 -03:00
Irlan
5e0a010881 cleanup quickhull 2018-04-17 01:53:36 -03:00
Irlan
fd04c35886 scale integrals before adding 2018-04-13 23:39:10 -03:00
Irlan
151ce1f385 rewrite hull inertia
Rewrite the algorithm that calculates the inertia tensor for a hull, inner loops

Also add a reference explaining the derivation
2018-04-13 22:06:04 -03:00
Irlan
bd09b243c2 use mvc for the testbed, update almost all tests, bugfixes, improvements, cleanup
Since I started altering the testbed for better maintainability, I prefered to drop this (tested) large change with a single commit. Some changes below:

Put some globals in their correct place,

Now Testbed uses the MVC pattern (Model-View Controller). This way it becomes better to maintain than using no pattern  in my opinion.

Fixed some bugs in the debug draw interface.

Of course, updated almost all tests because of the differences.

Update script.
2018-04-10 00:57:14 -03:00
Irlan
49f7b2f728 add tension mapping test 2018-04-08 21:38:09 -03:00
Irlan
5342361a5d use gravity 2018-04-08 00:13:29 -03:00
Irlan
6dd32061d7 rename contact areas to contact polygons 2018-04-07 01:34:11 -03:00
Irlan
54202454ea rename contact areas to contact polygons 2018-04-07 01:28:48 -03:00
Irlan
8e615d3ca4 typo 2018-04-06 21:58:00 -03:00
Irlan
d657d649e3 rearrange some code 2018-04-05 23:36:21 -03:00
Irlan
ba3fb6deb6 bugfix in hull inertia 2018-04-05 19:23:47 -03:00
Irlan
87b4efc6b5 ensure valid inertia tensors 2018-04-05 18:35:21 -03:00
Irlan
fecd622b92 rearrange input and output arguments 2018-04-03 23:01:26 -03:00
Irlan
676fe352a6 use operators, increase CG tolerance 2018-04-02 20:41:27 -03:00
Irlan
256ea14327 bugfix 2018-04-02 20:38:35 -03:00
Irlan
246072f2d3 optimization 2018-04-02 16:56:55 -03:00
Irlan
c1a5d1b93f fix #34 2018-04-02 13:06:32 -03:00
Irlan
40093fcf2f improve CG performance using CSR matrix format 2018-04-02 12:47:56 -03:00
Irlan
615d243b14 separate square from rectangular matrices 2018-04-02 12:45:54 -03:00
Irlan
cc425786bc comment 2018-03-28 01:14:45 -03:00
Irlan
e22ed9852a bugfixes and improvements
Bugfixes:

Simplify and correct one derivation of a second derivative of energy function.

Clear dynamic variables for static shapes

Invalidate contact for a particle when its type switches from dynamic to static

Improvements:

Allow user to apply force to a particle

Allow user to displace a particle

Compute kinetic energy

Store the mass of each particle, not only its inverse. It can improve performance because the solver needs the masses most of the time for computations

Add some code to find shared and non-shared edges. These algorithms don't work for non-manifold meshes

Remove some unecessary temporaries decreasing code readability
2018-03-28 01:08:19 -03:00
Irlan
4d5c0644b3 typo 2018-03-26 17:00:11 -03:00
Irlan
42c8a998fb store number of iterations 2018-03-26 16:59:04 -03:00
Irlan
a21d46ac64 add MCG without Jacobi preconditioning, delegate cloth solver to another class, ignore positive separation, improve contact handling, support different shapes
Specially, see b3SpringSolver.cpp for details.
2018-03-26 16:03:43 -03:00
Irlan
3e55b28956 add collision detection routines for shape against sphere 2018-03-26 15:56:01 -03:00
Irlan
be812ed897 add collision (no friction) 2018-03-24 02:21:31 -03:00