minor: code tidy up - remove a couple of Console.WriteLine() accidentally added in the last commit
parent
36df9ae79a
commit
29034bc0e0
|
@ -54,7 +54,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Various properties that ODE uses for AMotors but isn't exposed in ODE.NET so we must define them ourselves.
|
/// Various properties that ODE uses for AMotors but isn't exposed in ODE.NET so we must define them ourselves.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public class OdePrim : PhysicsActor
|
public class OdePrim : PhysicsActor
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
@ -279,14 +278,14 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
|
|
||||||
public override bool Selected
|
public override bool Selected
|
||||||
{
|
{
|
||||||
set {
|
set
|
||||||
|
{
|
||||||
|
|
||||||
// This only makes the object not collidable if the object
|
// This only makes the object not collidable if the object
|
||||||
// is physical or the object is modified somehow *IN THE FUTURE*
|
// is physical or the object is modified somehow *IN THE FUTURE*
|
||||||
// without this, if an avatar selects prim, they can walk right
|
// without this, if an avatar selects prim, they can walk right
|
||||||
// through it while it's selected
|
// through it while it's selected
|
||||||
m_collisionscore = 0;
|
m_collisionscore = 0;
|
||||||
|
|
||||||
if ((m_isphysical && !_zeroFlag) || !value)
|
if ((m_isphysical && !_zeroFlag) || !value)
|
||||||
{
|
{
|
||||||
m_taintselected = value;
|
m_taintselected = value;
|
||||||
|
@ -297,7 +296,9 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
m_taintselected = value;
|
m_taintselected = value;
|
||||||
m_isSelected = value;
|
m_isSelected = value;
|
||||||
}
|
}
|
||||||
if (m_isSelected) disableBodySoft();
|
|
||||||
|
if (m_isSelected)
|
||||||
|
disableBodySoft();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -324,8 +325,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
//m_log.Warn("Setting Geom to: " + prim_geom);
|
//m_log.Warn("Setting Geom to: " + prim_geom);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void enableBodySoft()
|
public void enableBodySoft()
|
||||||
{
|
{
|
||||||
if (!childPrim)
|
if (!childPrim)
|
||||||
|
@ -626,8 +625,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
float taperX1;
|
float taperX1;
|
||||||
float taperY1;
|
float taperY1;
|
||||||
float taperX;
|
float taperX;
|
||||||
|
@ -682,9 +679,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
// else if (returnMass > _parent_scene.maximumMassObject)
|
// else if (returnMass > _parent_scene.maximumMassObject)
|
||||||
// returnMass = _parent_scene.maximumMassObject;
|
// returnMass = _parent_scene.maximumMassObject;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Recursively calculate mass
|
// Recursively calculate mass
|
||||||
bool HasChildPrim = false;
|
bool HasChildPrim = false;
|
||||||
lock (childrenPrim)
|
lock (childrenPrim)
|
||||||
|
@ -693,8 +687,8 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
{
|
{
|
||||||
HasChildPrim = true;
|
HasChildPrim = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HasChildPrim)
|
if (HasChildPrim)
|
||||||
{
|
{
|
||||||
OdePrim[] childPrimArr = new OdePrim[0];
|
OdePrim[] childPrimArr = new OdePrim[0];
|
||||||
|
@ -711,10 +705,12 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (returnMass > _parent_scene.maximumMassObject)
|
if (returnMass > _parent_scene.maximumMassObject)
|
||||||
returnMass = _parent_scene.maximumMassObject;
|
returnMass = _parent_scene.maximumMassObject;
|
||||||
|
|
||||||
return returnMass;
|
return returnMass;
|
||||||
}// end CalculateMass
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -937,7 +933,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void changeAngularLock(float timestep)
|
private void changeAngularLock(float timestep)
|
||||||
{
|
{
|
||||||
// do we have a Physical object?
|
// do we have a Physical object?
|
||||||
|
@ -965,7 +960,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
}
|
}
|
||||||
// Store this for later in case we get turned into a separate body
|
// Store this for later in case we get turned into a separate body
|
||||||
m_angularlock = m_taintAngularLock;
|
m_angularlock = m_taintAngularLock;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void changelink(float timestep)
|
private void changelink(float timestep)
|
||||||
|
@ -1104,7 +1098,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
m_log.DebugFormat("[PHYSICS]: {0} ain't got no boooooooooddy, no body", Name);
|
m_log.DebugFormat("[PHYSICS]: {0} ain't got no boooooooooddy, no body", Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
prm.m_interpenetrationcount = 0;
|
prm.m_interpenetrationcount = 0;
|
||||||
prm.m_collisionscore = 0;
|
prm.m_collisionscore = 0;
|
||||||
prm.m_disabled = false;
|
prm.m_disabled = false;
|
||||||
|
@ -1164,7 +1157,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ChildSetGeom(OdePrim odePrim)
|
private void ChildSetGeom(OdePrim odePrim)
|
||||||
|
@ -1226,16 +1218,11 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
childrenPrim.Remove(odePrim);
|
childrenPrim.Remove(odePrim);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (Body != IntPtr.Zero)
|
if (Body != IntPtr.Zero)
|
||||||
{
|
{
|
||||||
_parent_scene.remActivePrim(this);
|
_parent_scene.remActivePrim(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
lock (childrenPrim)
|
lock (childrenPrim)
|
||||||
{
|
{
|
||||||
foreach (OdePrim prm in childrenPrim)
|
foreach (OdePrim prm in childrenPrim)
|
||||||
|
@ -1244,8 +1231,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
ParentPrim(prm);
|
ParentPrim(prm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void changeSelectedStatus(float timestep)
|
private void changeSelectedStatus(float timestep)
|
||||||
|
@ -1686,12 +1671,10 @@ Console.WriteLine(" JointCreateFixed");
|
||||||
PID_G = m_PIDTau + 1;
|
PID_G = m_PIDTau + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Where are we, and where are we headed?
|
// Where are we, and where are we headed?
|
||||||
d.Vector3 pos = d.BodyGetPosition(Body);
|
d.Vector3 pos = d.BodyGetPosition(Body);
|
||||||
d.Vector3 vel = d.BodyGetLinearVel(Body);
|
d.Vector3 vel = d.BodyGetLinearVel(Body);
|
||||||
|
|
||||||
|
|
||||||
// Non-Vehicles have a limited set of Hover options.
|
// Non-Vehicles have a limited set of Hover options.
|
||||||
// determine what our target height really is based on HoverType
|
// determine what our target height really is based on HoverType
|
||||||
switch (m_PIDHoverType)
|
switch (m_PIDHoverType)
|
||||||
|
@ -1797,8 +1780,6 @@ Console.WriteLine(" JointCreateFixed");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void rotate(float timestep)
|
public void rotate(float timestep)
|
||||||
{
|
{
|
||||||
d.Quaternion myrot = new d.Quaternion();
|
d.Quaternion myrot = new d.Quaternion();
|
||||||
|
@ -1909,7 +1890,6 @@ Console.WriteLine(" JointCreateFixed");
|
||||||
|
|
||||||
public void changesize(float timestamp)
|
public void changesize(float timestamp)
|
||||||
{
|
{
|
||||||
|
|
||||||
string oldname = _parent_scene.geom_name_map[prim_geom];
|
string oldname = _parent_scene.geom_name_map[prim_geom];
|
||||||
|
|
||||||
if (_size.X <= 0) _size.X = 0.01f;
|
if (_size.X <= 0) _size.X = 0.01f;
|
||||||
|
@ -1961,15 +1941,13 @@ Console.WriteLine(" JointCreateFixed");
|
||||||
mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical);
|
mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical);
|
||||||
|
|
||||||
//IMesh mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical);
|
//IMesh mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical);
|
||||||
Console.WriteLine("changesize 1");
|
//Console.WriteLine("changesize 1");
|
||||||
CreateGeom(m_targetSpace, mesh);
|
CreateGeom(m_targetSpace, mesh);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_mesh = null;
|
_mesh = null;
|
||||||
Console.WriteLine("changesize 2");
|
//Console.WriteLine("changesize 2");
|
||||||
CreateGeom(m_targetSpace, _mesh);
|
CreateGeom(m_targetSpace, _mesh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2005,8 +1983,6 @@ Console.WriteLine("changesize 2");
|
||||||
m_taintsize = _size;
|
m_taintsize = _size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void changefloatonwater(float timestep)
|
public void changefloatonwater(float timestep)
|
||||||
{
|
{
|
||||||
m_collidesWater = m_taintCollidesWater;
|
m_collidesWater = m_taintCollidesWater;
|
||||||
|
@ -2071,13 +2047,13 @@ Console.WriteLine("changesize 2");
|
||||||
|
|
||||||
IMesh mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical);
|
IMesh mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical);
|
||||||
// createmesh returns null when it doesn't mesh.
|
// createmesh returns null when it doesn't mesh.
|
||||||
Console.WriteLine("changeshape needed meshing");
|
//Console.WriteLine("changeshape needed meshing");
|
||||||
CreateGeom(m_targetSpace, mesh);
|
CreateGeom(m_targetSpace, mesh);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_mesh = null;
|
_mesh = null;
|
||||||
Console.WriteLine("changeshape not need meshing");
|
//Console.WriteLine("changeshape not need meshing");
|
||||||
CreateGeom(m_targetSpace, null);
|
CreateGeom(m_targetSpace, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2162,11 +2138,8 @@ Console.WriteLine("changeshape not need meshing");
|
||||||
}
|
}
|
||||||
|
|
||||||
m_taintforce = false;
|
m_taintforce = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void changeSetTorque(float timestamp)
|
public void changeSetTorque(float timestamp)
|
||||||
{
|
{
|
||||||
if (!m_isSelected)
|
if (!m_isSelected)
|
||||||
|
@ -2835,7 +2808,6 @@ Console.WriteLine("changeshape not need meshing");
|
||||||
|
|
||||||
public override float APIDDamping{ set { return; } }
|
public override float APIDDamping{ set { return; } }
|
||||||
|
|
||||||
|
|
||||||
private void createAMotor(Vector3 axis)
|
private void createAMotor(Vector3 axis)
|
||||||
{
|
{
|
||||||
if (Body == IntPtr.Zero)
|
if (Body == IntPtr.Zero)
|
||||||
|
@ -2955,7 +2927,6 @@ Console.WriteLine("changeshape not need meshing");
|
||||||
//d.JointSetAMotorParam(Amotor, (int) dParam.Vel, 9000f);
|
//d.JointSetAMotorParam(Amotor, (int) dParam.Vel, 9000f);
|
||||||
d.JointSetAMotorParam(Amotor, (int)dParam.FudgeFactor, 0f);
|
d.JointSetAMotorParam(Amotor, (int)dParam.FudgeFactor, 0f);
|
||||||
d.JointSetAMotorParam(Amotor, (int)dParam.FMax, Mass * 50f);//
|
d.JointSetAMotorParam(Amotor, (int)dParam.FMax, Mass * 50f);//
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Matrix4 FromDMass(d.Mass pMass)
|
public Matrix4 FromDMass(d.Mass pMass)
|
||||||
|
@ -3040,8 +3011,6 @@ Console.WriteLine("changeshape not need meshing");
|
||||||
return Matrix4.Identity; // should probably throw an error. singluar matrix inverse not possible
|
return Matrix4.Identity; // should probably throw an error. singluar matrix inverse not possible
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return (Adjoint(pMat) / determinant3x3(pMat));
|
return (Adjoint(pMat) / determinant3x3(pMat));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3078,6 +3047,7 @@ Console.WriteLine("changeshape not need meshing");
|
||||||
}
|
}
|
||||||
m++;
|
m++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return minor;
|
return minor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3180,7 +3150,6 @@ Console.WriteLine("changeshape not need meshing");
|
||||||
|
|
||||||
det = diag1 + diag2 + diag3 - (diag4 + diag5 + diag6);
|
det = diag1 + diag2 + diag3 - (diag4 + diag5 + diag6);
|
||||||
return det;
|
return det;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void DMassCopy(ref d.Mass src, ref d.Mass dst)
|
private static void DMassCopy(ref d.Mass src, ref d.Mass dst)
|
||||||
|
@ -3205,6 +3174,5 @@ Console.WriteLine("changeshape not need meshing");
|
||||||
{
|
{
|
||||||
m_material = pMaterial;
|
m_material = pMaterial;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#define USE_DRAWSTUFF
|
//#define USE_DRAWSTUFF
|
||||||
|
//#define DEBUG
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -1716,7 +1717,9 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
|
public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
|
||||||
Vector3 size, Quaternion rotation, bool isPhysical)
|
Vector3 size, Quaternion rotation, bool isPhysical)
|
||||||
{
|
{
|
||||||
// m_log.DebugFormat("[PHYSICS]: Adding physics actor to {0}", primName);
|
#if SPAM
|
||||||
|
m_log.DebugFormat("[PHYSICS]: Adding physics actor to {0}", primName);
|
||||||
|
#endif
|
||||||
|
|
||||||
PhysicsActor result;
|
PhysicsActor result;
|
||||||
IMesh mesh = null;
|
IMesh mesh = null;
|
||||||
|
@ -2460,7 +2463,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
|
|
||||||
if (pbs.SculptEntry && !meshSculptedPrim)
|
if (pbs.SculptEntry && !meshSculptedPrim)
|
||||||
{
|
{
|
||||||
#if SPAM
|
#if DEBUG
|
||||||
m_log.Warn("NonMesh");
|
m_log.Warn("NonMesh");
|
||||||
#endif
|
#endif
|
||||||
return false;
|
return false;
|
||||||
|
@ -2482,7 +2485,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
&& pbs.PathScaleX == 100 && pbs.PathScaleY == 100
|
&& pbs.PathScaleX == 100 && pbs.PathScaleY == 100
|
||||||
&& pbs.PathShearX == 0 && pbs.PathShearY == 0)
|
&& pbs.PathShearX == 0 && pbs.PathShearY == 0)
|
||||||
{
|
{
|
||||||
#if SPAM
|
#if DEBUG
|
||||||
m_log.Warn("NonMesh");
|
m_log.Warn("NonMesh");
|
||||||
#endif
|
#endif
|
||||||
return false;
|
return false;
|
||||||
|
@ -2563,12 +2566,12 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
|
|
||||||
if (iPropertiesNotSupportedDefault == 0)
|
if (iPropertiesNotSupportedDefault == 0)
|
||||||
{
|
{
|
||||||
#if SPAM
|
#if DEBUG
|
||||||
m_log.Warn("NonMesh");
|
m_log.Warn("NonMesh");
|
||||||
#endif
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#if SPAM
|
#if DEBUG
|
||||||
m_log.Debug("Mesh");
|
m_log.Debug("Mesh");
|
||||||
#endif
|
#endif
|
||||||
return true;
|
return true;
|
||||||
|
@ -3606,7 +3609,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.Warn("[PHYSICS]: Couldn't proceed with UnCombine. Region has inconsistant data.");
|
m_log.Warn("[PHYSICS]: Couldn't proceed with UnCombine. Region has inconsistant data.");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue