Commit Graph

1029 Commits (d016051fa028a485b09fac47b3fa3d8fd08e207a)

Author SHA1 Message Date
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 42802669dd BulletSim: fix regression that caused cylindar shapes to have a box collision shape 2012-09-27 22:01:31 -07:00
Robert Adams 22290ef35a BulletSim: complete code for managed code shape and body tracking. Not debugged.
Eliminate some null exceptions created adding the above code.
Add and remove some detailed logging statements.
2012-09-27 22:01:26 -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 ee7cda261c BulletSim: move a bunch of common logic out of BSPrim and BSCharacter
and into the parent class BSPhysObject.
Rework collision logic to enable extra collision after done colliding.
Rename 'Scene' to 'PhysicsScene' to differentiate it from the simulator 'Scene'.
2012-09-27 22:01:11 -07:00
Robert Adams b602b476ad BulletSim: update DLLs and SOs and remove some debugging code. 2012-09-15 15:36:13 -07:00
Robert Adams c77be802d2 BulletSim: some debugging prints in BSPrim for tracking changes in linkset children. 2012-09-15 15:32:16 -07:00
Robert Adams 1826b2b18e BulletSim: add the debugging routine DumpRigidBody2() to API2. 2012-09-15 15:32:11 -07:00
Robert Adams f35bd6eb7d BulletSim: another attempt at computing physics FPS correctly. 2012-09-15 15:32:05 -07:00
Robert Adams dcb94b8a24 BulletSim: remove timeStep parameter from calls for vehicle parameter setting. There is no reason these should be using the simulation time interval for parameter calculation. 2012-09-15 15:31:59 -07:00
Robert Adams 6632eb7c05 BulletSim: Remove calculation and passing of unused collied object type.
Fix collision code to properly sense mega-region children regions as terrain.
When setting an object physical, reset all the physical properties (friction, ...).
2012-09-15 15:31:54 -07:00
Robert Adams f0a098924e BulletSim: set all linkset objects center of mass to the whole linkset's center of mass 2012-09-15 15:31:49 -07:00
Robert Adams 7c347f4c5c BulletSim: Add calls to linkset class when object going static or dynamic.
Reset center of mass on an object when going dynamic.
2012-09-15 15:31:44 -07:00
Robert Adams d86cbe6379 BulletSim: remove unused NeedsMeshing() code from BSScene. 2012-09-15 15:31:39 -07:00
Robert Adams c0fec70b1a BulletSim: Add 'IsNativeShape2' call 2012-09-15 15:31:34 -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 189f51233e BulletSim: PhysicsActorType() now returns the correct value rather than 'unknown'. 2012-09-07 16:05:16 -07:00
Robert Adams 76dc29dc37 BulletSim: Modify collision flag calls to return the current flags.
Track current collision flags in BSPrim.
Add BulletSimAPI calls for saving and restoring rigidBodies using
    construction information structure.
2012-09-07 16:05:11 -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 d3adf9b2b3 BulletSim: fix line endings. 2012-08-31 11:41:23 -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
Robert Adams 7b6987ce83 BulletSim: unify physical objects under BSPhysObjects. Now BSScene and BSLinkset only know of BSPhysObject's and there is only one list to search in BSScene. 2012-08-31 11:41:12 -07:00
Robert Adams 0376b8ddbc BulletSim: add new interface for mesh, hull and terrain creation that will move nearly all of the logic into the C# code. 2012-08-31 11:41:07 -07:00
Robert Adams 7243d4f842 BulletSim: Properly regenerate hulls when objects made physical.
This fixes the problem of non-base shapes (cubes and spheres)
    falling through the terrain.
2012-08-17 14:45:18 -07:00
Robert Adams 03d76e9403 BulletSim: restore most of the Detail logging statements. Will have
no effect on non-logging running.
Capture region name that is passed to the physics engine and use
    it for detail logging file name prefix.
Fix problem with avatars dropping when flying across region boundries.
2012-08-17 13:34:22 -07:00
Robert Adams ccc69d66a1 BulletSim: add parameters and functionality to specify the mesh
level of detail for large meshes.
Remove parameter and code for DetailLog (conditional logging into
   regular log file).
