DI-Guy Lua AI SDK
 All Classes Files Functions Variables Groups Pages
vec3.lua File Reference

Functions

function Vec3 new (x, y, z)
 
Meta table functions, (ie operator overloads)
function Vec3_mt __add (op1, op2)
 
function Vec3_mt __sub (op1, op2)
 
function Vec3_mt __tostring (obj)
 
function Vec3_mt __unm (p)
 
function Vec3_mt __mul (s, p)
 
function Vec3_mt __div (p, s)
 
function Vec3_mt __pow (p1, p2)
 
function Vec3 cross (p2)
 
function Vec3 length ()
 
function Vec3 length2 ()
 
function Vec3 dot (v)
 
function Vec3 normalize (p)
 
function Vec3 tostring ()
 
function Vec3 tostringrep ()
 
function Vec3 fromstringrep (stringrep)
 
function Vec3 distance (op1, op2)
 
function Vec3 unpack ()
 
function Vec3 rotate_z (ang_rad)
 
function Vec3 rotate_z_cs (cos_ang, sin_ang)
 

Variables

 Vec3 = {}
 A class for doing basic 3d math in lua. More...
 
 Vec3_mt = { __index = Vec3 }
 
double x
 
double y
 
double z
 

Function Documentation

function Vec3_mt __add ( op1  ,
op2   
)
function Vec3_mt __div ( ,
s   
)
function Vec3_mt __mul ( s  ,
 
)
function Vec3_mt __pow ( p1  ,
p2   
)
function Vec3_mt __sub ( op1  ,
op2   
)
function Vec3_mt __tostring ( obj  )
function Vec3_mt __unm ( )
function Vec3 cross ( p2  )
function Vec3 distance ( op1  ,
op2   
)
function Vec3 dot ( v  )
function Vec3 fromstringrep ( stringrep  )
function Vec3 length ( )
function Vec3 length2 ( )
function Vec3 new ( x  ,
y  ,
z   
)
function Vec3 normalize ( )
function Vec3 rotate_z ( ang_rad  )
function Vec3 rotate_z_cs ( cos_ang  ,
sin_ang   
)
function Vec3 tostring ( )
function Vec3 tostringrep ( )
function Vec3 unpack ( )

Variable Documentation

Vec3 = {}

A class for doing basic 3d math in lua.

Vec3_mt = { __index = Vec3 }
double x
double y
double z