aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs (unfollow)
Commit message (Collapse)AuthorFilesLines
2012-04-24Restore _parent_scene.actor_name_map[prim_geom] = this; accidentally removed ↵Justin Clark-Casey (justincc)1-0/+1
from ODEPrim.SetGeom. This occurred in 7a574be3fd from Sat 21 Apr 2012. This should fix collision detection. Mnay thanks to tglion for the spot and the fix in http://opensimulator.org/mantis/view.php?id=5988
2012-04-21Comment out spurious Body != IntPtr.Zero code after disableBody(), since ↵Justin Clark-Casey (justincc)1-9/+18
disableBody() sets Body == IntPtr.Zero on all code paths.
2012-04-21refactor: Simplify ODEPrim.AddChildPrim() by returning early where appropriate.Justin Clark-Casey (justincc)1-115/+117
2012-04-21Remove redundant prim_geom != IntPtr.Zero checks in ODEPrim.Justin Clark-Casey (justincc)1-116/+88
prim_geom == IntPtr.Zero only before a new add prim taint is processed (which is the first taint) or in operations such as scale change which are done in taint or under lock. Therefore, we can remove these checks which were not consistently applied anyway. If there is a genuine problem, better to see it quickly in a NullReferenceException than hide the bug.
2012-04-20If a physical prim is manually moved (e.g. by a user) then set the geometry ↵Justin Clark-Casey (justincc)1-12/+10
position as well as the body position This is necessary to stop the moved prim snapping back to the original position on deselection if moved only once This resolves http://opensimulator.org/mantis/view.php?id=5966
2012-03-20Fix crash where two scene loop threads could changes m_MeshToTriMeshMap at ↵Justin Clark-Casey (justincc)1-10/+16
the same time. Have to lock m_MeshToTriMeshMap as property is static and with more than one region two scene loops could try to manipulate at the same time.
2012-02-24Stop spurious scene loop startup timeout alarms for scenes with many prims.Justin Clark-Casey (justincc)1-0/+2
On the first frame, all startup scene objects are added to the physics scene. This can cause a considerable delay, so we don't start raising the alarm on scene loop timeouts until the second frame. This commit also slightly changes the behaviour of timeout reporting. Previously, a report was made for the very first timed out thread, ignoring all others until the next watchdog check. Instead, we now report every timed out thread, though we still only do this once no matter how long the timeout.
2011-12-20Remove unused SetAcceleration and add set on Acceleration parameterDan Lake1-0/+1
2011-12-20Remove unused SetAcceleration and add set on Acceleration parameterDan Lake1-0/+1
2011-11-22slightly simplify OdeScene.Simulate() by removing bool processtaints, since ↵Justin Clark-Casey (justincc)1-1/+0
we can inspect count of taint lists instead. also groups OdeCharacter.CreateOdeStructures() and DestroyOdeStructures() together
2011-11-21Comment out calls to OdeScene.waitForSpaceUnlock() since that method does ↵Justin Clark-Casey (justincc)1-9/+9
nothing right now
2011-11-21Have ODECharacter and ODEPrim both use PhysicsActor.Name instead of ↵Justin Clark-Casey (justincc)1-1/+0
maintaining their own properties
2011-11-16Stop OdePrim and OdeCharacter insanely overriding set LocalID to set their ↵Justin Clark-Casey (justincc)1-10/+1
own private m_localID property but leaving get to return the then unset PhysicsActor.LocalId! Instead, just have both subclasses use the PhysicsActor.LocalID property. This restores collision functionality that fell away in 45c7789 yesterday
2011-11-04Add comment for experimental effect of removing the Thread.Sleep(20) in ↵Justin Clark-Casey (justincc)1-0/+3
ODEPrim.changevelocity()
2011-10-27Fix a bug I introduced yesterday in ODE physics where prim scripts would ↵Justin Clark-Casey (justincc)1-1/+22
only receive the very first collision.
2011-10-25Remove unused fields from CollisionEventUpdateJustin Clark-Casey (justincc)1-1/+1
2011-10-25When sending object collision updates, don't null out and recreate the ↵Justin Clark-Casey (justincc)1-13/+3
CollisionEventUpdate() if the number of collisions falls to zero. Reuse the existing one instead.
2011-10-18Remove unnecessary lock of OdeLock in OdePrim.changeadd()Justin Clark-Casey (justincc)1-18/+13
This taint can only ever be processed from the OdeScene.Simulate() loop, which already locks OdeLock.
2011-10-18minor: method doc to explain a lock of OdeLockJustin Clark-Casey (justincc)1-0/+2
2011-10-18Remove the unused CollisionLocker from ODEJustin Clark-Casey (justincc)1-9/+4
Despite its name, this wasn't actually being used in any collision checking
2011-10-15restrict unnecessary access levels on ODEPrim fields/propertiesJustin Clark-Casey (justincc)1-19/+17
2011-10-15refactor: make methods that do not need to be public in ODE private or ↵Justin Clark-Casey (justincc)1-76/+114
internal to aid code reading/analysis. Remove some unused method arguments
2011-09-17adjust some whitespace to trigger another build, to check the last failure ↵Justin Clark-Casey (justincc)1-2/+2
was just a glitch
2011-08-01Move common gemo/agent map name code into CreateGeom()Justin Clark-Casey (justincc)1-11/+5
Fix build break.
2011-08-01Instead of preserving old name in geom_name_map in change size or shape, use ↵Justin Clark-Casey (justincc)1-7/+3
the Name property instead. This is equivalent since the prim 'name' is never changed. In fact, this propery is never used for prims
2011-08-01On geom removal, remove the name from the OdeScene.geom_name_map tooJustin Clark-Casey (justincc)1-0/+1
2011-08-01remove the unused ODEPrim.prev_geom fieldJustin Clark-Casey (justincc)1-3/+0
2011-08-01When an ODE geom is removed (as when a non-phantom prim is deleted, resized ↵Justin Clark-Casey (justincc)1-0/+2
or shape changed, also remove the OdeScene.actor_name_map entry pointing to the phys actor This is to stop a small memory leak over time when prims are deleted or phantom-toggled
2011-08-01refactor: centralize prim geom removal code from four places to oneJustin Clark-Casey (justincc)1-26/+37
2011-08-01minor: add note to RemovePrimThreadLocked() to the effect that it contrary ↵Justin Clark-Casey (justincc)1-1/+1
to the summary, it is being called from within Simulate() lock (OdeLock)
2011-08-01If a prim changes size or shape, add actor to _parent_scene.actor_name_map ↵Justin Clark-Casey (justincc)1-1/+4
with new prim_geom key, as the old one becomes invalid. This resolves http://opensimulator.org/mantis/view.php?id=5603 where changing size or shape would stop collision_start being fired in a running script. In both this and existing code we are not removing old actors from actor_name_map when the existing prim_geom is removed, which leads to a small memory leak over time. This needs to be fixed.
2011-07-31Remove _mesh field since the mesh data no longer needs to be stored after ↵Justin Clark-Casey (justincc)1-49/+16
it's initially used. This may improve memory usage for regions using mesh and sculpts, though I suspect that it doesn't address the current memory leak.
2011-07-31refactor: Remove argument to pass in an initial mesh to OdePrim since this ↵Justin Clark-Casey (justincc)1-2/+1
is no longer required and it prevents removal of the _mesh field (which is only used temporarily) If passing in a mesh becomes important again in the future then this can be reinstated.
2011-07-31minor: correct method doc for last commitJustin Clark-Casey (justincc)1-1/+1
2011-07-31refactor: rename CreateGeom _mesh argument to mesh, so as to not confuse ↵Justin Clark-Casey (justincc)1-3/+3
this with the pre-existing _mesh field
2011-07-31minor: method docJustin Clark-Casey (justincc)1-3/+20
2011-07-30Refactor: Replace instances of m_isphysical with IsPhysical rather than have ↵Justin Clark-Casey (justincc)1-33/+40
some code reference the private var and other the public var without any functionality difference. Add some method doc to IsPhysical
2011-07-30refactor: Rename ODEPrim.ParentPrim() to AddChildPrim() for code readabilityJustin Clark-Casey (justincc)1-11/+14
2011-07-30minor: remove mono compiler warnings, some code spacing adjustmentsJustin Clark-Casey (justincc)1-1/+1
2011-07-30minor: Add method doc to collision subscription methods. Change method case ↵Justin Clark-Casey (justincc)1-2/+2
to reflect OpenSim standards.
2011-07-16Fix physics proxy regeneration when a mesh with more than one submesh is resizedJustin Clark-Casey (justincc)1-0/+1
Addresses http://opensimulator.org/mantis/view.php?id=5584
2011-07-12minor: remove whitespace to trigger another buildJustin Clark-Casey (justincc)1-1/+0
2011-07-12When a mesh object is added to a scene, delay adding the physics actor until ↵Justin Clark-Casey (justincc)1-10/+11
the sculpt data has been added to the shape (possibly via an async asset service request) This prevents spurious 'no asset data' for meshes added on startup.
2011-07-11When a sculpt/mesh texture is received by a part on a callback request, ↵Justin Clark-Casey (justincc)1-1/+2
don't do the unnecessary work of copying the base shape. Just setting the new base shape is enough to reinsert the sculpt data and set the taint. Also cleans up a few more left-in debugging messages.
2011-07-11comment out accidential ProcessTaints physics debug line left in codeJustin Clark-Casey (justincc)1-1/+1
2011-07-09minor: code tidy and inserted log lines for future use.Justin Clark-Casey (justincc)1-18/+34
Unable to get to the bottom of why resizing a mesh fails to properly reset the physics proxy, when toggling phantom does After a mesh is generated, the existing sculptdata is set to zero in PrimitiveBaseShape to save memory When phantom is toggled, the sculptdata is regenerated before remeshing. But on resize, the sculptdata is not regenerated. So clearly, resetting sculptdata is possible, but haven't quite been able to pin down how this is being done when phantom is toggled.
2011-07-08minor: code tidy up - remove a couple of Console.WriteLine() accidentally ↵Justin Clark-Casey (justincc)1-47/+15
added in the last commit
2011-07-08minor: commented out log lines for future use and very small code tidyJustin Clark-Casey (justincc)1-4/+6
2010-10-04Formatting cleanup.Jeff Ames1-4/+4
2010-10-02Replace CalculateMass with a more accurate version, contributed by Ubit.Melanie1-234/+219
Thank you.