refactor: simply some properties code in BasicPhysicsPlugin

0.7.4.1
Justin Clark-Casey (justincc) 2012-04-22 20:28:12 +01:00
parent 58c890df5d
commit 49ed68e98c
2 changed files with 12 additions and 72 deletions

View File

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

View File

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