From 8ad6f575ebc23f0c7b282b9ec2543bce26287e54 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sun, 14 Dec 2008 14:30:28 +0000 Subject: * Implements the torque/Rotational Impulse methods in the PhysicsAPI and the ODEPlugin and pipes them to their respective LSL method. * NBody will need to be updated, this is an API change. Torque property and AddAngularForce --- .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 68b92a4..84def93 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -1951,26 +1951,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llApplyRotationalImpulse(LSL_Vector force, int local) { m_host.AddScriptLPS(1); - NotImplemented("llApplyRotationalImpulse"); + m_host.ApplyAngularImpulse(new Vector3((float)force.x, (float)force.y, (float)force.z), local != 0); + } public void llSetTorque(LSL_Vector torque, int local) { m_host.AddScriptLPS(1); - NotImplemented("llSetTorque"); + m_host.SetAngularImpulse(new Vector3((float)torque.x, (float)torque.y, (float)torque.z), local != 0); } public LSL_Vector llGetTorque() { m_host.AddScriptLPS(1); - NotImplemented("llGetTorque"); - return new LSL_Vector(); + Vector3 torque = m_host.GetTorque(); + return new LSL_Vector(torque.X,torque.Y,torque.Z); } public void llSetForceAndTorque(LSL_Vector force, LSL_Vector torque, int local) { m_host.AddScriptLPS(1); - NotImplemented("llSetForceAndTorque"); + llSetForce(force, local); + llSetTorque(torque, local); } public LSL_Vector llGetVel() -- cgit v1.1