Difference between revisions of "LlAxes2Rot"

From Second Life Wiki
Jump to navigation Jump to search
(added unit vector requirement for llAxes2Rot)
(After a lot of testing & online discussion with Strife)
Line 2: Line 2:
|func_id=17|func_sleep=0.0|sort=Axes2Rot|func_energy=10.0
|func_id=17|func_sleep=0.0|sort=Axes2Rot|func_energy=10.0
|func=llAxes2Rot|sort=Axes2Rot
|func=llAxes2Rot|sort=Axes2Rot
|func_footnote=All three vectors must be mutually orthogonal unit vectors.
|return_type=rotation
|return_type=rotation
|p1_type=vector|p1_name=fwd
|p1_type=vector|p1_name=fwd
Line 7: Line 8:
|p3_type=vector|p3_name=up
|p3_type=vector|p3_name=up
|return_text=that is defined by the 3 coordinate axes
|return_text=that is defined by the 3 coordinate axes
|notes=Technically, only two non-parallel vectors are needed to define this rotation which can be done by calling:
|notes=Technically, only the first two vectors are needed to define this rotation, which can be done by calling:
<pre>llAxes2Rot(fwd, left, fwd % left);</pre>All three vectors must be mutually orthogonal unit vectors.
<pre>llAxes2Rot(fwd, left, fwd % left);</pre>
|spec
|spec
|caveats
|caveats

Revision as of 07:33, 6 April 2008

Summary

Function: rotation llAxes2Rot( vector fwd, vector left, vector up );
0.0 Forced Delay
10.0 Energy

Returns a rotation that is defined by the 3 coordinate axes

• vector fwd
• vector left
• vector up

All three vectors must be mutually orthogonal unit vectors.

Examples

Notes

Technically, only the first two vectors are needed to define this rotation, which can be done by calling:

llAxes2Rot(fwd, left, fwd % left);

Deep Notes

Signature

function rotation llAxes2Rot( vector fwd, vector left, vector up );