aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneGraph.cs (unfollow)
Commit message (Collapse)AuthorFilesLines
2012-04-03Eliminate race condition where many callers would check SOP.PhysicsActor != ↵Justin Clark-Casey (justincc)1-1/+2
null then assume it was still not null in later code. Another thread could come and turn off physics for a part (null PhysicsActor) at any point. Had to turn off localCopy on warp3D CoreModules section in prebuild.xml since on current nant this copies all DLLs in bin/ which can be a very large number with compiled DLLs No obvious reason for doing that copy - nothing else does it.
2012-03-31refactor: Rename SOG.GetChildPart() to GetPart() since it can also return ↵Justin Clark-Casey (justincc)1-2/+2
the 'root' part.
2012-03-31Rename SOG.HasChildPrim(uint) to SOG.ContainsPart(uint) to match existing ↵Justin Clark-Casey (justincc)1-3/+3
ContainsPart method and remove method duplication. HasChildPrim is also misleading since the 'root' prim can also be returned.
2012-03-16Replace script-lines-per-second with the script execution time scaled by its ↵Justin Clark-Casey (justincc)1-30/+1
measurement period and an idealised frame time. The previous lines-per-second measurement used for top scripts report was inaccurate, since lines executed does not reflect time taken to execute. Also, every fetch of the report would reset all the numbers limiting its usefulness and we weren't even guaranteed to see the top 100. The actual measurement value should be script execution time per frame but XEngine does not work this way. Therefore, we use actual script execution time scaled by the measurement period and an idealised frame time. This is still not ideal but gives reasonable results and allows scripts to be compared. This commit moves script execution time calculations from SceneGraph into IScriptModule implementations.
2012-03-09Simplify minimap coarse location code by just reference SP.AbsolutePositionJustin Clark-Casey (justincc)1-5/+1
This is rather than checking whether the avatar is sitting and doing its own calculation.
2012-03-09Use SP.ParentPart instead of ParentID in places where it's more efficient ↵Justin Clark-Casey (justincc)1-19/+5
(saving extra null checks, etc.) However, it looks like we should retain SP.ParentID since it's much easier to use that in places where another thread could change ParentPart to null. Otherwise one has to clumsily put ParentPart in a reference, etc. to avoid a race.
2012-02-18Fix a bug where changing shape parameters of a child prim in a linkset would ↵Justin Clark-Casey (justincc)1-2/+2
not persist. Resolves http://opensimulator.org/mantis/view.php?id=5819
2012-02-15In ObjectTortureTests, run garbage collector on Teardown and run scene loop ↵Justin Clark-Casey (justincc)1-5/+5
update when scene objects have been deleted. At least on mono 2.6.4, running GC.Collect() is not guaranteed to force gc of all objects when run in the same method where those objects had references. Therefore, GC.Collect() is now being done in the per-script teardown of ObjectTortureTests. In addition, scene loop update is being run after garbage collection in order to clean out the viewer update list of scene objects in the SceneGraph. These measures mean that scene objects/parts are now garbage collected after a test run if deleted from the scene, resulting in a much better memory usage report (though probably still not very accurate). However, deletion takes a very long time - what's really needed is to find out now why the entire scene isn't being GC'd by this measure. This change hasn't yet been applied to the other stress tests.
2012-02-08Stop a scene object from attempting to link with itself (which results in an ↵Justin Clark-Casey (justincc)1-5/+11
exception and constant complaints in v3 viewers). Aims to address http://opensimulator.org/mantis/view.php?id=5878
2012-02-02ObjectAddedToScene event should be fired when duplicating objectsDan Lake1-16/+0
2012-01-31Remove scene object null check on SceneGraph.AddSceneObject(). Complain ↵Justin Clark-Casey (justincc)1-1/+7
explicitly if there's an attempt to add any object with a zero UUID. Callers themselves need to check that they're not attempting to add a null scene object.
2012-01-31Add torture tests to test adding 10,000, 100,000 and 200,000 single prim ↵Justin Clark-Casey (justincc)1-0/+6
scene objects. These can be run using the "nant torture" target. They are not part of "nant test" due to their long-run future nature. Such tests are designed to do some testing of extreme situations and give some feedback on memory usage, etc. However, data can be inconsistent due to different machine circumstances and virtual machine actions. This area is under development.
2012-01-30lock SceneObjectGroupsByFullID in SceneGraph.ForEachSOG() to stop failure if ↵Justin Clark-Casey (justincc)1-5/+7
SceneObjectGroupsByFullID is updated elsewhere at the same time.
2012-01-24Removed unused delegates in SceneGraph: ObjectDuplicateDelegate, ↵Dan Lake1-6/+0
ObjectCreateDelegate, ObjectDeleteDelegate
2012-01-24Removed unused events in SceneGraph: OnObjectCreate, OnObjectRemove, ↵Dan Lake1-13/+0
OnObjectDuplicate
2012-01-19Add a version of GetGroupByPrim to Scene which accepts UUID instead of localIDDan Lake1-1/+2
2011-12-22Remove unused m_physicalPrim parameter from SOG.ApplyPhysics()Justin Clark-Casey (justincc)1-1/+0
2011-12-17Fix bug where objects could not be set to a new group if the group had been ↵Justin Clark-Casey (justincc)1-14/+0
created in that client session, or if no other action has been performed on the object. There were two problems here: 1) On object group update, we looked for the group is the IClientAPI group cache rather than in the groups service. This fails to groups created newly in that session 2) On object group update, we weren't setting the HasGroupChanged flag. This meant that the change was not persisted unless some other action set this flag. This commit fixes these issues and hopefully addresses http://opensimulator.org/mantis/view.php?id=5588 This commit also moves HandleObjectGroupUpdate() to the GroupsModule from the Scene.PacketHandlers.cs file
2011-11-10Fix compile error from an earlier commitDan Lake1-2/+0
2011-11-11Prevent linking objects while they are deeded. On unlinking deeded objects,Melanie1-4/+19
set LastOwnerID properly so the parts cannot be transferred, circumventing no trans perms
2011-11-05Replacing te linking code with the code from Avination. Link sets prims are nowMelanie1-1/+1
numbered properly even when sets are linked to sets.
2011-11-03Renamed ForEachRootScenePresence to ForEachAvatar. Cleaned up calls toDan Lake1-1/+1
the 3 iteration functions so more of them are using the correct iteration for the action they are performing. The 3 iterators that seem to fit all actions within OpenSim at this time are: ForEachAvatar: Perform an action on all avatars (root presences) ForEachClient: Perform an action on all clients (root or child clients) ForEachRootClient: Perform an action on all clients that have an avatar There are still a dozen places or so calling the old ForEachScenePresence that will take a little more refactoring to eliminate.
2011-11-02Changes UpdateFlag in SOP to an enumeration of NONE, TERSE and FULL.Dan Lake1-1/+1
UpdateFlag is now referenced/used only within SOP and SOG. Outsiders are using ScheduleFullUpdate, ScheduleTerseUpdate or ClearUpdateSchedule on SOP consistently now. Also started working toward eliminating those calls to ScheduleFullUpdate, ScheduleTerseUpdate or ClearUpdateSchedule from outside SOP in favor of just setting properties on SOP and let SOP decide if an update should be scheduled. This consolidates the update policy within SOP and the client rather than everywhere that makes changes to SOP. Some places forget to call update while others call it multiple times, "just to be sure". UpdateFlag and Schedule*Update will both be made private shortly. UpdateFlag is intended to be transient and internal to SOP so it has been removed from XML serializer for SOPs.
2011-10-29Remove the SyncRoot locking from Scene which was only being done around the ↵Justin Clark-Casey (justincc)1-22/+16
main physics loop and ScenePresence position and velocity setting This is no longer necessary with ODECharacter taints (ODEPrim was already not taking part in this). BSCharacter was already tainting.
2011-10-27Added new ForEachRootScenePresence to Scene since almost every delegate ↵Dan Lake1-1/+15
passed to ForEachScenePresence checks for !IsChildAgent first. It consolidates child and root handling for coming refactors.
2011-10-06Instead of adding stat agentMS in all kinds of places, calculate it instead ↵Justin Clark-Casey (justincc)1-0/+6
in the main Scene.Update() loop, like the other stats Some of the places where agentMS was added were in separate threads launched by the update loop. I don't believe this is correct, since such threads are no longer contributing to frame time. Some of the places were also driven by client input rather than the scene loop. I don't believe it's appropriate to add this kind of stuff to scene loop stats. These changes hopefully have the nice affect of making the broken out frame stats actually add up to the total frame time
2011-10-05Make reported sim fps more accurate, in line with frame time msJustin Clark-Casey (justincc)1-0/+5
Also remove some unused fields and improve naming on others.
2011-09-13Stop attempts to rewear already worn items from removing and reattaching.Justin Clark-Casey (justincc)1-2/+2
Viewer 2/3 will sometimes attempt to rewear attachments, even though they have already been attached during the main login process. This change ignores those attempts. This stops script failures during login, as the rewearing was racing with the script startup code. It might also help with attachments being abnormally put into deleted state. Hopefully resolves some more of http://opensimulator.org/mantis/view.php?id=5644
2011-09-13Comment out attachments code in Scene.IncomingCreateObject(UUID userID, UUID ↵Justin Clark-Casey (justincc)1-2/+23
itemID) for now As far as I can see, this is only invoked by a PUT request to ObjectHandlers, which is not being used anyway. Invoking attachments code at this point is probably inappropriate since it would still be invoked when the client entered the scene. Being commented to simplify analysis of attachments issues. Can be uncommented when in use. Also, small tweak to lock and log removal of a SOG from the SceneObjectGroupsByLocalPartID collection in SceneGraph.GetGroupByPrim() if an inconsistency is found.
2011-09-13stop the duplicate remove of the root part ids from the full part and local ↵Justin Clark-Casey (justincc)1-2/+0
part indexes in SG.DeleteSceneObject() this is unnecessary because the parts array iterated through contains the root part as well as the non-root parts
2011-09-13In SG.AddSceneObject(), stop unnecessarily adding the root part to object ↵Justin Clark-Casey (justincc)1-7/+5
indexes sepearately from the other parts. The SOG.Parts property contains the root part as well as the non-root parts
2011-09-12stop the redundant passing in of RegionInfo to SceneGraph, since the Scene ↵Justin Clark-Casey (justincc)1-5/+2
is always passed in at the same time.
2011-09-12minor: if the script engine fails to find a prim for a script, also print ↵Justin Clark-Casey (justincc)1-0/+4
out that prim's local id in the error message.
2011-09-01Eliminate pointless checks of SOG.RootPart != nullJustin Clark-Casey (justincc)1-1/+1
It's never possible for SOG to have no RootPart, except in the first few picosends of the big bang when it's pulled from region persistence or deserialized
2011-09-01Remove pointless cluttering SOP.ParentGroup != null checks.Justin Clark-Casey (justincc)1-19/+10
The only times when ParentGroup might be null is during regression tests (which might not be a valid thing) and when scene objects are being constructed from the database. At all other times it's not possible for a SOP not to have a SOG parent.
2011-08-30refactor: migrate DropObject handling fully into AttachmentsModule from SceneJustin Clark-Casey (justincc)1-7/+0
2011-08-27Related to #4689 - Adding missing null check for SceneObjectPartMakopoppo1-4/+10
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2011-08-18Don't try to save changed attachment states when an NPC with attachments is ↵Justin Clark-Casey (justincc)1-2/+3
removed from the scene. This is done by introducing a PresenceType enum into ScenePresence which currently has two values, User and Npc. This seems better than a SaveAttachments flag in terms of code comprehension, though I'm still slightly uneasy about introducing these semantics to core objects
2011-07-19refactor: rename UpdatePrimPosition() to UpdatePrimGroupPosition() for ↵Justin Clark-Casey (justincc)1-2/+2
consistency
2011-07-19Rename UpdatePrimRotation() to UpdatePrimGroupRotation() since this is what ↵Justin Clark-Casey (justincc)1-3/+3
it actually does and is more consistent with other method names.
2011-07-19Stop undo of just the root prim position in the linkset from shifting the ↵Justin Clark-Casey (justincc)1-1/+0
whole linkset. However, what happens now is that undo just doesn't do anything when the root prim is selected on its own. This requires more code than just fiddling with undo states.
2011-07-19fix undo when resizing of non-root individual prims in a linksetJustin Clark-Casey (justincc)1-1/+1
undo resize, rotation and position still needs fixing when only editing root prim of a linkset
2011-07-18Make various tweaks to undo code in an effort to get things working better.Justin Clark-Casey (justincc)1-0/+1
Undo rotation and position appear to be working. Resizing a single prim appears to be working, though the undo has to be done twice. Resizing a group of prims still does not work properly - possibly because in the UndoState we don't store a knowledge of when we're resizing a whole group rather than individual prims. This needs to be addressed.
2011-07-16Replace ifs in SOG.GroupResize() with Math.Min()Justin Clark-Casey (justincc)1-0/+1
Also fiddle a bit with undo. This is not currently working properly, though to be fair it also didn't appear to work in 0.7.1.1 either (at least for resize). Will get some more attention soon.
2011-07-16refactor: Push all part resize code down into SceneObjectPart.Resize()Justin Clark-Casey (justincc)1-4/+5
2011-07-16add test for resizing one part in a groupJustin Clark-Casey (justincc)1-1/+1
2011-07-16remove the need to supply SceneObjectGroup.GroupResize() with a localId.Justin Clark-Casey (justincc)1-1/+1
This is utterly pointless scene we already know which sog we're dealing with.
2011-07-11refactor: Make arguments to SceneGraph.UpdatePrimFlags() more readableJustin Clark-Casey (justincc)1-6/+11
2011-06-10minor: add method doc to make it clear that click action is fired when the ↵Justin Clark-Casey (justincc)1-1/+10
click action is changed, not when a prim is clicked
2011-05-21refactor Scene.RezObject() to use AddNewSceneObject() rather than ↵Justin Clark-Casey (justincc)1-8/+9
copy/pasting code with small differences