From 39c3ccb93a62de270c2f625d396daf18c805bf51 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sat, 4 Apr 2009 23:16:19 +0000 Subject: [PATCH] * Implements IObjectPhysics, this collects Physics attributes into one interface, will be referenced on IObject as IObject.Physics.* * Eg; IObject.Physics.Torque = new Vector3(30.0,0.4,0.5); * Maps loosely to internal PhysicsActor class. --- .../Minimodule/Object/IObjectPhysics.cs | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 OpenSim/Region/OptionalModules/Scripting/Minimodule/Object/IObjectPhysics.cs diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Object/IObjectPhysics.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Object/IObjectPhysics.cs new file mode 100644 index 0000000000..aaa95e50d3 --- /dev/null +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Object/IObjectPhysics.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Text; +using OpenMetaverse; + +namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object +{ + interface IObjectPhysics + { + bool Enabled { get; set; } + bool Phantom { get; set; } + bool PhantomCollisions { get; set; } + + double Density { get; set; } + double Mass { get; set; } + + double Buoyancy { get; set; } + + Vector3 GeometricCenter { get; } + Vector3 CenterOfMass { get; } + Vector3 Velocity { get; set; } + Vector3 Torque { get; set; } + + Vector3 Acceleration { get; } + Quaternion Orientation { get; set; } + Vector3 RotationalVelocity { get; set; } + + void AddForce(Vector3 force, bool pushforce); + void AddAngularForce(Vector3 force, bool pushforce); + void SetMomentum(Vector3 momentum); + } +}