Commit Graph

36 Commits (ae4d932e7f00e781db9c9cdd5c29efc51e2425fb)

Author SHA1 Message Date
Robert Adams ae4d932e7f BulletSim: Move all the parameter variables, tables and get and fetch logic to a separate, static class for easier addition and to remove all that bulk from the BSScene class. 2012-12-21 13:35:44 -08:00
Robert Adams 4cbc5082ff BulletSim: refactor to combine common terrain height testing code. Add function to test if a position is over known terrain. 2012-12-16 21:19:12 -08:00
Robert Adams f3b1efd889 BulletSim: remove some errors on shutdown by moving terrain destruction until after physical object destruction. TerrainManager also made disposable and that feature used. 2012-12-16 21:19:11 -08:00
Robert Adams 3b2b785a46 BulletSim: Add 'BulletSimData' which separates structures created
for the operation of BulletSim and those defintiions/structures defined
so they can be used in the unmanaged world.
Consolidate setting of collision flags so implementation is not scattered.
2012-12-13 16:32:06 -08:00
Robert Adams 9df85eadf4 BulletSim: Fix crash on the destruction of physical linksets.
While fixing the above, add methods to physical body and shape pointer
wrapper so routines won't have to know that IntPtr.Zero means no
physical instance.
Fix problem with physical linksets failing after a few sits and
unsits by properly restoring child prom positions for compound
linksets after multiple selection and deselections.
2012-12-10 15:35:53 -08:00
Robert Adams 787636b97a BulletSim: Reduce idle region physics overhead where there are MANY
static objects by more restrictive selection of objects that collide
    with static objects.
Rename collision mask fuctions from 'filter' to 'group' so it is clear
    what is being set.
Rename BulletSimAPI.SetCollisionFilterMask() to SetCollisionGroupMask to match above.
Restore passing of time step to linear and angular motion component routines.
Use buffering vehicle physical parameter get/set routines consistantly.
Make range enforcement clearer by using ClampInRange() function for parameter setting.
Remove commented out experimental vehicle calculations.
2012-12-03 16:25:51 -08:00
Robert Adams 0a66317fa6 BulletSim: move GetWaterLevelAtXYZ from BSScene to BSPhysTerrain. 2012-11-28 09:48:33 -08:00
Robert Adams c3f30fef96 BulletSim: add parameter for terrain collision margin.
Add locking around unlikely but possible race conditions on terrain list.
2012-11-25 20:04:27 -08:00
Melanie 3b2caa63b0 Rename BulletSim's PhysicsShapeType to BSPhysicsShapeType because it
conflicts with PhysicsShape type defined in later libOMV
2012-11-22 14:45:41 +00:00
Robert Adams cbc7e7bf85 BulletSim: Make avatar capsule so it is not circular.
Simple attempt to make avatars better shaped.
Replace parameter 'avatarCapsuleRadius' with 'avatarCapsuleWidth'
and 'avatarCapsuleDepth'.
More tweeking to avatar height calculation. A little better but
short avatar's feet are above the terrain and tall avatar's feet
are a little below the ground.
2012-11-21 16:43:53 -08:00
Robert Adams 4a0de01704 BulletSim: Properly position mesh terrain on creation (fixes terrain not appearing to be working). Centralize terrain shape creation logic. Remove very chatty detail log messages. 2012-11-21 16:43:45 -08:00
Robert Adams a59368c4a1 BulletSim: add terrainImplementation parameter with default to Mesh. 2012-11-21 16:43:37 -08:00
Robert Adams 34cbc738a8 BulletSim: enablement and debugging of mesh terrain. 2012-11-21 16:43:21 -08:00
Robert Adams 71b9640dfa BulletSim: pull heightmap implementation out of the terrain manager so a mesh terrain can be implemented. 2012-11-21 16:43:14 -08:00
Robert Adams d6db0d5740 BulletSim: uplevel PhysicsShapeType out of ShapeData structure (since it is getting simplified out of existance someday) and update all the references to that enum. 2012-11-21 16:42:50 -08:00
Robert Adams b0eccd5044 BulletSim: debugging of compound shape implementation of linksets.
Add compound shape creation and freeing in shape manager.
Add optional taint-time execution method and update code to use it.
Add API2 linkage for more compound shape methods (get num, get/remove by index, ...)
Modify perferred shape return so linkset children can have differet shapes than root.
Add Position and Orientation calls to linksets so children can be moved around by
    the linkset by its own calculation. Allows for very general linkset implementations.
2012-11-03 21:15:30 -07:00
Robert Adams 804b332d45 BulletSim: Add banking and other new code to vechile dynamics. Add third party license and contributor in for for Aurora-Sim project for physics code. 2012-11-03 21:12:46 -07:00
Robert Adams b6fc5bad00 BulletSim: fix problem with avatars sinking into the ground.
Change terrain activation state to DISABLE_SIMULATION for better performance.
2012-10-23 17:30:43 -07:00
Robert Adams 14eeb8b31b BulletSim: fix bug that caused error (and a crash on 32 bit Linux) when mesh assets weren't already in the cache. Comment cleanups. 2012-10-22 22:24:59 -07:00
Robert Adams f422b9b388 BulletSim: reorder avatar collision checking to eliminate double collision_end.
Various tweekings to avatar shape/mass/inertia/etc.
Remove change from avatar radius to diameter. But still the avatar sinks.
Collision_end now happens immediately rather than at the next subscription time.
2012-10-19 10:52:31 -07:00
Robert Adams fc33afddd3 BulletSim: remove code in ShapeCollection that hinted at shape sharing.
Add new function to ParameterDefn for calling BulletSimAPI to set values.
Tweaking to BSCharacter parameter setting to try and have avatars stand.
2012-10-19 10:52:14 -07:00
Robert Adams 919569f6ec BulletSim: Change defaults for constraint CFM and ERP to make large linksets more rigid. Remove mass calculation for terrain (it should stay a static object). 2012-10-11 14:01:14 -07:00
Robert Adams a791620622 BulletSim: cosmetic changes (comments and renaming). Give mass to terrain to improve interactions. 2012-10-11 14:01:10 -07:00
Robert Adams 7b65985047 BulletSim: remove the trailing spaces from lines to make git happier 2012-09-27 22:02:03 -07:00
Robert Adams f82b903dee BulletSim: Fix linkset crash. Caused by the different body and shape
pointers at runtime and at taint-time. Now passes the body into the
    taint.
