Skip to main content
GameDev.net gamedev.net
🔒 Locked

Lua 5.0.2 math libraries

Started by raydog Mar 12, 2005 at 2:17 PM 1 replies 1k views
Original Post
raydog
raydog
Where can I find a 3D math library (vectors, matrices) for Lua 5.0.2? Something that is written in C, and accessible in a Lua script. I tried creating one with tolua, but a lot of operators I want to overload make tolua choke with errors.
Rob Loach
Rob Loach
Have you successfully binded your own C functions? If so then you could just create your own.
Rob Loach [Website] [Projects] [
raydog
raydog
Tolua allows these:
tolua automatically binds the following binary operators: +   -   *   / <   >  <=  >=



C/C++ allows these:
You can overload the following operators: +	-	*	/	%	^ !	=	<	>	+=	-= ^=	&=	|=	<<	>>	<<= <=	>=	&&	||	++	-- ()	[]	new	delete	&	| ~	*=	/=	%=	>>=	== !=	,	->	->* You cannot overload any preprocessor symbol:#	#@	##nor can you overload the following operators:.	.*	::	?:



Abviously, some operators conflict with Lua keywords, like -- for Lua comments.
I was just wondering if the remaining operators are not available due to some
technical/conflict reason also?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.