Let OOB information usable outside ubitode

avinationmerge
UbitUmarov 2012-05-27 14:01:42 +01:00
parent d2260423e5
commit f740c9522a
3 changed files with 33 additions and 29 deletions

View File

@ -294,6 +294,34 @@ namespace OpenSim.Region.Physics.Manager
public abstract Vector3 GeometricCenter { get; } public abstract Vector3 GeometricCenter { get; }
public abstract Vector3 CenterOfMass { get; } public abstract Vector3 CenterOfMass { get; }
public virtual Vector3 OOBsize
{
get
{
Vector3 s=Size;
s.X *=0.5f;
s.Y *=0.5f;
s.Z *=0.5f;
return s;
}
}
public virtual Vector3 OOBoffset
{
get
{
return Vector3.Zero;
}
}
public virtual float OOBRadiusSQ
{
get
{
return Size.LengthSquared() * 0.25f; // ((0.5^2)
}
}
/// <summary> /// <summary>
/// Velocity of this actor. /// Velocity of this actor.
/// </summary> /// </summary>
@ -429,7 +457,6 @@ namespace OpenSim.Region.Physics.Manager
public override void VehicleFloatParam(int param, float value) public override void VehicleFloatParam(int param, float value)
{ {
} }
public override void VehicleVectorParam(int param, Vector3 value) public override void VehicleVectorParam(int param, Vector3 value)

View File

@ -522,29 +522,6 @@ namespace OpenSim.Region.Physics.OdePlugin
} }
} }
//UBit mess
/* for later use
public override Vector3 PrimOOBsize
{
get
{
Vector3 s=Size;
s.X *=0.5f;
s.Y *=0.5f;
s.Z *=0.5f;
return s;
}
}
public override Vector3 PrimOOBoffset
{
get
{
return Vector3.Zero;
}
}
*/
public override PrimitiveBaseShape Shape public override PrimitiveBaseShape Shape
{ {
set { return; } set { return; }

View File

@ -504,8 +504,8 @@ namespace OpenSim.Region.Physics.OdePlugin
} }
} }
} }
/*
public override Vector3 PrimOOBsize public override Vector3 OOBsize
{ {
get get
{ {
@ -513,7 +513,7 @@ namespace OpenSim.Region.Physics.OdePlugin
} }
} }
public override Vector3 PrimOOBoffset public override Vector3 OOBoffset
{ {
get get
{ {
@ -521,14 +521,14 @@ namespace OpenSim.Region.Physics.OdePlugin
} }
} }
public override float PrimOOBRadiusSQ public override float OOBRadiusSQ
{ {
get get
{ {
return primOOBradiusSQ; return primOOBradiusSQ;
} }
} }
*/
public override PrimitiveBaseShape Shape public override PrimitiveBaseShape Shape
{ {
set set