Difference between revisions of "Matrix:rotate"

From GiderosMobile
Line 2: Line 2:
 
'''Available since:''' Gideros 2016.06<br/>
 
'''Available since:''' Gideros 2016.06<br/>
 
=== Description ===
 
=== Description ===
Combine existing rotation with provided.
+
<translate>Combine existing rotation with provided.
It takes a x,y,z vector and an angle, and rotate the matrix around the given vector by the specified angle
+
It takes a x,y,z vector and an angle, and rotate the matrix around the given vector by the specified angle</translate>
 
<source lang="lua">
 
<source lang="lua">
 
  Matrix:rotate(angle,x vector,y vector,z vector)
 
  Matrix:rotate(angle,x vector,y vector,z vector)
 
</source>
 
</source>
 
=== Parameters ===
 
=== Parameters ===
'''angle''': (number) angle of rotation in radians <br/>
+
'''angle''': (number) <translate>angle of rotation in radians</translate> <br/>
'''x vector''': (number) x axis vector <br/>
+
'''x vector''': (number) <translate>x axis vector</translate> <br/>
'''y vector''': (number) y axis vector <br/>
+
'''y vector''': (number) <translate>y axis vector</translate> <br/>
'''z vector''': (number) z axis vector <br/>
+
'''z vector''': (number) <translate>z axis vector</translate> <br/>

Revision as of 13:32, 23 August 2018

Available since: Gideros 2016.06

Description

Combine existing rotation with provided. It takes a x,y,z vector and an angle, and rotate the matrix around the given vector by the specified angle

 Matrix:rotate(angle,x vector,y vector,z vector)

Parameters

angle: (number) angle of rotation in radians
x vector: (number) x axis vector
y vector: (number) y axis vector
z vector: (number) z axis vector