Commit graph

35 commits

Author SHA1 Message Date
Erik Ogenvik
d4604d034d Correctly handled updated type properties.
When a type is updated we now property re-apply modified properties on
affected entities.
2018-04-29 17:21:44 +02:00
Erik Ogenvik
0f1559ba16 Reload types when they change. 2018-04-29 11:59:33 +02:00
Erik Ogenvik
664988645e Make all properties define type and optional name. 2018-04-27 23:12:15 +02:00
Erik Ogenvik
6114bad0df Update geometry when mesh files change. 2018-04-27 23:12:15 +02:00
Erik Ogenvik
c23b322ead Use "add" and "remove" for flags.
Since it's more descriptive.
2018-04-25 20:15:28 +02:00
Erik Ogenvik
f582e0613b Allow scaling axis to be set using "scaler" attr. 2018-04-18 20:19:31 +02:00
Erik Ogenvik
a8e21ddfc5 Added more sphere options.
Where radius is determined by selected axis.
2018-04-15 13:29:49 +02:00
Erik Ogenvik
070b0a6c85 Check for where to plant entities.
If an entity is in mode "planted" we should check for any existing
planted entities below it, to see if we should add it on top of them, or
on top of the terrain.
2018-03-23 23:07:09 +01:00
Erik Ogenvik
b06ba3da1c Fixed incorrect geometry calculations. 2018-03-19 22:05:48 +01:00
Erik Ogenvik
1ef3652f74 Allow type properties to be ephemeral.
Which means that they won't be persisted, and also not removed when the
type is synced with an EntityFactory.
This fixed an issue with tools having their bbox removed when operations
where added to them.
2018-03-09 14:53:53 +01:00
Erik Ogenvik
72e7a5e0c2 Move resting entities along.
I.e. when an entity is moved, and there are other entities resting on
top of it, move them along too.
2018-03-09 14:37:11 +01:00
Erik Ogenvik
f3736e0984 More fixes for older Bullet versions. 2018-03-08 22:29:47 +01:00
Erik Ogenvik
553e440a6a Fix version number check. 2018-03-08 22:14:16 +01:00
Erik Ogenvik
5894bac3af Support older versions of Bullet. 2018-03-08 22:01:13 +01:00
Erik Ogenvik
065505b07e Added compound shapes.
These are useful when you want to represent concave shapes with more
fidelity (since they otherwise would be represented by a convex hull
when on "free" mode).
2018-03-07 15:22:13 +01:00
Erik Ogenvik
8913f454dd Use convex hulls for moving meshes.
GImpact is just too slow, and we don't need the fidelity.
2018-03-06 16:30:08 +01:00
Erik Ogenvik
98166a57e0 Added support for free mesh geometry.
We do this by using the GImpact shapes. These work, but are resource
intensive. So make sure you don't use too many of these in free mode.
This isn't thouroughly researched though. It might be worth looking into
btCollisionHull, or to alter some of the parameters to fine tune the
simulation.
2018-03-05 12:42:10 +01:00
Erik Ogenvik
b2799db1f2 Only update bbox from geometry if none set. 2018-02-22 19:34:08 +01:00
Erik Ogenvik
2590f4ded9 Fixed issue with invalid inertia for meshes. 2018-02-20 22:26:27 +01:00
Erik Ogenvik
bebbf83809 Correctly calculate index offset. 2018-02-15 16:52:33 +01:00
Erik Ogenvik
9bc54bca52 Reorganize and add "present-" properties.
The ambition is to have "present-" properties for all types.
2018-02-15 12:39:34 +01:00
Erik Ogenvik
a387265396 Work with older compilers. 2018-02-06 15:11:16 +01:00
Erik Ogenvik
fe36774f5b Use "type" instead of "shape" for geometry.
Since we now support "asset".
2018-02-06 13:45:11 +01:00
Erik Ogenvik
780318558d Allow assets directory to be set in config. 2018-02-06 13:45:11 +01:00
Erik Ogenvik
3f8d39047e Update bbox from the mesh.
When a mesh is used for geometry, a bbox should not be specified as
that's inferred from the mesh.
2018-02-06 13:45:11 +01:00
Erik Ogenvik
67b907bee3 Declare asset geometry on the "geometry" property.
I.e. don't use the GeometryFile property.
2018-02-06 13:45:11 +01:00
Erik Ogenvik
7127d39f13 More work on moving to left hand coord system. 2018-02-06 13:45:10 +01:00
Erik Ogenvik
99640d26aa Use a left hand coord system. 2018-02-06 13:45:10 +01:00
Erik Ogenvik
6143a781e5 Correctly calculate offsets for spheres. 2017-09-03 23:13:50 +02:00
Erik Ogenvik
df77523d16 Properly handle mesh geometry. 2017-03-19 14:36:35 +01:00
Erik Ogenvik
03a0327b8c Fixed offset calculation. 2017-03-15 21:16:46 +01:00
Erik Ogenvik
8fc041aadb Added tests for geometry property. 2017-02-12 21:41:11 +01:00
Erik Ogenvik
55e5153c47 Fixed some smaller issues. 2017-01-03 14:09:38 +01:00
Erik Ogenvik
21f62ea137 Moved shape creation to geometry property.
This optimizes mesh handling, since only one btBvhTriangleMeshShape
instance will be created per type.
2017-01-02 23:52:49 +01:00
Erik Ogenvik
596ffad815 Added properties for geometry and angular factor.
For now we'll only support a limited set of geometry shapes.
2016-12-15 18:27:42 +01:00