* ODE - This fixes a few things and breaks a few more.

ThreadPoolClientBranch
Teravus Ovares 2008-02-14 01:57:19 +00:00
parent 5f70b8b922
commit e3a711536b
3 changed files with 19 additions and 26 deletions

View File

@ -520,7 +520,7 @@ namespace OpenSim.Region.Physics.Meshing
// Calculated separately to avoid errors
cutHull.AddVertex(legEnd);
m_log.DebugFormat("Starting cutting of the hollow shape from the prim {1}", 0, primName);
// m_log.DebugFormat("Starting cutting of the hollow shape from the prim {1}", 0, primName);
SimpleHull cuttedHull = SimpleHull.SubtractHull(outerHull, cutHull);
outerHull = cuttedHull;

View File

@ -92,7 +92,7 @@ namespace OpenSim.Region.Physics.OdePlugin
private int debugcounter = 0;
public OdePrim(String primName, OdeScene parent_scene, IntPtr targetSpace, PhysicsVector pos, PhysicsVector size,
public OdePrim(String primName, OdeScene parent_scene, PhysicsVector pos, PhysicsVector size,
Quaternion rotation, IMesh mesh, PrimitiveBaseShape pbs, bool pisPhysical, CollisionLocker dode)
{
ode = dode;
@ -126,7 +126,7 @@ namespace OpenSim.Region.Physics.OdePlugin
_pbs = pbs;
_parent_scene = parent_scene;
m_targetSpace = targetSpace;
m_targetSpace = (IntPtr)0;
if (pos.Z < 0)
m_isphysical = false;
@ -433,6 +433,14 @@ namespace OpenSim.Region.Physics.OdePlugin
}
public void changeadd(float timestep)
{
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;
if (_mesh != null)
{
}
@ -630,11 +638,11 @@ namespace OpenSim.Region.Physics.OdePlugin
public void changesize(float timestamp)
{
if (!_parent_scene.geom_name_map.ContainsKey(prim_geom))
{
m_taintsize = _size;
return;
}
//if (!_parent_scene.geom_name_map.ContainsKey(prim_geom))
//{
// m_taintsize = _size;
//return;
//}
string oldname = _parent_scene.geom_name_map[prim_geom];

View File

@ -1033,16 +1033,11 @@ namespace OpenSim.Region.Physics.OdePlugin
rot.z = rotation.z;
int[] iprimspaceArrItem = calculateSpaceArrayItemFromPos(pos);
IntPtr targetspace = calculateSpaceForGeom(pos);
if (targetspace == IntPtr.Zero)
targetspace = createprimspace(iprimspaceArrItem[0], iprimspaceArrItem[1]);
OdePrim newPrim;
lock (OdeLock)
{
newPrim = new OdePrim(name, this, targetspace, pos, siz, rot, mesh, pbs, isphysical, ode);
newPrim = new OdePrim(name, this, pos, siz, rot, mesh, pbs, isphysical, ode);
_prims.Add(newPrim);
}
@ -1244,18 +1239,8 @@ namespace OpenSim.Region.Physics.OdePlugin
collision_optimized(timeStep);
d.WorldQuickStep(world, ODE_STEPSIZE);
try
{
d.WorldQuickStep(world, ODE_STEPSIZE);
}
catch (StackOverflowException)
{
d.WorldQuickStep(world, 0.001f);
}
d.JointGroupEmpty(contactgroup);
ode.dunlock(world);