Tag: vec2

Updated the vec3 lib, major overhaul.

Posted by on January 25, 2009

The VEC3 lib was updated today, I haven’t had time to put the newer versions as they were developed so I’m just uploading the latest version right now. A small change-log can be found at the header of the source.

Same link as before: VEC3_MACRO.PBI

Or you can download the package: VEC3_MACRO.ZIP

More…

A fast vector library for purebasic.

Posted by on January 9, 2009

I recently required some vector functions to prototype a game idea in PureBasic, however there is no such thing as a built-in vector library and any of the existent community code was buggy to say the least (no offense but it’s old, ugly code that you’ll find anywhere else).

The reason for this library is quite simple, and so is the library itself. you can either include it or install the resource file and start using it right away. After taking a quick look at the source, you’ll soon familiarize with it’s naming convention; there is no need to write any documentation for this type of code, since it’s basic vector math. However a test source is included for your delight.

You can find the source in here: http://gushh.net/dev/?file=pb/vec3_macro.pbi
And some ugly test code in here: http://gushh.net/dev/?file=pb/vec3_macro_test.pb

Or, you can get “the whole package” from here: http://gushh.net/dls/vec3_macro.zip

Using this library is as easy as…

Define.VEC3 a, b, c
VEC3_SET( a, 0.1, 0.2, 0.3 )
VEC3_SET( b, 0.4, 0.5, 0.6 )
VEC3_ADD( a, b, c )
VEC3_DEBUG3( a, b, c ) ; display the vectors in the debug console.

 
More…