2012-08-17 13:34:18 -07:00
Robert Adams 8eda290262 BulletSim: comments and parameter changes in dynamics engine. 2012-08-17 13:34:16 -07:00
Robert Adams e31e23d68d BulletSim: in BSDynamics, merge 'flags' and 'hoverFlags' as they are defined for the same bits and it makes the code less complicated. 2012-08-17 13:34:14 -07:00
Robert Adams 376441e550 BulletSim: make it so objects in a linkset do not generate collisions with each other. 2012-08-15 16:29:50 -07:00
Robert Adams dd10cf01e7 BulletSim: add hinge constraint.
Update BulletSimAPI with new constraint related function calls.
Reorganize locking in BS6DofConstraint.
Update BS6DofConstraint to do constraint reset correctly.
Add new 'midpoint' construction of 6Dof constraint.
2012-08-15 12:08:21 -07:00
Robert Adams 9efe7bf7ba BulletSim: add locking to constraintCollection and rename some of the public method variables to reduce confusion between a physics scene and the real scene. 2012-08-15 12:08:17 -07:00
Robert Adams 68f112888b BulletSim: clean up detail logging by adding many more debug log statements and then commenting out most of the additions. 2012-08-15 12:08:13 -07:00
Robert Adams b05a2fc4ed BulletSim: don't recreate mesh unless it needs it when rebuilding the hull. Make sure the collisionCollection is reallocated each tick to fix race condition of it being cleared while still in use. 2012-08-15 12:08:09 -07:00
Robert Adams 257446889b BulletSim: fix problem of a null reference exception on shutdown if there were linksets in the region. 2012-08-15 12:08:05 -07:00
Robert Adams 77a7758cf5 BulletSim: Refactor BSConstraintCollection to add a new RemoveAndDestroyConstraint(BSConstraint xx) 2012-08-15 12:08:01 -07:00
Robert Adams c1c1d48af1 BulletSim: add BSConstraint.RecomputConstraintVariables for the recomputation after linksets changed, etc 2012-08-15 12:07:57 -07:00
Robert Adams 6f1f299619 BulletSim: Add the class BSCharacter to the DetailLog output 2012-08-15 12:07:53 -07:00
Robert Adams 11a4b9ec1d BulletSim: rework physics FPS calculation to make a more realistic number. 2012-08-15 12:07:49 -07:00
Robert Adams 0c7ce4fc98 BulletSim: many, many detailed logging messages for physical linkset
debugging.
Linkset bugs fixed where accounting of children would get lost.
Moved scene based vehicle tracking logic from prim to the scene.
Added GetCollisionFlags2 method to BulletSimAPI.
Updated DLLs and SOs.
2012-08-10 16:22:44 -07:00
Robert Adams 3ca770cd2c BulletSim: Add module names to DetailLog output. Fix some problems with linksets that were caused by checking data structures that are changed regularly from taint time code -- resulted in linksets not being unlinked properly. 2012-08-10 08:33:09 -07:00
Robert Adams 320982cae3 BulletSim: add an identifier to the TaintObject call so exceptions that happen when the taint is invoked can be debugged 2012-08-09 15:17:19 -07:00
Robert Adams 38e79b80a8 BulletSim: separate out the constraints by type. The linksets use
6dof constraint but eventually others will be exposed so future
features can use all the Bullet capabilities.
Force children to generate a position update when unlinked.
2012-08-09 15:01:05 -07:00
Robert Adams 5ab151c2d6 BulletSim: add avatar code to keep avatars from ending up trapped under the terrain 2012-08-08 13:48:49 -07:00
Robert Adams 19417fca41 BulletSim: Added avatar capsule scaling for size of avatar.
This also fixes computation of avatar mass.
Added parameter MaxPersistantManifoldPoolSize.
Fixed a parameter setting bug which caused crashes of there were
  more than 400 or so physical objects. I tested up to 5000.
Updated BulletSim DLLs and SOs.
2012-08-07 17:15:06 -07:00
Robert Adams 4adb3471ac BulletSim: update SOs and DLLs to run on more Linux versions. Correct multiple buoyancy settings when character flying. Remove chatty log message on prim destruction. 2012-08-06 12:55:52 -07:00
Robert Adams e7ad6ed3a3 BulletSim: pass collision subscription information to the C++ code so collisions on objects that don't care are not reported up. 2012-08-03 15:09:56 -07:00