[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] vector class



DR0ID wrote:

Hi everybody


Some time ago, here on the mailinglist it has been discussed about 2D vector classes and theirs implementations. It turned out, that to make a fast vector class there are some tricks, which where discribed in various emails. Did someone try to put all these optimization into one vector class that would be possibly the fastest?



The other question that I have is: Becaues a vector class is needed for many games and other things too, why not put a fast vector class written in C into the pygame package and wrap it? (perhaps 3D vectors, matrices and quaternions too)

Have a look at euclid: http://partiallydisassembled.net/euclid.html. This is not a C module, but (at last comparison) is as fast as you can get without using an extension. It also contains the vector, matrix and quaternion classes you're looking for.


For a C module, there is cgkit: http://cgkit.sourceforge.net/, but I've never managed to build this successfully so can't comment further.

Alex.