* 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
Teravus Ovares 2008-01-19 22:51:16 +00:00
parent cc635a651a
commit 4f9c7288cd
2 changed files with 90 additions and 5 deletions

View File

@ -133,9 +133,36 @@ namespace OpenSim.Region.Physics.OdePlugin
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)
{
prim_geom = d.CreateSphere(m_targetSpace, _size.X / 2);
}
else
{
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.Quaternion myrot = new d.Quaternion();
@ -458,8 +485,36 @@ namespace OpenSim.Region.Physics.OdePlugin
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)
{
prim_geom = d.CreateSphere(m_targetSpace, _size.X / 2);
}
else
{
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.Quaternion myrot = new d.Quaternion();
myrot.W = _orientation.w;
@ -470,8 +525,35 @@ namespace OpenSim.Region.Physics.OdePlugin
}
}
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);
}
}
//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.Quaternion myrot = new d.Quaternion();
myrot.W = _orientation.w;
@ -780,6 +862,9 @@ namespace OpenSim.Region.Physics.OdePlugin
{
m_throttleUpdates = false;
throttleCounter = 0;
m_rotationalVelocity.X = 0;
m_rotationalVelocity.Y = 0;
m_rotationalVelocity.Z = 0;
base.RequestPhysicsterseUpdate();
m_lastUpdateSent = true;
}

View File

@ -338,7 +338,7 @@ namespace OpenSim.Region.Physics.OdePlugin
{
//This is disabled at the moment only because it needs more tweaking
//It will eventually be uncommented
/*
if (contacts[i].depth >= 1.00f)
{
//MainLog.Instance.Debug("PHYSICS",contacts[i].depth.ToString());
@ -381,7 +381,7 @@ namespace OpenSim.Region.Physics.OdePlugin
//contacts[i].depth = 0.0000000f;
}
}
*/
// If you interpenetrate a prim with another prim
if (p1.PhysicsActorType == (int) ActorTypes.Prim && p2.PhysicsActorType == (int) ActorTypes.Prim)