[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?

I took the route of "vectors stored in one large Numeric.array" and
built a geometry engine using it, which I posted to the Cookbook. See:
http://www.pygame.org/wiki/2DGeometryEngine

There are some bugs I've removed and features I've added to my local
copy of this code, but because the original is 500 lines or so long
and has little to do with pygame, I think the Cookbook may not be the
best place for it.

Ethan

Attachment: signature.asc
Description: OpenPGP digital signature