Difference between revisions of "Matrix:perspectiveProjection"
From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>") |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | + | '''Available since:''' Gideros 2016.06<br/> | |
− | ''' | + | '''Class:''' [[Matrix]]<br/> |
− | ''' | + | |
− | === | + | === 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) | |
− | </ | + | </syntaxhighlight> |
− | === | + | |
− | '''left''': (number) | + | === Parameters === |
− | '''right''': (number) | + | '''left''': (number) left plane distance<br/> |
− | '''bottom''': (number) | + | '''right''': (number) right plane distance<br/> |
− | '''top''': (number) | + | '''bottom''': (number) bottom plane distance<br/> |
− | '''near''': (number) | + | '''top''': (number) top plane distance<br/> |
− | '''far''': (number) | + | '''near''': (number) near plane distance<br/> |
+ | '''far''': (number) far plane distance<br/> | ||
+ | |||
+ | |||
+ | ---- | ||
__NOTOC__ | __NOTOC__ | ||
− | + | '''Available since:''' Gideros 2016.06<br/> | |
− | ''' | + | '''Class:''' [[Matrix]]<br/> |
− | ''' | + | |
− | === | + | === 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) | |
− | </ | + | </syntaxhighlight> |
− | === | + | |
− | '''fov''': (number) | + | === Parameters === |
− | '''aspect''': (number) | + | '''fov''': (number) field of view angle<br/> |
− | '''near''': (number) | + | '''aspect''': (number) aspect ratio (width/height)<br/> |
− | '''far''': (number) | + | '''near''': (number) near plane distance<br/> |
+ | '''far''': (number) far plane distance<br/> | ||
{{Matrix}} | {{Matrix}} |
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
- Matrix
- Matrix.fromSRT
- Matrix.new
- Matrix:duplicate
- Matrix:getAnchorPosition
- Matrix:getElements
- Matrix:getM11
- Matrix:getM12
- Matrix:getM21
- Matrix:getM22
- Matrix:getMatrix
- Matrix:getPosition
- Matrix:getRotationX
- Matrix:getRotationY
- Matrix:getRotationZ
- Matrix:getScale
- Matrix:getScaleX
- Matrix:getScaleY
- Matrix:getScaleZ
- Matrix:getTx
- Matrix:getTy
- Matrix:getTz
- Matrix:getX
- Matrix:getY
- Matrix:getZ
- Matrix:invert
- Matrix:multiply
- Matrix:orthographicProjection
- Matrix:perspectiveProjection
- Matrix:rotate
- Matrix:scale
- Matrix:setAnchorPosition
- Matrix:setElements
- Matrix:setM11
- Matrix:setM12
- Matrix:setM21
- Matrix:setM22
- Matrix:setMatrix
- Matrix:setPosition
- Matrix:setRotationX
- Matrix:setRotationY
- Matrix:setRotationZ
- Matrix:setScale
- Matrix:setScaleX
- Matrix:setScaleY
- Matrix:setScaleZ
- Matrix:setTx
- Matrix:setTy
- Matrix:setTz
- Matrix:setX
- Matrix:setY
- Matrix:setZ
- Matrix:transformPoint
- Matrix:translate