LuaSTG-x Core API
math::mat4 Class Reference

Public Member Functions

function __add (local other, local out)
 
function __div (local other)
 
function __eq (local other)
 
function __mul (local other, local out)
 
function __sub (local other, local out)
 
function __tostring ()
 
function __unm ()
 
function add (local other)
 
function clone ()
 
function createBillboard (local objectPosition, local cameraPosition, local cameraUpVector, local cameraForwardVector)
 
function createLookAt (local eye, local target, local up)
 
function createOrthographic (local width, local height, local zNearPlane, local zFarPlane)
 
function createOrthographicOffCenter (local left, local right, local bottom, local top, local zNearPlane, local zFarPlane)
 
function createPerspective (local fovy, local aspect, local n, local f)
 
function createRotationFromAxisAngle (local axis, local angle)
 
function createRotationFromQuaternion (local q)
 
function createRotationX (local angle)
 
function createRotationY (local angle)
 
function createRotationZ (local angle)
 
function createScale (local x, local y, local z)
 
function createTransform (local translation, local scale, local quaternion)
 
function createTranslation (local x, local y, local z)
 
function decompose (local out_scale, local out_rotation, local out_translation)
 
function determinant ()
 
function getBackVector ()
 
function getDownVector ()
 
function getForwardVector ()
 
function getInversed ()
 
function getLeftVector ()
 
function getNegated ()
 
function getRightVector ()
 
function getRotation ()
 
function getScale ()
 
function getScaled (local x, local y, local z)
 
function getTranslated (local x, local y, local z)
 
function getTranslation ()
 
function getTransposed ()
 
function getUpVector ()
 
static function identity ()
 
function inverse ()
 
function multiply (local other)
 
function negate ()
 
static function one ()
 
function rotateByAxisAngle (local axis, local angle)
 
function rotateByQuaternion (local q)
 
function rotateX (local angle)
 
function rotateY (local angle)
 
function scale (local x, local y, local z)
 
function set (local ...)
 
function setIdentity ()
 
function setZero ()
 
function subtract (local other)
 
function transformVector (local x, local y, local z, local w)
 
function translate (local x, local y, local z)
 
function transpose ()
 
static function zero ()
 

Member Function Documentation

◆ __add()

function __add ( local  other,
local  out 
)

◆ __div()

function __div ( local  other)

◆ __eq()

function __eq ( local  other)

◆ __mul()

function __mul ( local  other,
local  out 
)

◆ __sub()

function __sub ( local  other,
local  out 
)

◆ __tostring()

function __tostring ( )

◆ __unm()

function __unm ( )

◆ add()

function add ( local  other)

◆ clone()

function clone ( )

◆ createBillboard()

function createBillboard ( local  objectPosition,
local  cameraPosition,
local  cameraUpVector,
local  cameraForwardVector 
)

createBillboard

Parameters
objectPositionmath.vec3
cameraPositionmath.vec3
cameraUpVectormath.vec3
cameraForwardVectormath.vec3
Returns
math.mat4

◆ createLookAt()

function createLookAt ( local  eye,
local  target,
local  up 
)

createLookAt

Parameters
eyemath.vec3
targetmath.vec3
upmath.vec3
Returns
math.mat4

◆ createOrthographic()

function createOrthographic ( local  width,
local  height,
local  zNearPlane,
local  zFarPlane 
)

createOrthographic

Parameters
widthnumber
heightnumber
zNearPlanenumber
zFarPlanenumber
Returns
math.mat4

◆ createOrthographicOffCenter()

function createOrthographicOffCenter ( local  left,
local  right,
local  bottom,
local  top,
local  zNearPlane,
local  zFarPlane 
)

createOrthographicOffCenter

Parameters
leftnumber
rightnumber
bottomnumber
topnumber
zNearPlanenumber
zFarPlanenumber
Returns
math.mat4

◆ createPerspective()

function createPerspective ( local  fovy,
local  aspect,
local  n,
local  f 
)

createPerspective

Parameters
fovynumber
aspectnumber
nnumber
fnumber
Returns
math.mat4

◆ createRotationFromAxisAngle()

function createRotationFromAxisAngle ( local  axis,
local  angle 
)

◆ createRotationFromQuaternion()

function createRotationFromQuaternion ( local  q)

◆ createRotationX()

function createRotationX ( local  angle)

◆ createRotationY()

function createRotationY ( local  angle)

◆ createRotationZ()

function createRotationZ ( local  angle)

◆ createScale()

function createScale ( local  x,
local  y,
local  z 
)

◆ createTransform()

function createTransform ( local  translation,
local  scale,
local  quaternion 
)

◆ createTranslation()

function createTranslation ( local  x,
local  y,
local  z 
)

◆ decompose()

function decompose ( local  out_scale,
local  out_rotation,
local  out_translation 
)

◆ determinant()

function determinant ( )

◆ getBackVector()

function getBackVector ( )

◆ getDownVector()

function getDownVector ( )

◆ getForwardVector()

function getForwardVector ( )

◆ getInversed()

function getInversed ( )

◆ getLeftVector()

function getLeftVector ( )

◆ getNegated()

function getNegated ( )

◆ getRightVector()

function getRightVector ( )

◆ getRotation()

function getRotation ( )

◆ getScale()

function getScale ( )

◆ getScaled()

function getScaled ( local  x,
local  y,
local  z 
)

◆ getTranslated()

function getTranslated ( local  x,
local  y,
local  z 
)

◆ getTranslation()

function getTranslation ( )

◆ getTransposed()

function getTransposed ( )

◆ getUpVector()

function getUpVector ( )

◆ identity()

static function identity ( )
Returns
math.mat4

◆ inverse()

function inverse ( )

◆ multiply()

function multiply ( local  other)

◆ negate()

function negate ( )

◆ one()

static function one ( )
Returns
math.mat4

◆ rotateByAxisAngle()

function rotateByAxisAngle ( local  axis,
local  angle 
)

◆ rotateByQuaternion()

function rotateByQuaternion ( local  q)

◆ rotateX()

function rotateX ( local  angle)

◆ rotateY()

function rotateY ( local  angle)

◆ scale()

function scale ( local  x,
local  y,
local  z 
)

◆ set()

function set ( local ...  )

◆ setIdentity()

function setIdentity ( )

◆ setZero()

function setZero ( )

◆ subtract()

function subtract ( local  other)

◆ transformVector()

function transformVector ( local  x,
local  y,
local  z,
local  w 
)

◆ translate()

function translate ( local  x,
local  y,
local  z 
)

◆ transpose()

function transpose ( )

◆ zero()

static function zero ( )
Returns
math.mat4

The documentation for this class was generated from the following file: