Difference between revisions of "Matrix:perspectiveProjection"

From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight")
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
Line 7: Line 7:
 
<syntaxhighlight lang="lua">
 
<syntaxhighlight lang="lua">
 
Matrix:perspectiveProjection(left,right,bottom,top,near,far)
 
Matrix:perspectiveProjection(left,right,bottom,top,near,far)
</source>
+
</syntaxhighlight>
  
 
=== Parameters ===
 
=== Parameters ===
Line 27: Line 27:
 
<syntaxhighlight lang="lua">
 
<syntaxhighlight lang="lua">
 
Matrix:perspectiveProjection(fov,aspect,near,far)
 
Matrix:perspectiveProjection(fov,aspect,near,far)
</source>
+
</syntaxhighlight>
  
 
=== Parameters ===
 
=== Parameters ===

Latest revision as of 14:31, 13 July 2023

Available since: Gideros 2016.06
Class: Matrix

Description

Replaces this matrix by a perspective projection matrix. Suitable for the current 3D engine.

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

Parameters

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
Class: Matrix

Description

Replaces this matrix by a perspective projection matrix. Suitable for the current 3D engine (simplified form).

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

Parameters

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