OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
/// <summary>
/// Add prim in response to an add taint.
/// </summary>
Add prim in response to an add taint.
Add prim in response to an add taint .
private void changeadd()
        {
            int[] iprimspaceArrItem = _parent_scene.calculateSpaceArrayItemFromPos(_position);
            IntPtr targetspace = _parent_scene.calculateSpaceForGeom(_position);
            if (targetspace == IntPtr.Zero)
                targetspace = _parent_scene.createprimspace(iprimspaceArrItem[0], iprimspaceArrItem[1]);
            m_targetSpace = targetspace;
            IMesh mesh = null;
            if (_parent_scene.needsMeshing(_pbs))
            {
                mesh = _parent_scene.mesher.CreateMesh(Name, _pbs, _size, _parent_scene.meshSculptLOD, IsPhysical);
                if (mesh == null)
                    CheckMeshAsset();
                else
                    m_assetFailed = false;
            }
#if SPAM
Console.WriteLine("changeadd 1");
#endif
            CreateGeom(m_targetSpace, mesh);
            d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z);
            d.Quaternion myrot = new d.Quaternion();
            myrot.X = _orientation.X;
            myrot.Y = _orientation.Y;
            myrot.Z = _orientation.Z;
            myrot.W = _orientation.W;
            d.GeomSetQuaternion(prim_geom, ref myrot);
            if (IsPhysical && Body == IntPtr.Zero)
                enableBody();
            changeSelectedStatus();
            m_taintadd = false;
        }
private void changeadd ( ) { int [ ] iprimspaceArrItem = _parent_scene . calculateSpaceArrayItemFromPos ( _position ) ; IntPtr targetspace = _parent_scene . calculateSpaceForGeom ( _position ) ; if ( targetspace == IntPtr . Zero ) targetspace = _parent_scene . createprimspace ( iprimspaceArrItem [ 0 ] , iprimspaceArrItem [ 1 ] ) ; m_targetSpace = targetspace ; IMesh mesh = null ; if ( _parent_scene . needsMeshing ( _pbs ) ) { mesh = _parent_scene . mesher . CreateMesh ( Name , _pbs , _size , _parent_scene . meshSculptLOD , IsPhysical ) ; if ( mesh == null ) CheckMeshAsset ( ) ; else m_assetFailed = false ; } if SPAM Console . WriteLine ( " " ) ; endif CreateGeom ( m_targetSpace , mesh ) ; d . GeomSetPosition ( prim_geom , _position . X , _position . Y , _position . Z ) ; d . Quaternion myrot = new d . Quaternion ( ) ; myrot . X = _orientation . X ; myrot . Y = _orientation . Y ; myrot . Z = _orientation . Z ; myrot . W = _orientation . W ; d . GeomSetQuaternion ( prim_geom , ref myrot ) ; if ( IsPhysical && Body == IntPtr . Zero ) enableBody ( ) ; changeSelectedStatus ( ) ; m_taintadd = false ; }
Add prim in response to an add taint.
Add prim in response to an add taint .
//            m_log.DebugFormat("[ODE PRIM]: Adding prim {0}", Name); // Don't need to re-enable body..   it's done in SetMesh // createmesh returns null when it's a shape that isn't a cube. // m_log.Debug(m_localID);