Added llRot2Fwd, llRot2Left, and llRot2Up as well as explicit vector->string casting.

(Thanks to dalien on informing me how easy the math was for these).
This commit is contained in:
alondria
2008-02-03 16:42:43 +00:00
parent 5a99a96fed
commit bc3d0217af
2 changed files with 8 additions and 3 deletions

View File

@@ -245,17 +245,17 @@ namespace OpenSim.Region.ScriptEngine.Common
public LSL_Types.Vector3 llRot2Fwd(LSL_Types.Quaternion r)
{
return new LSL_Types.Vector3();
return (new LSL_Types.Vector3(1,0,0) * r);
}
public LSL_Types.Vector3 llRot2Left(LSL_Types.Quaternion r)
{
return new LSL_Types.Vector3();
return (new LSL_Types.Vector3(0, 1, 0) * r);
}
public LSL_Types.Vector3 llRot2Up(LSL_Types.Quaternion r)
{
return new LSL_Types.Vector3();
return (new LSL_Types.Vector3(0, 0, 1) * r);
}
public LSL_Types.Quaternion llRotBetween(LSL_Types.Vector3 a, LSL_Types.Vector3 b)
{