aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
authorTeravus Ovares2008-12-14 14:30:28 +0000
committerTeravus Ovares2008-12-14 14:30:28 +0000
commit8ad6f575ebc23f0c7b282b9ec2543bce26287e54 (patch)
treeab424abb19a070cce386a5013b3d5452dbdf9bc2 /OpenSim/Region/ScriptEngine/Shared/Api
parentAdded ATTACH_HUD_* constants fixes Mantis #2823 (diff)
downloadopensim-SC-8ad6f575ebc23f0c7b282b9ec2543bce26287e54.zip
opensim-SC-8ad6f575ebc23f0c7b282b9ec2543bce26287e54.tar.gz
opensim-SC-8ad6f575ebc23f0c7b282b9ec2543bce26287e54.tar.bz2
opensim-SC-8ad6f575ebc23f0c7b282b9ec2543bce26287e54.tar.xz
* 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
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs12
1 files changed, 7 insertions, 5 deletions
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
1951 public void llApplyRotationalImpulse(LSL_Vector force, int local) 1951 public void llApplyRotationalImpulse(LSL_Vector force, int local)
1952 { 1952 {
1953 m_host.AddScriptLPS(1); 1953 m_host.AddScriptLPS(1);
1954 NotImplemented("llApplyRotationalImpulse"); 1954 m_host.ApplyAngularImpulse(new Vector3((float)force.x, (float)force.y, (float)force.z), local != 0);
1955
1955 } 1956 }
1956 1957
1957 public void llSetTorque(LSL_Vector torque, int local) 1958 public void llSetTorque(LSL_Vector torque, int local)
1958 { 1959 {
1959 m_host.AddScriptLPS(1); 1960 m_host.AddScriptLPS(1);
1960 NotImplemented("llSetTorque"); 1961 m_host.SetAngularImpulse(new Vector3((float)torque.x, (float)torque.y, (float)torque.z), local != 0);
1961 } 1962 }
1962 1963
1963 public LSL_Vector llGetTorque() 1964 public LSL_Vector llGetTorque()
1964 { 1965 {
1965 m_host.AddScriptLPS(1); 1966 m_host.AddScriptLPS(1);
1966 NotImplemented("llGetTorque"); 1967 Vector3 torque = m_host.GetTorque();
1967 return new LSL_Vector(); 1968 return new LSL_Vector(torque.X,torque.Y,torque.Z);
1968 } 1969 }
1969 1970
1970 public void llSetForceAndTorque(LSL_Vector force, LSL_Vector torque, int local) 1971 public void llSetForceAndTorque(LSL_Vector force, LSL_Vector torque, int local)
1971 { 1972 {
1972 m_host.AddScriptLPS(1); 1973 m_host.AddScriptLPS(1);
1973 NotImplemented("llSetForceAndTorque"); 1974 llSetForce(force, local);
1975 llSetTorque(torque, local);
1974 } 1976 }
1975 1977
1976 public LSL_Vector llGetVel() 1978 public LSL_Vector llGetVel()