1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-04 02:41:19 +00:00
Commit Graph

8 Commits

Author SHA1 Message Date
clang-format-bot
ddb0522bbf
Apply clang-format to code base 2022-09-22 21:35:26 +03:00
elsid
7c5a590890
Replace float type for arguments to create heightfield with int
To reduce amount of computations on the caller side and restrict possible
values.

* verts can't be non-int because it's a number of things.
* worldsize is initially defined as int by ESM::Land::REAL_SIZE.
* Put function to calculate heightfied shift into components to be able to
  reuse by other binaries.
2021-10-11 19:28:08 +02:00
Gleb Mazovetskiy
351d11449b Avoid heightfield conversion in newer Bullet
Takes advantage of the direct `float` support implemented in
https://github.com/bulletphysics/bullet3/pull/3293
2021-03-11 23:52:12 +00:00
Gleb Mazovetskiy
1fb442e701 heightfield: Only buildAccelerator on Bullet 2.89+
Fixes #5874
2021-03-01 08:27:24 +00:00
Gleb Mazovetskiy
21a70b7d2b heighfield: buildAccellerator()
This enables accelleration of heightfield collisions.

Unfortunately, `btHeightfieldTerrainShape::processAllTriangle` does not
yet use the accellerator data, so this change does not improve
performance yet but might do so in future bullet versions.

References:

* Accellerator introduced in:
  https://github.com/bulletphysics/bullet3/pull/2062

* Feature request to use the accellerator in `processAllTriangle`:
  https://github.com/bulletphysics/bullet3/issues/3276
2021-02-26 14:38:06 +00:00
fredzio
d015f17a6c Make all physics object manage their own resources
Use smart pointer for heightfields and their members.
Move collision object addition inside of Object's ctor, as for Actors and HeightFields
2021-01-10 14:56:35 +01:00
elsid
2d7c3bae61
Support bullet with double precision 2020-05-13 19:24:28 +02:00
elsid
c866fdff86
Move physics object, heightfield, ptrholder into separate files 2018-10-13 22:16:24 +03:00