dagor.math
module ‘dagor.math’
Source file: prog/gameLibs/quirrel/bindQuirrelEx/sqratDagorMath.cpp
Usage:
let { Point2, Point3, DPoint3, Point4, TMatrix, Quat, IPoint2, IPoint3, E3DCOLOR, Color3, Color4, matrix_to_euler, euler_to_quat, dir_to_quat, quat_to_euler, quat_to_matrix, quat_rotation_arc, qinterp, cvt, make_tm_quat, make_tm_axis } = require("dagor.math")
or:
from "dagor.math" import *
//'dagor.math' exports:
{
class Point2
class Point3
class DPoint3
class Point4
class TMatrix
class Quat
class IPoint2
class IPoint3
class E3DCOLOR
class Color3
class Color4
function matrix_to_euler(&tm): TMatrix -> integer
function euler_to_quat(&e): integer -> inline Quat
function dir_to_quat(&p): integer -> inline Quat
function quat_to_euler(&quat): Quat -> integer
function quat_to_matrix(&quat): Quat -> inline TMatrix
function quat_rotation_arc()
function qinterp()
function cvt()
function make_tm_quat()
function make_tm_axis()
}
class Point2
- Point2(arg0, arg1)
- Arguments
arg0 (
class_instance or integer_or_float()
) – autodoc from typemask/paramscheckarg1 (
integer_or_float()
) – autodoc from typemask/paramscheck
typecheck mask: any_type, class_instance or integer_or_float, integer_or_float
- var Point2.x
- var Point2.y
- method Point2.lengthSq()
- method Point2.length()
- method Point2.normalize()
- operator Point2._add(arg0, arg1)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheckarg1 (
class_instance()
) – autodoc from typemask/paramscheck
nparamscheck:2
typecheck mask: class_instance, class_instance
- operator Point2._sub(arg0, arg1)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheckarg1 (
class_instance()
) – autodoc from typemask/paramscheck
nparamscheck:2
typecheck mask: class_instance, class_instance
- operator Point2._mul(arg0, arg1)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheckarg1 (
class_instance or integer_or_float()
) – autodoc from typemask/paramscheck
nparamscheck:2
typecheck mask: class_instance, class_instance or integer_or_float
- operator Point2._unm(arg0)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheck
nparamscheck:1
typecheck mask: class_instance
class Point3
- Point3(arg0, arg1, arg2)
- Arguments
arg0 (
class_instance or integer_or_float()
) – autodoc from typemask/paramscheckarg1 (
integer_or_float()
) – autodoc from typemask/paramscheckarg2 (
integer_or_float()
) – autodoc from typemask/paramscheck
typecheck mask: any_type, class_instance or integer_or_float, integer_or_float, integer_or_float
- var Point3.x
- var Point3.y
- var Point3.z
- method Point3.lengthSq()
- method Point3.length()
- method Point3.normalize()
- operator Point3._add(arg0, arg1)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheckarg1 (
class_instance()
) – autodoc from typemask/paramscheck
nparamscheck:2
typecheck mask: class_instance, class_instance
- operator Point3._sub(arg0, arg1)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheckarg1 (
class_instance()
) – autodoc from typemask/paramscheck
nparamscheck:2
typecheck mask: class_instance, class_instance
- operator Point3._mul(arg0, arg1)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheckarg1 (
class_instance or integer_or_float()
) – autodoc from typemask/paramscheck
nparamscheck:2
typecheck mask: class_instance, class_instance or integer_or_float
- operator Point3._modulo(arg0, arg1)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheckarg1 (
class_instance()
) – autodoc from typemask/paramscheck
nparamscheck:2
typecheck mask: class_instance, class_instance
- operator Point3._unm(arg0)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheck
nparamscheck:1
typecheck mask: class_instance
class DPoint3
- DPoint3(arg0, arg1, arg2)
- Arguments
arg0 (
class_instance or integer_or_float()
) – autodoc from typemask/paramscheckarg1 (
integer_or_float()
) – autodoc from typemask/paramscheckarg2 (
integer_or_float()
) – autodoc from typemask/paramscheck
typecheck mask: any_type, class_instance or integer_or_float, integer_or_float, integer_or_float
- var DPoint3.x
- var DPoint3.y
- var DPoint3.z
- method DPoint3.lengthSq()
- method DPoint3.length()
- method DPoint3.normalize()
class Point4
- Point4(arg0, arg1, arg2, arg3)
- Arguments
arg0 (
class_instance or integer_or_float()
) – autodoc from typemask/paramscheckarg1 (
integer_or_float()
) – autodoc from typemask/paramscheckarg2 (
integer_or_float()
) – autodoc from typemask/paramscheckarg3 (
integer_or_float()
) – autodoc from typemask/paramscheck
typecheck mask: any_type, class_instance or integer_or_float, integer_or_float, integer_or_float, integer_or_float
- var Point4.x
- var Point4.y
- var Point4.z
- var Point4.w
- method Point4.lengthSq()
- method Point4.length()
- operator Point4._add(arg0, arg1)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheckarg1 (
class_instance()
) – autodoc from typemask/paramscheck
nparamscheck:2
typecheck mask: class_instance, class_instance
- operator Point4._sub(arg0, arg1)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheckarg1 (
class_instance()
) – autodoc from typemask/paramscheck
nparamscheck:2
typecheck mask: class_instance, class_instance
- operator Point4._mul(arg0, arg1)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheckarg1 (
class_instance or integer_or_float()
) – autodoc from typemask/paramscheck
nparamscheck:2
typecheck mask: class_instance, class_instance or integer_or_float
- operator Point4._modulo(arg0, arg1)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheckarg1 (
class_instance()
) – autodoc from typemask/paramscheck
nparamscheck:2
typecheck mask: class_instance, class_instance
- operator Point4._unm(arg0)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheck
nparamscheck:1
typecheck mask: class_instance
class TMatrix
- TMatrix(arg0)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheck
typecheck mask: any_type, class_instance
- method TMatrix.orthonormalize()
- operator TMatrix._mul(arg0, arg1)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheckarg1 (
class_instance or integer_or_float()
) – autodoc from typemask/paramscheck
nparamscheck:2
typecheck mask: class_instance, class_instance or integer_or_float
- operator TMatrix._add(arg0, arg1)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheckarg1 (
class_instance()
) – autodoc from typemask/paramscheck
nparamscheck:2
typecheck mask: class_instance, class_instance
- operator TMatrix._sub(arg0, arg1)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheckarg1 (
class_instance()
) – autodoc from typemask/paramscheck
nparamscheck:2
typecheck mask: class_instance, class_instance
- operator TMatrix._modulo(arg0, arg1)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheckarg1 (
class_instance()
) – autodoc from typemask/paramscheck
nparamscheck:2
typecheck mask: class_instance, class_instance
- operator TMatrix._set(arg0, arg1, arg2, ...)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheckarg1 (
integer_or_float()
) – autodoc from typemask/paramscheckarg2 (
class_instance or integer_or_float()
) – autodoc from typemask/paramscheck... (
any_type()
) – this function accepts unlimited arguments
nparamscheck:-3
typecheck mask: class_instance, integer_or_float, class_instance or integer_or_float
- method TMatrix.setcol(arg0, arg1, arg2, ...)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheckarg1 (
integer_or_float()
) – autodoc from typemask/paramscheckarg2 (
class_instance or integer_or_float()
) – autodoc from typemask/paramscheck... (
any_type()
) – this function accepts unlimited arguments
nparamscheck:-3
typecheck mask: class_instance, integer_or_float, class_instance or integer_or_float
- operator TMatrix._unm(arg0)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheck
nparamscheck:1
typecheck mask: class_instance
- method TMatrix.inverse()
- operator TMatrix._get(arg0, arg1)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheckarg1 (
any_type()
) – autodoc from typemask/paramscheck
nparamscheck:2
typecheck mask: class_instance
- method TMatrix.getcol(arg0, arg1)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheckarg1 (
any_type()
) – autodoc from typemask/paramscheck
nparamscheck:2
typecheck mask: class_instance
class Quat
- Quat(arg0, arg1, arg2, arg3)
- Arguments
arg0 (
class_instance or integer_or_float()
) – autodoc from typemask/paramscheckarg1 (
integer_or_float()
) – autodoc from typemask/paramscheckarg2 (
integer_or_float()
) – autodoc from typemask/paramscheckarg3 (
integer_or_float()
) – autodoc from typemask/paramscheck
typecheck mask: any_type, class_instance or integer_or_float, integer_or_float, integer_or_float, integer_or_float
- var Quat.x
- var Quat.y
- var Quat.z
- var Quat.w
- operator Quat._mul(arg0, arg1)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheckarg1 (
class_instance()
) – autodoc from typemask/paramscheck
nparamscheck:2
typecheck mask: class_instance, class_instance
- operator Quat._unm(arg0)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheck
nparamscheck:1
typecheck mask: class_instance
- method Quat.normalize()
class IPoint2
- IPoint2(arg0, arg1)
- Arguments
arg0 (
class_instance or integer_or_float()
) – autodoc from typemask/paramscheckarg1 (
integer_or_float()
) – autodoc from typemask/paramscheck
typecheck mask: any_type, class_instance or integer_or_float, integer_or_float
- var IPoint2.x
- var IPoint2.y
- operator IPoint2._add(arg0, arg1)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheckarg1 (
class_instance()
) – autodoc from typemask/paramscheck
nparamscheck:2
typecheck mask: class_instance, class_instance
- operator IPoint2._sub(arg0, arg1)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheckarg1 (
class_instance()
) – autodoc from typemask/paramscheck
nparamscheck:2
typecheck mask: class_instance, class_instance
- operator IPoint2._unm(arg0)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheck
nparamscheck:1
typecheck mask: class_instance
class IPoint3
- IPoint3(arg0, arg1, arg2)
- Arguments
arg0 (
class_instance or integer_or_float()
) – autodoc from typemask/paramscheckarg1 (
integer_or_float()
) – autodoc from typemask/paramscheckarg2 (
integer_or_float()
) – autodoc from typemask/paramscheck
typecheck mask: any_type, class_instance or integer_or_float, integer_or_float, integer_or_float
- var IPoint3.x
- var IPoint3.y
- var IPoint3.z
- operator IPoint3._add(arg0, arg1)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheckarg1 (
class_instance()
) – autodoc from typemask/paramscheck
nparamscheck:2
typecheck mask: class_instance, class_instance
- operator IPoint3._sub(arg0, arg1)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheckarg1 (
class_instance()
) – autodoc from typemask/paramscheck
nparamscheck:2
typecheck mask: class_instance, class_instance
- operator IPoint3._unm(arg0)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheck
nparamscheck:1
typecheck mask: class_instance
class E3DCOLOR
- E3DCOLOR(arg0, arg1, arg2, arg3)
- Arguments
arg0 (
class_instance or integer_or_float()
) – autodoc from typemask/paramscheckarg1 (
integer_or_float()
) – autodoc from typemask/paramscheckarg2 (
integer_or_float()
) – autodoc from typemask/paramscheckarg3 (
integer_or_float()
) – autodoc from typemask/paramscheck
typecheck mask: any_type, class_instance or integer_or_float, integer_or_float, integer_or_float, integer_or_float
- var E3DCOLOR.r
- var E3DCOLOR.g
- var E3DCOLOR.b
- var E3DCOLOR.a
- var E3DCOLOR.u
class Color3
- Color3(arg0, arg1, arg2, arg3)
- Arguments
arg0 (
class_instance or integer_or_float()
) – autodoc from typemask/paramscheckarg1 (
integer_or_float()
) – autodoc from typemask/paramscheckarg2 (
integer_or_float()
) – autodoc from typemask/paramscheckarg3 (
integer_or_float()
) – autodoc from typemask/paramscheck
typecheck mask: any_type, class_instance or integer_or_float, integer_or_float, integer_or_float, integer_or_float
- var Color3.r
- var Color3.g
- var Color3.b
- operator Color3._add(arg0, arg1)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheckarg1 (
class_instance()
) – autodoc from typemask/paramscheck
nparamscheck:2
typecheck mask: class_instance, class_instance
- operator Color3._sub(arg0, arg1)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheckarg1 (
class_instance()
) – autodoc from typemask/paramscheck
nparamscheck:2
typecheck mask: class_instance, class_instance
- operator Color3._mul(arg0, arg1)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheckarg1 (
class_instance or integer_or_float()
) – autodoc from typemask/paramscheck
nparamscheck:2
typecheck mask: class_instance, class_instance or integer_or_float
- method Color3.set(arg0, arg1, arg2)
- Arguments
arg0 (
integer_or_float()
) – autodoc from typemask/paramscheckarg1 (
integer_or_float()
) – autodoc from typemask/paramscheckarg2 (
integer_or_float()
) – autodoc from typemask/paramscheck
nparamscheck:3
typecheck mask: integer_or_float, integer_or_float, integer_or_float
class Color4
- Color4(arg0, arg1, arg2, arg3)
- Arguments
arg0 (
class_instance or integer_or_float()
) – autodoc from typemask/paramscheckarg1 (
integer_or_float()
) – autodoc from typemask/paramscheckarg2 (
integer_or_float()
) – autodoc from typemask/paramscheckarg3 (
integer_or_float()
) – autodoc from typemask/paramscheck
typecheck mask: any_type, class_instance or integer_or_float, integer_or_float, integer_or_float, integer_or_float
- var Color4.r
- var Color4.g
- var Color4.b
- var Color4.a
- operator Color4._add(arg0, arg1)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheckarg1 (
class_instance()
) – autodoc from typemask/paramscheck
nparamscheck:2
typecheck mask: class_instance, class_instance
- operator Color4._sub(arg0, arg1)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheckarg1 (
class_instance()
) – autodoc from typemask/paramscheck
nparamscheck:2
typecheck mask: class_instance, class_instance
- operator Color4._mul(arg0, arg1)
- Arguments
arg0 (
class_instance()
) – autodoc from typemask/paramscheckarg1 (
class_instance or integer_or_float()
) – autodoc from typemask/paramscheck
nparamscheck:2
typecheck mask: class_instance, class_instance or integer_or_float
- method Color4.set(arg0, arg1, arg2, arg3)
- Arguments
arg0 (
integer_or_float()
) – autodoc from typemask/paramscheckarg1 (
integer_or_float()
) – autodoc from typemask/paramscheckarg2 (
integer_or_float()
) – autodoc from typemask/paramscheckarg3 (
integer_or_float()
) – autodoc from typemask/paramscheck
nparamscheck:4
typecheck mask: integer_or_float, integer_or_float, integer_or_float, integer_or_float
- function euler_to_quat(&e)
- Arguments
&e (
integer()
) –
- Returns
inline Quat
- function dir_to_quat(&p)
- Arguments
&p (
integer()
) –
- Returns
inline Quat
- function quat_rotation_arc()
- function qinterp()
- function cvt()
- function make_tm_quat()
- function make_tm_axis()