* Announcing the alternative prim early adoption program.. Adding regular spheres to the physical prim mix.
* Be advised.. these are not ellipsoids.. these are spheres.ThreadPoolClientBranch
parent
cc635a651a
commit
4f9c7288cd
|
@ -133,9 +133,36 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
setMesh(parent_scene, mesh);
|
setMesh(parent_scene, mesh);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (pbs.ProfileShape == ProfileShape.HalfCircle && pbs.PathCurve == (byte)Extrusion.Curve1)
|
||||||
|
{
|
||||||
|
if (_size.X == _size.Y && _size.Y == _size.Z && _size.X == _size.Z)
|
||||||
|
{
|
||||||
|
prim_geom = d.CreateSphere(m_targetSpace, _size.X / 2);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z);
|
prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
//else if (pbs.ProfileShape == ProfileShape.Circle && pbs.PathCurve == (byte)Extrusion.Straight)
|
||||||
|
//{
|
||||||
|
//Cyllinder
|
||||||
|
//if (_size.X == _size.Y)
|
||||||
|
//{
|
||||||
|
//prim_geom = d.CreateCylinder(m_targetSpace, _size.X / 2, _size.Z);
|
||||||
|
//}
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
//prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z);
|
||||||
|
//}
|
||||||
|
//}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z);
|
d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z);
|
||||||
d.Quaternion myrot = new d.Quaternion();
|
d.Quaternion myrot = new d.Quaternion();
|
||||||
|
@ -458,8 +485,36 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
setMesh(_parent_scene, mesh);
|
setMesh(_parent_scene, mesh);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (_pbs.ProfileShape == ProfileShape.HalfCircle && _pbs.PathCurve == (byte)Extrusion.Curve1)
|
||||||
|
{
|
||||||
|
if (_size.X == _size.Y && _size.Y == _size.Z && _size.X == _size.Z)
|
||||||
|
{
|
||||||
|
prim_geom = d.CreateSphere(m_targetSpace, _size.X / 2);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z);
|
prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//else if (_pbs.ProfileShape == ProfileShape.Circle && _pbs.PathCurve == (byte)Extrusion.Straight)
|
||||||
|
//{
|
||||||
|
//Cyllinder
|
||||||
|
//if (_size.X == _size.Y)
|
||||||
|
//{
|
||||||
|
// prim_geom = d.CreateCylinder(m_targetSpace, _size.X / 2, _size.Z);
|
||||||
|
//}
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
//prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z);
|
||||||
|
//}
|
||||||
|
//}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z);
|
||||||
|
}
|
||||||
|
//prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z);
|
||||||
d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z);
|
d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z);
|
||||||
d.Quaternion myrot = new d.Quaternion();
|
d.Quaternion myrot = new d.Quaternion();
|
||||||
myrot.W = _orientation.w;
|
myrot.W = _orientation.w;
|
||||||
|
@ -470,8 +525,35 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (_pbs.ProfileShape == ProfileShape.HalfCircle && _pbs.PathCurve == (byte)Extrusion.Curve1)
|
||||||
|
{
|
||||||
|
if (_size.X == _size.Y && _size.Y == _size.Z && _size.X == _size.Z)
|
||||||
|
{
|
||||||
|
prim_geom = d.CreateSphere(m_targetSpace, _size.X / 2);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z);
|
prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//else if (_pbs.ProfileShape == ProfileShape.Circle && _pbs.PathCurve == (byte)Extrusion.Straight)
|
||||||
|
//{
|
||||||
|
//Cyllinder
|
||||||
|
//if (_size.X == _size.Y)
|
||||||
|
//{
|
||||||
|
//prim_geom = d.CreateCylinder(m_targetSpace, _size.X / 2, _size.Z);
|
||||||
|
//}
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
//prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z);
|
||||||
|
//}
|
||||||
|
//}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z);
|
||||||
|
}
|
||||||
d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z);
|
d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z);
|
||||||
d.Quaternion myrot = new d.Quaternion();
|
d.Quaternion myrot = new d.Quaternion();
|
||||||
myrot.W = _orientation.w;
|
myrot.W = _orientation.w;
|
||||||
|
@ -780,6 +862,9 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
{
|
{
|
||||||
m_throttleUpdates = false;
|
m_throttleUpdates = false;
|
||||||
throttleCounter = 0;
|
throttleCounter = 0;
|
||||||
|
m_rotationalVelocity.X = 0;
|
||||||
|
m_rotationalVelocity.Y = 0;
|
||||||
|
m_rotationalVelocity.Z = 0;
|
||||||
base.RequestPhysicsterseUpdate();
|
base.RequestPhysicsterseUpdate();
|
||||||
m_lastUpdateSent = true;
|
m_lastUpdateSent = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -338,7 +338,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
{
|
{
|
||||||
//This is disabled at the moment only because it needs more tweaking
|
//This is disabled at the moment only because it needs more tweaking
|
||||||
//It will eventually be uncommented
|
//It will eventually be uncommented
|
||||||
|
/*
|
||||||
if (contacts[i].depth >= 1.00f)
|
if (contacts[i].depth >= 1.00f)
|
||||||
{
|
{
|
||||||
//MainLog.Instance.Debug("PHYSICS",contacts[i].depth.ToString());
|
//MainLog.Instance.Debug("PHYSICS",contacts[i].depth.ToString());
|
||||||
|
@ -381,7 +381,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
//contacts[i].depth = 0.0000000f;
|
//contacts[i].depth = 0.0000000f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// If you interpenetrate a prim with another prim
|
// If you interpenetrate a prim with another prim
|
||||||
if (p1.PhysicsActorType == (int) ActorTypes.Prim && p2.PhysicsActorType == (int) ActorTypes.Prim)
|
if (p1.PhysicsActorType == (int) ActorTypes.Prim && p2.PhysicsActorType == (int) ActorTypes.Prim)
|
||||||
|
|
Loading…
Reference in New Issue