示例#1
0
        public void AddChange (changes what, object arg)
        {
            AChangeLoading++;

            _parent_scene.AddChange (this, what, arg);
        }
示例#2
0
        public bool DoAChange (changes what, object arg)
        {
            AChangeLoading--;

            if (m_frozen && what != changes.Add && what != changes.Remove)
                return false;

            if (prim_geom == IntPtr.Zero && what != changes.Add && what != changes.Remove)
            {
                m_frozen = true;
                return false;
            }

            // nasty switch
            switch (what)
            {
                case changes.Add:
                    changeadd ();
                    break;
                case changes.Remove:
                    //If its being removed, we don't want to rebuild the physical rep at all, so ignore this stuff...
                    //When we return true, it destroys all of the prims in the linkset anyway
                    /*if (_parent != null)
                    {
                        AuroraPhysXPrim parent = (AuroraPhysXPrim)_parent;
                        parent.ChildRemove (this);
                    }
                    else
                        ChildRemove (this);*/
                    return true;

                case changes.Link:
                    AuroraPhysXPrim tmp = (AuroraPhysXPrim)arg;
                    changelink (tmp);
                    break;

                case changes.DeLink:
                    changelink (null);
                    break;

                case changes.Position:
                    changemoveandrotate ((Vector3)arg, _orientation);
                    break;

                case changes.Orientation:
                    changemoveandrotate (_position, (Quaternion)arg);
                    break;

                case changes.PosOffset:
                    donullchange ();
                    break;

                case changes.OriOffset:
                    donullchange ();
                    break;

                case changes.Velocity:
                    changevelocity (arg);
                    break;

                case changes.Acceleration:
                    changeacceleration (arg);
                    break;
                case changes.AngVelocity:
                    changeangvelocity (arg);
                    break;

                case changes.Force:
                    changeforce (arg);
                    break;

                case changes.Torque:
                    changeSetTorque (arg);
                    break;

                case changes.AddForce:
                    changeAddForce (arg);
                    break;

                case changes.AddAngForce:
                    changeAddAngularForce (arg);
                    break;

                case changes.AngLock:
                    changeAngularLock (arg);
                    break;

                case changes.Size:
                    changesize (arg);
                    break;

                case changes.Shape:
                    changeshape (arg);
                    break;

                case changes.CollidesWater:
                    changefloatonwater (arg);
                    break;

                case changes.VolumeDtc:
                    changevoldtc (arg);
                    break;

                case changes.Physical:
                    changePhysicsStatus ((bool)arg);
                    break;

                case changes.Selected:
                    changeSelectedStatus ((bool)arg);
                    break;

                case changes.disabled:
                    changedisable ();
                    break;

                case changes.buildingrepresentation:
                    m_buildingRepresentation = false;
                    break;

                case changes.Null:
                    donullchange ();
                    break;

                default:
                    donullchange ();
                    break;
            }
            return false;
        }