Vehicles zero inertia when active to eliminate Bullet's contribution
    to vehicle motion.
2012-09-27 22:01:52 -07:00
Robert Adams 4589bc84a3 BulletSim: Terrain sets proper collision flags on creation.
Static objects are set to ISLAND_SLEEPING rather than DISABLE_SIMULATION.
    Might reconsider this and, alternatively, have dynamic objects force activation.
Clean up use of DetailLog().
2012-09-27 22:01:47 -07:00
Robert Adams 735d89e369 BulletSim: btGhostObjects working to make 'volume detect' work.
Rearrangement and cleanup of shape collection code. Much more readable.
Enabling and use of collision filters and masks.
Addition of ID to body creation BulletSimAPI calls so always set in
    shape for collision reporting.
Change default of ShouldSplitSimulationIslands and ShouldRandomizeSolverOrder
    from 'false' to 'true'. When 'false', this suppresses NO_CONTACT_RESPONSE
    which makes volume detect fail.
2012-09-27 22:01:42 -07:00
Robert Adams d016051fa0 BulletSim: renamed members of BulletShape, BulletSim and BulletBody
so the members case is consistant. Caused modifications everywhere.
New logic in BSShapeCollection to track use and sharing of shapes.
    I just reslized, though, that shapes cannot be shared because the
    shape's UserPointer is the localID of the prim and is required
    for tracking collisions. More changes coming.
Added DuplicateCollisionShape2() to API and changed BuildNativeShape2
    to take a ShapeData structure so don't have to pass so many parameters.
    This matches the latest version of BulletSim.dll.
Additions and removal of DetailLog() statements for debugging.
2012-09-27 22:01:37 -07:00
Robert Adams a27e4ce6cb BulletSim: add class and infrastructure for shape and object
tracking in the C# code. Needed for the changing body type
    (to and from GhostObjects) for volumeDetect.
2012-09-27 22:01:21 -07:00
Robert Adams 91efccabdc BulletSim: Convert BSCharacter to use common BSPhysObject code and variables.
Fix avatar height calculation to properly account for the capsule ends.
Rearrange some locking in TerrainManager to eliminate possible race conditions.
Move DetailLog() definition into common BSPhysObject class.
Some variable renaming to make usage clearer (refactor.rename makes this so easy).
2012-09-27 22:01:16 -07:00
Robert Adams 2c5ff93990 BulletSim: Way too many changes in one commit.
Many changes to BSDynamic for readability and commentary.
Linkset hacking for vehicles: don't over mass the root prim.
Add parameter for link constraint solver iterations.
Correct uses of timestep in timescale calculations for vehicles.
Reorganize code/logic for making objects static and dynamic for readability
    and use of API2.
Changed most calls in BSPrim to use API2 calls (the new way).
Avatars do not generate default Bullet collision events but do call up
    to the simulator for every avatar. Reduces overhead.
Objects added to collision list only if they are processing collisions.
    Reduces overhead especially for large numbers of avatars.
Generalize call for water height to GetWaterHeightAtXYZ().
Catch and correct exception getting terrain height when out of bounds.
Correct race condition in Terrain Manager where creation wasn't at taint-time.
Add API calls for constructing compound shapes.
Move NeedsMeshing() logic into object class.
Reorganize logic for object meshing to reduce rebuilding of meshs/hulls.
2012-09-15 15:31:29 -07:00
Robert Adams 126eae7100 BulletSim: Add Bullet body and shape to BSPhysObject and rename
'Body' to 'BSBody' for disambiguation when reading code.
Complete the API2 interface so nearly all methods on bullet
    classes are available to the managed code. The efficient
    single call simulation step is kept in place while all
    other creation/destruction/parameterization can be done
    in the managed code.
2012-09-07 16:05:28 -07:00
Robert Adams 3c097cb7a9 BulletSim: Add some comments (gasp) and log messages. 2012-09-07 16:05:22 -07:00
Robert Adams ffdc798720 BulletSim: Update BulletSimAPI to match the DLL interface.
Major rework of terrain management which finally makes mega-regions work.
Update heightmap of terrain by rebuilding the terrain's body and shape.
    There is a problem with just replacing the shape so this workaround
    will do for the moment but it will need to be resolved for
    mesh and hull switching.
2012-08-31 11:41:33 -07:00
Robert Adams ae852bb873 BulletSim: clean up some variable naming for consistancy.
Update DLL API for new terrain and shape/body pattern methods.
Terrain creation and modification uses new shape/body pattern.
Move debug logging callback set to initialization call so logging
   is per physics engine.
2012-08-31 11:41:28 -07:00
Robert Adams 7c140570db BulletSim: Changes to terrain storage and management so mega-regions work.
Moved all terrain code out of BSScene and into new BSTerrainManager.
Added logic to manage multiple terrains for mega-regions.
Added new functions to BulletSimAPI to match the library.
Moved all of the terrain creation and setup logic from C++ code to C# code.
    The unused code has not yet been removed from either place. Soon.
Moved checks for avatar above ground and in bounds into BSCharacter.
2012-08-31 11:41:18 -07:00