From 838818270785c58d7b2df221b8b94397aa3cdb04 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 13 Mar 2012 22:20:12 +0100 Subject: Implement llSetPrimitiveParams for physics shape and material. Add llSetPhysicsMaterial support. --- .../Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs | 11 +++++++++++ OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs | 5 +++++ 2 files changed, 16 insertions(+) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Runtime') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index ba75253..4ce3cf1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs @@ -570,6 +570,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public const int PRIM_MEDIA_PERM_OWNER = 1; public const int PRIM_MEDIA_PERM_GROUP = 2; public const int PRIM_MEDIA_PERM_ANYONE = 4; + + public const int PRIM_PHYSICS_SHAPE_TYPE = 30; + public const int PRIM_PHYSICS_SHAPE_PRIM = 0; + public const int PRIM_PHYSICS_SHAPE_CONVEX = 2; + public const int PRIM_PHYSICS_SHAPE_NONE = 1; + + public const int PRIM_PHYSICS_MATERIAL = 31; + public const int DENSITY = 1; + public const int FRICTION = 2; + public const int RESTITUTION = 4; + public const int GRAVITY_MULTIPLIER = 8; // extra constants for llSetPrimMediaParams public static readonly LSLInteger LSL_STATUS_OK = new LSLInteger(0); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs index a8d1ddb..bf58d13 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs @@ -1949,5 +1949,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase { m_LSL_Functions.llSetKeyframedMotion(frames, options); } + + public void llSetPhysicsMaterial(int material_bits, float material_gravity_modifier, float material_restitution, float material_friction, float material_density) + { + m_LSL_Functions.llSetPhysicsMaterial(material_bits, material_gravity_modifier, material_restitution, material_friction, material_density); + } } } -- cgit v1.1