| 31 |
using Nini.Config; |
using Nini.Config; |
| 32 |
using OpenSim.Framework; |
using OpenSim.Framework; |
| 33 |
using OpenSim.Region.Physics.Manager; |
using OpenSim.Region.Physics.Manager; |
| 34 |
|
using System.Reflection; |
| 35 |
|
using log4net; |
| 36 |
|
|
| 37 |
namespace OpenSim.Region.Physics.NewtonPlugin |
namespace OpenSim.Region.Physics.NewtonPlugin |
| 38 |
{ |
{ |
| 39 |
public class NewtonPrim : PhysicsActor |
public class NewtonPrim : PhysicsActor |
| 40 |
{ |
{ |
| 41 |
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
| 42 |
private float _mass; |
private float _mass; |
| 43 |
private PhysicsVector _position; |
private PhysicsVector _position; |
| 44 |
private PhysicsVector _velocity; |
private PhysicsVector _velocity; |
| 248 |
set { _oldAcceleration = value; } |
set { _oldAcceleration = value; } |
| 249 |
} |
} |
| 250 |
|
|
| 251 |
|
// set commented out because PhysicsActor.Acceleration doesn't have |
| 252 |
|
// a set! |
| 253 |
public override PhysicsVector Acceleration |
public override PhysicsVector Acceleration |
| 254 |
{ |
{ |
| 255 |
get { return _acceleration; } |
get { return _acceleration; } |
| 337 |
|
|
| 338 |
public override void AddForce(PhysicsVector force, bool pushforce) |
public override void AddForce(PhysicsVector force, bool pushforce) |
| 339 |
{ |
{ |
| 340 |
|
// I don't understand what pushforce is, so I'm going to |
| 341 |
|
// ignore it for now...! (rknop 2009/09/14) |
| 342 |
|
|
| 343 |
|
_velocity += force/_mass; |
| 344 |
} |
} |
| 345 |
|
|
| 346 |
public override void AddAngularForce(PhysicsVector force, bool pushforce) |
public override void AddAngularForce(PhysicsVector force, bool pushforce) |