* Implements IObjectPhysics on SOPObject partially.
* Eg, IObject.Physics.* is now valid syntax and compiles (but will throw NotSupported at runtime)0.6.5-rc1
parent
39c3ccb93a
commit
746729b6ce
|
@ -28,6 +28,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
|
using OpenSim.Region.OptionalModules.Scripting.Minimodule.Object;
|
||||||
|
|
||||||
namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||||
{
|
{
|
||||||
|
@ -140,7 +141,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||||
/// </summary>
|
/// </summary>
|
||||||
String Text { get; set; }
|
String Text { get; set; }
|
||||||
|
|
||||||
bool IsPhysical { get; set; } // SetStatus(PHYSICS)
|
|
||||||
bool IsPhantom { get; set; } // SetStatus(PHANTOM)
|
bool IsPhantom { get; set; } // SetStatus(PHANTOM)
|
||||||
bool IsRotationLockedX { get; set; } // SetStatus(!ROTATE_X)
|
bool IsRotationLockedX { get; set; } // SetStatus(!ROTATE_X)
|
||||||
bool IsRotationLockedY { get; set; } // SetStatus(!ROTATE_Y)
|
bool IsRotationLockedY { get; set; } // SetStatus(!ROTATE_Y)
|
||||||
|
@ -162,6 +162,9 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||||
|
|
||||||
PhysicsMaterial PhysicsMaterial { get; set; }
|
PhysicsMaterial PhysicsMaterial { get; set; }
|
||||||
|
|
||||||
|
IObjectPhysics Physics { get; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Causes the object to speak to its surroundings,
|
/// Causes the object to speak to its surroundings,
|
||||||
/// equivilent to LSL/OSSL llSay
|
/// equivilent to LSL/OSSL llSay
|
||||||
|
|
|
@ -5,25 +5,27 @@ using OpenMetaverse;
|
||||||
|
|
||||||
namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object
|
namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object
|
||||||
{
|
{
|
||||||
interface IObjectPhysics
|
public interface IObjectPhysics
|
||||||
{
|
{
|
||||||
bool Enabled { get; set; }
|
bool Enabled { get; set; }
|
||||||
|
|
||||||
bool Phantom { get; set; }
|
bool Phantom { get; set; }
|
||||||
bool PhantomCollisions { get; set; }
|
bool PhantomCollisions { get; set; }
|
||||||
|
|
||||||
double Density { get; set; }
|
double Density { get; set; }
|
||||||
double Mass { get; set; }
|
double Mass { get; set; }
|
||||||
|
|
||||||
double Buoyancy { get; set; }
|
double Buoyancy { get; set; }
|
||||||
|
|
||||||
Vector3 GeometricCenter { get; }
|
Vector3 GeometricCenter { get; }
|
||||||
Vector3 CenterOfMass { get; }
|
Vector3 CenterOfMass { get; }
|
||||||
|
|
||||||
|
Vector3 RotationalVelocity { get; set; }
|
||||||
Vector3 Velocity { get; set; }
|
Vector3 Velocity { get; set; }
|
||||||
Vector3 Torque { get; set; }
|
Vector3 Torque { get; set; }
|
||||||
|
|
||||||
Vector3 Acceleration { get; }
|
Vector3 Acceleration { get; }
|
||||||
Quaternion Orientation { get; set; }
|
Vector3 Force { get; set; }
|
||||||
Vector3 RotationalVelocity { get; set; }
|
|
||||||
|
bool FloatOnWater { set; }
|
||||||
|
|
||||||
void AddForce(Vector3 force, bool pushforce);
|
void AddForce(Vector3 force, bool pushforce);
|
||||||
void AddAngularForce(Vector3 force, bool pushforce);
|
void AddAngularForce(Vector3 force, bool pushforce);
|
||||||
|
|
|
@ -30,10 +30,11 @@ using System.Collections.Generic;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
using OpenSim.Region.OptionalModules.Scripting.Minimodule.Object;
|
||||||
|
|
||||||
namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||||
{
|
{
|
||||||
class SOPObject : MarshalByRefObject, IObject
|
class SOPObject : MarshalByRefObject, IObject, IObjectPhysics
|
||||||
{
|
{
|
||||||
private readonly Scene m_rootScene;
|
private readonly Scene m_rootScene;
|
||||||
private readonly uint m_localID;
|
private readonly uint m_localID;
|
||||||
|
@ -254,6 +255,11 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||||
set { throw new System.NotImplementedException(); }
|
set { throw new System.NotImplementedException(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IObjectPhysics Physics
|
||||||
|
{
|
||||||
|
get { return this; }
|
||||||
|
}
|
||||||
|
|
||||||
#region Public Functions
|
#region Public Functions
|
||||||
|
|
||||||
public void Say(string msg)
|
public void Say(string msg)
|
||||||
|
@ -386,5 +392,103 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region IObjectPhysics
|
||||||
|
|
||||||
|
public bool Enabled
|
||||||
|
{
|
||||||
|
get { throw new System.NotImplementedException(); }
|
||||||
|
set { throw new System.NotImplementedException(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Phantom
|
||||||
|
{
|
||||||
|
get { throw new System.NotImplementedException(); }
|
||||||
|
set { throw new System.NotImplementedException(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool PhantomCollisions
|
||||||
|
{
|
||||||
|
get { throw new System.NotImplementedException(); }
|
||||||
|
set { throw new System.NotImplementedException(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public double Density
|
||||||
|
{
|
||||||
|
get { throw new System.NotImplementedException(); }
|
||||||
|
set { throw new System.NotImplementedException(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public double Mass
|
||||||
|
{
|
||||||
|
get { throw new System.NotImplementedException(); }
|
||||||
|
set { throw new System.NotImplementedException(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public double Buoyancy
|
||||||
|
{
|
||||||
|
get { throw new System.NotImplementedException(); }
|
||||||
|
set { throw new System.NotImplementedException(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public Vector3 GeometricCenter
|
||||||
|
{
|
||||||
|
get { throw new System.NotImplementedException(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public Vector3 CenterOfMass
|
||||||
|
{
|
||||||
|
get { throw new System.NotImplementedException(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public Vector3 RotationalVelocity
|
||||||
|
{
|
||||||
|
get { throw new System.NotImplementedException(); }
|
||||||
|
set { throw new System.NotImplementedException(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public Vector3 Velocity
|
||||||
|
{
|
||||||
|
get { throw new System.NotImplementedException(); }
|
||||||
|
set { throw new System.NotImplementedException(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public Vector3 Torque
|
||||||
|
{
|
||||||
|
get { throw new System.NotImplementedException(); }
|
||||||
|
set { throw new System.NotImplementedException(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public Vector3 Acceleration
|
||||||
|
{
|
||||||
|
get { throw new System.NotImplementedException(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public Vector3 Force
|
||||||
|
{
|
||||||
|
get { throw new System.NotImplementedException(); }
|
||||||
|
set { throw new System.NotImplementedException(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool FloatOnWater
|
||||||
|
{
|
||||||
|
set { throw new System.NotImplementedException(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddForce(Vector3 force, bool pushforce)
|
||||||
|
{
|
||||||
|
throw new System.NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddAngularForce(Vector3 force, bool pushforce)
|
||||||
|
{
|
||||||
|
throw new System.NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetMomentum(Vector3 momentum)
|
||||||
|
{
|
||||||
|
throw new System.NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue