Difference between revisions of "Matrix:perspectiveProjection"

From GiderosMobile
(remove language stuff)
m (Text replacement - "<source" to "<syntaxhighlight")
Line 5: Line 5:
 
=== Description ===
 
=== Description ===
 
Replaces this matrix by a perspective projection matrix. Suitable for the current 3D engine.
 
Replaces this matrix by a perspective projection matrix. Suitable for the current 3D engine.
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
Matrix:perspectiveProjection(left,right,bottom,top,near,far)
 
Matrix:perspectiveProjection(left,right,bottom,top,near,far)
 
</source>
 
</source>
Line 25: Line 25:
 
=== Description ===
 
=== Description ===
 
Replaces this matrix by a perspective projection matrix. Suitable for the current 3D engine (simplified form).
 
Replaces this matrix by a perspective projection matrix. Suitable for the current 3D engine (simplified form).
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
Matrix:perspectiveProjection(fov,aspect,near,far)
 
Matrix:perspectiveProjection(fov,aspect,near,far)
 
</source>
 
</source>

Revision as of 15:28, 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. <syntaxhighlight lang="lua"> Matrix:perspectiveProjection(left,right,bottom,top,near,far) </source>

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). <syntaxhighlight lang="lua"> Matrix:perspectiveProjection(fov,aspect,near,far) </source>

Parameters

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