From 08131614c93912482e852e714f69c35801ee18be Mon Sep 17 00:00:00 2001 From: Tedd Hansen Date: Sun, 24 Feb 2008 16:16:00 +0000 Subject: Implemented object oriented Prim.Position, Prim.Rotation and Prim.Text. Example: Prim.Position.X += 10; --- .../ScriptEngine/Common/OSSL_BuilIn_Commands.cs | 29 +++++++++++++++------- 1 file changed, 20 insertions(+), 9 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs index 9d16afc..d5af74a 100644 --- a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs @@ -45,22 +45,33 @@ namespace OpenSim.Region.ScriptEngine.Common public class OSSLPrim { + private OSSL_BuilIn_Commands OSSL; + public OSSLPrim(OSSL_BuilIn_Commands bc) + { + OSSL = bc; + } - private LSL_Types.Vector3 _position; public LSL_Types.Vector3 Position { - get { return _position; } - set { _position = value; } + get { return OSSL.llGetPos(); } + set { OSSL.llSetPos(value); } } - private LSL_Types.Quaternion _rotation; public LSL_Types.Quaternion Rotation { - get { return _rotation; } - set { _rotation = value; } + get { return OSSL.llGetRot(); } + set { OSSL.llSetRot(value); } } - private string _text; - public string Text + private TextStruct _text; + public TextStruct Text { get { return _text; } - set { _text = value; } + set { _text = value; + OSSL.llSetText(_text.Text, _text.color, _text.alpha); } + } + + public struct TextStruct + { + public string Text; + public LSL_Types.Vector3 color; + public double alpha; } } //public struct OSSLPrim_Position -- cgit v1.1