minor: Add method doc to collision subscription methods. Change method case to reflect OpenSim standards.
							parent
							
								
									310a685220
								
							
						
					
					
						commit
						d917010433
					
				| 
						 | 
				
			
			@ -4821,7 +4821,6 @@ namespace OpenSim.Region.Framework.Scenes
 | 
			
		|||
                {
 | 
			
		||||
                    PhysActor.OnCollisionUpdate += PhysicsCollision;
 | 
			
		||||
                    PhysActor.SubscribeEvents(1000);
 | 
			
		||||
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1220,14 +1220,16 @@ namespace OpenSim.Region.Physics.OdePlugin
 | 
			
		|||
        {
 | 
			
		||||
            m_requestedUpdateFrequency = ms;
 | 
			
		||||
            m_eventsubscription = ms;
 | 
			
		||||
            _parent_scene.addCollisionEventReporting(this);
 | 
			
		||||
            _parent_scene.AddCollisionEventReporting(this);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public override void UnSubscribeEvents()
 | 
			
		||||
        {
 | 
			
		||||
            _parent_scene.remCollisionEventReporting(this);
 | 
			
		||||
            _parent_scene.RemoveCollisionEventReporting(this);
 | 
			
		||||
            m_requestedUpdateFrequency = 0;
 | 
			
		||||
            m_eventsubscription = 0;
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        public void AddCollisionEvent(uint CollidedWith, ContactPoint contact)
 | 
			
		||||
        {
 | 
			
		||||
            if (m_eventsubscription > 0)
 | 
			
		||||
| 
						 | 
				
			
			@ -1248,6 +1250,7 @@ namespace OpenSim.Region.Physics.OdePlugin
 | 
			
		|||
                m_eventsubscription = 0;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public override bool SubscribedEvents()
 | 
			
		||||
        {
 | 
			
		||||
            if (m_eventsubscription > 0)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2986,12 +2986,12 @@ Console.WriteLine("changeshape not need meshing");
 | 
			
		|||
        public override void SubscribeEvents(int ms)
 | 
			
		||||
        {
 | 
			
		||||
            m_eventsubscription = ms;
 | 
			
		||||
            _parent_scene.addCollisionEventReporting(this);
 | 
			
		||||
            _parent_scene.AddCollisionEventReporting(this);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public override void UnSubscribeEvents()
 | 
			
		||||
        {
 | 
			
		||||
            _parent_scene.remCollisionEventReporting(this);
 | 
			
		||||
            _parent_scene.RemoveCollisionEventReporting(this);
 | 
			
		||||
            m_eventsubscription = 0;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -198,7 +198,12 @@ namespace OpenSim.Region.Physics.OdePlugin
 | 
			
		|||
        private readonly List<OdePrim> _taintedPrimL = new List<OdePrim>();
 | 
			
		||||
        private readonly HashSet<OdeCharacter> _taintedActors = new HashSet<OdeCharacter>();
 | 
			
		||||
        private readonly List<d.ContactGeom> _perloopContact = new List<d.ContactGeom>();
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// A list of actors that should receive collision events.
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        private readonly List<PhysicsActor> _collisionEventPrim = new List<PhysicsActor>();
 | 
			
		||||
        
 | 
			
		||||
        private readonly HashSet<OdeCharacter> _badCharacter = new HashSet<OdeCharacter>();
 | 
			
		||||
        public Dictionary<IntPtr, String> geom_name_map = new Dictionary<IntPtr, String>();
 | 
			
		||||
        public Dictionary<IntPtr, PhysicsActor> actor_name_map = new Dictionary<IntPtr, PhysicsActor>();
 | 
			
		||||
| 
						 | 
				
			
			@ -1604,7 +1609,11 @@ namespace OpenSim.Region.Physics.OdePlugin
 | 
			
		|||
        } 
 | 
			
		||||
// End recovered. Kitto Flora
 | 
			
		||||
 | 
			
		||||
        public void addCollisionEventReporting(PhysicsActor obj)
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Add actor to the list that should receive collision events in the simulate loop.
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        /// <param name="obj"></param>
 | 
			
		||||
        public void AddCollisionEventReporting(PhysicsActor obj)
 | 
			
		||||
        {
 | 
			
		||||
            lock (_collisionEventPrim)
 | 
			
		||||
            {
 | 
			
		||||
| 
						 | 
				
			
			@ -1613,7 +1622,11 @@ namespace OpenSim.Region.Physics.OdePlugin
 | 
			
		|||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void remCollisionEventReporting(PhysicsActor obj)
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Remove actor from the list that should receive collision events in the simulate loop.
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        /// <param name="obj"></param>
 | 
			
		||||
        public void RemoveCollisionEventReporting(PhysicsActor obj)
 | 
			
		||||
        {
 | 
			
		||||
            lock (_collisionEventPrim)
 | 
			
		||||
            {
 | 
			
		||||
| 
						 | 
				
			
			@ -2132,7 +2145,7 @@ namespace OpenSim.Region.Physics.OdePlugin
 | 
			
		|||
//Console.WriteLine("RemovePrimThreadLocked " +  prim.m_primName);
 | 
			
		||||
            lock (prim)
 | 
			
		||||
            {
 | 
			
		||||
                remCollisionEventReporting(prim);
 | 
			
		||||
                RemoveCollisionEventReporting(prim);
 | 
			
		||||
                lock (ode)
 | 
			
		||||
                {
 | 
			
		||||
                    if (prim.prim_geom != IntPtr.Zero)
 | 
			
		||||
| 
						 | 
				
			
			@ -2792,6 +2805,8 @@ Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.Name);
 | 
			
		|||
                                if (obj == null)
 | 
			
		||||
                                    continue;
 | 
			
		||||
 | 
			
		||||
//                                m_log.DebugFormat("[PHYSICS]: Assessing {0} for collision events", obj.SOPName);
 | 
			
		||||
 | 
			
		||||
                                switch ((ActorTypes)obj.PhysicsActorType)
 | 
			
		||||
                                {
 | 
			
		||||
                                    case ActorTypes.Agent:
 | 
			
		||||
| 
						 | 
				
			
			@ -2799,6 +2814,7 @@ Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.Name);
 | 
			
		|||
                                        cobj.AddCollisionFrameTime(100);
 | 
			
		||||
                                        cobj.SendCollisions();
 | 
			
		||||
                                        break;
 | 
			
		||||
 | 
			
		||||
                                    case ActorTypes.Prim:
 | 
			
		||||
                                        OdePrim pobj = (OdePrim)obj;
 | 
			
		||||
                                        pobj.SendCollisions();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue