Implemented object oriented Prim.Position, Prim.Rotation and Prim.Text.

Example:
Prim.Position.X += 10;
0.6.0-stable
Tedd Hansen 2008-02-24 16:16:00 +00:00
parent 05dd1759c7
commit 08131614c9
1 changed files with 20 additions and 9 deletions

View File

@ -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