[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Vectors
- From: Waldemar Celes <celes@...>
- Date: Mon, 22 Jun 1998 15:32:01 -0300
> Hi I'm attempting to add a 3D vector class to Lua and I wondered if anyone
> had any thoughts on the matter. What would be the most efficient manner?
> (ie. fastest). Can I use tags to overload the arithmetic operators. eg.
> vec3= vec1 + vec2 ?
>
> Be something like: struct _vector3 { float x,y,z; };
I would sugest you to write in C and then
bind the class and its methods to Lua.
"toLua" may help you on it
(http://www.tecgraf.puc-rio.br/~celes/tolua/tolua.html).
-- waldemar