Difference between revisions of "Matrix:perspectiveProjection"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2016.06<br/> === Description === replace this matrix by a perspective projection matrix suitable for the current 3D engine <source lan...")
 
Line 4: Line 4:
 
replace this matrix by a perspective projection matrix suitable for the current 3D engine
 
replace this matrix by a perspective projection matrix suitable for the current 3D engine
 
<source lang="lua">
 
<source lang="lua">
= Matrix:perspectiveProjection(leftrightbottomtopnearfar,)
+
Matrix:perspectiveProjection(left,right,bottom,top,near,far)
 
</source>
 
</source>
'''left:''' (number) left plane distance ''''''<br/>
+
'''left''': (number) left plane distance ''''''<br/>
'''right:''' (number) right plane distance ''''''<br/>
+
'''right''': (number) right plane distance ''''''<br/>
'''bottom:''' (number) bottom plane distance ''''''<br/>
+
'''bottom''': (number) bottom plane distance ''''''<br/>
'''top:''' (number) top plane distance ''''''<br/>
+
'''top''': (number) top plane distance ''''''<br/>
'''near:''' (number) near plane distance ''''''<br/>
+
'''near''': (number) near plane distance ''''''<br/>
'''far:''' (number) far plane distance ''''''<br/>
+
'''far''': (number) far plane distance ''''''<br/>
 
__NOTOC__
 
__NOTOC__
 
'''Available since:''' Gideros 2016.06<br/>
 
'''Available since:''' Gideros 2016.06<br/>
Line 17: Line 17:
 
replace this matrix by a perspective projection matrix suitable for this 3D engine (simplified form)
 
replace this matrix by a perspective projection matrix suitable for this 3D engine (simplified form)
 
<source lang="lua">
 
<source lang="lua">
= Matrix:perspectiveProjection(fovaspectnearfar,)
+
Matrix:perspectiveProjection(fov,aspect,near,far)
 
</source>
 
</source>
'''fov:''' (number) field of view angle ''''''<br/>
+
'''fov''': (number) field of view angle ''''''<br/>
'''aspect:''' (number) aspect ratio (width/height) ''''''<br/>
+
'''aspect''': (number) aspect ratio (width/height) ''''''<br/>
'''near:''' (number) near plane distance ''''''<br/>
+
'''near''': (number) near plane distance ''''''<br/>
'''far:''' (number) far plane distance ''''''<br/>
+
'''far''': (number) far plane distance ''''''<br/>

Revision as of 11:16, 23 August 2018

Available since: Gideros 2016.06

Description

replace this matrix by a perspective projection matrix suitable for the current 3D engine

 Matrix:perspectiveProjection(left,right,bottom,top,near,far)

'left: (number) left plane distance '
'right: (number) right plane distance '
'bottom: (number) bottom plane distance '
'top: (number) top plane distance '
'near: (number) near plane distance '
'far: (number) far plane distance '

Available since: Gideros 2016.06

Description

replace this matrix by a perspective projection matrix suitable for this 3D engine (simplified form)

 Matrix:perspectiveProjection(fov,aspect,near,far)

'fov: (number) field of view angle '
'aspect: (number) aspect ratio (width/height) '
'near: (number) near plane distance '
'far: (number) far plane distance '