OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
/// <summary>
/// Create a geometry for the given mesh in the given target space.
/// </summary>
/// <param name="m_targetSpace"></param>
/// <param name="mesh">If null, then a mesh is used that is based on the profile shape data.</param>
Create a geometry for the given mesh in the given target space.
Create a geometry for the given mesh in the given target space .
private void CreateGeom(IntPtr m_targetSpace, IMesh mesh)
        {
#if SPAM
Console.WriteLine("CreateGeom:");
#endif
            if (mesh != null)
            {
                setMesh(_parent_scene, mesh);
            }
            else
            {
                if (_pbs.ProfileShape == ProfileShape.HalfCircle && _pbs.PathCurve == (byte)Extrusion.Curve1)
                {
                    if (_size.X == _size.Y && _size.Y == _size.Z && _size.X == _size.Z)
                    {
                        if (((_size.X / 2f) > 0f))
                        {
                            try
                            {
                                SetGeom(d.CreateSphere(m_targetSpace, _size.X / 2));
                                m_expectedCollisionContacts = 3;
                            }
                            catch (AccessViolationException)
                            {
                                m_log.WarnFormat("[PHYSICS]: Unable to create physics proxy for object {0}", Name);
                                return;
                            }
                        }
                        else
                        {
                            try
                            {
                                SetGeom(d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z));
                                m_expectedCollisionContacts = 4;
                            }
                            catch (AccessViolationException)
                            {
                                m_log.WarnFormat("[PHYSICS]: Unable to create physics proxy for object {0}", Name);
                                return;
                            }
                        }
                    }
                    else
                    {
                        try
                        {
                            SetGeom(d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z));
                            m_expectedCollisionContacts = 4;
                        }
                        catch (AccessViolationException)
                        {
                            m_log.WarnFormat("[PHYSICS]: Unable to create physics proxy for object {0}", Name);
                            return;
                        }
                    }
                }
                else
                {
                    try
                    {
                        SetGeom(d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z));
                        m_expectedCollisionContacts = 4;
                    }
                    catch (AccessViolationException)
                    {
                        m_log.WarnFormat("[PHYSICS]: Unable to create physics proxy for object {0}", Name);
                        return;
                    }
                }
            }
        }
private void CreateGeom ( IntPtr m_targetSpace , IMesh mesh ) { if SPAM Console . WriteLine ( " " ) ; endif if ( mesh != null ) { setMesh ( _parent_scene , mesh ) ; } else { if ( _pbs . ProfileShape == ProfileShape . HalfCircle && _pbs . PathCurve == ( byte ) Extrusion . Curve1 ) { if ( _size . X == _size . Y && _size . Y == _size . Z && _size . X == _size . Z ) { if ( ( ( _size . X / 2f ) > 0f ) ) { try { SetGeom ( d . CreateSphere ( m_targetSpace , _size . X / 2 ) ) ; m_expectedCollisionContacts = 3 ; } catch ( AccessViolationException ) { m_log . WarnFormat ( " " , Name ) ; return ; } } else { try { SetGeom ( d . CreateBox ( m_targetSpace , _size . X , _size . Y , _size . Z ) ) ; m_expectedCollisionContacts = 4 ; } catch ( AccessViolationException ) { m_log . WarnFormat ( " " , Name ) ; return ; } } } else { try { SetGeom ( d . CreateBox ( m_targetSpace , _size . X , _size . Y , _size . Z ) ) ; m_expectedCollisionContacts = 4 ; } catch ( AccessViolationException ) { m_log . WarnFormat ( " " , Name ) ; return ; } } } else { try { SetGeom ( d . CreateBox ( m_targetSpace , _size . X , _size . Y , _size . Z ) ) ; m_expectedCollisionContacts = 4 ; } catch ( AccessViolationException ) { m_log . WarnFormat ( " " , Name ) ; return ; } } } }
Create a geometry for the given mesh in the given target space.
Create a geometry for the given mesh in the given target space .
//                            _parent_scene.waitForSpaceUnlock(m_targetSpace); //Console.WriteLine(" CreateGeom 1"); //                            _parent_scene.waitForSpaceUnlock(m_targetSpace); //Console.WriteLine(" CreateGeom 2"); //                        _parent_scene.waitForSpaceUnlock(m_targetSpace); //Console.WriteLine("  CreateGeom 3"); //                    _parent_scene.waitForSpaceUnlock(m_targetSpace); //Console.WriteLine("  CreateGeom 4");
m_targetSpace
IntPtr
None
mesh
IMesh
If null, then a mesh is used that is based on the profile shape data.
If null then a mesh is used that is based on the profile shape data .