refactor: simply some properties code in BasicPhysicsPlugin

0.7.3-extended
Justin Clark-Casey (justincc) 2012-04-22 20:28:12 +01:00
parent 2cd927bb14
commit 5157d2023d
2 changed files with 12 additions and 72 deletions

View File

@ -36,13 +36,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
{
public class BasicActor : PhysicsActor
{
private Vector3 _position;
private Vector3 _velocity;
private Vector3 _acceleration;
private Vector3 _size;
private Vector3 m_rotationalVelocity;
private bool flying;
private bool iscolliding;
public BasicActor(Vector3 size)
{
@ -55,11 +49,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
set { return; }
}
public override Vector3 RotationalVelocity
{
get { return m_rotationalVelocity; }
set { m_rotationalVelocity = value; }
}
public override Vector3 RotationalVelocity { get; set; }
public override bool SetAlwaysRun
{
@ -105,17 +95,9 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
set { return; }
}
public override bool Flying
{
get { return flying; }
set { flying = value; }
}
public override bool Flying { get; set; }
public override bool IsColliding
{
get { return iscolliding; }
set { iscolliding = value; }
}
public override bool IsColliding { get; set; }
public override bool CollidingGround
{
@ -134,11 +116,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
get { return false; }
}
public override Vector3 Position
{
get { return _position; }
set { _position = value; }
}
public override Vector3 Position { get; set; }
public override Vector3 Size
{
@ -206,11 +184,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
get { return Vector3.Zero; }
}
public override Vector3 Velocity
{
get { return _velocity; }
set { _velocity = value; }
}
public override Vector3 Velocity { get; set; }
public override Vector3 Torque
{
@ -230,11 +204,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
set { }
}
public override Vector3 Acceleration
{
get { return _acceleration; }
set { _acceleration = value; }
}
public override Vector3 Acceleration { get; set; }
public override bool Kinematic
{

View File

@ -36,14 +36,8 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
{
public class BasicPhysicsPrim : PhysicsActor
{
private Vector3 _position;
private Vector3 _velocity;
private Vector3 _acceleration;
private Vector3 _size;
private PrimitiveBaseShape _shape;
private Vector3 m_rotationalVelocity;
private bool flying;
private bool iscolliding;
public BasicPhysicsPrim(
string name, uint localId, Vector3 position, Vector3 size, Quaternion orientation, PrimitiveBaseShape shape)
@ -62,11 +56,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
set { return; }
}
public override Vector3 RotationalVelocity
{
get { return m_rotationalVelocity; }
set { m_rotationalVelocity = value; }
}
public override Vector3 RotationalVelocity { get; set; }
public override bool SetAlwaysRun
{
@ -112,17 +102,9 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
set { return; }
}
public override bool Flying
{
get { return flying; }
set { flying = value; }
}
public override bool Flying { get; set; }
public override bool IsColliding
{
get { return iscolliding; }
set { iscolliding = value; }
}
public override bool IsColliding { get; set; }
public override bool CollidingGround
{
@ -141,11 +123,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
get { return false; }
}
public override Vector3 Position
{
get { return _position; }
set { _position = value; }
}
public override Vector3 Position { get; set; }
public override Vector3 Size
{
@ -213,11 +191,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
get { return Vector3.Zero; }
}
public override Vector3 Velocity
{
get { return _velocity; }
set { _velocity = value; }
}
public override Vector3 Velocity { get; set; }
public override Vector3 Torque
{
@ -233,11 +207,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
public override Quaternion Orientation { get; set; }
public override Vector3 Acceleration
{
get { return _acceleration; }
set { _acceleration = value; }
}
public override Vector3 Acceleration { get; set; }
public override bool Kinematic
{