Jimmy Chan wrote:

>  - I plan to add a hook for drawing the object.  Any recommendations
> for how to best incorporate this with pyglet (i.e. draw will draw to a
> pyglet window).  My only thought is to put the glBegin glEnd block in
> the draw function and try to leave it general.

It's probably best to leave it to the user to make any
OpenGL calls, including glBegin/glEnd, since he might want
to use more than one begin/end pair in the drawing of his
object, or he may not want to use them at all and use
something else such as vertex lists, display lists or
VBOs.

> I'm leaning toward just
> importing numpy.   Is this overkill or is this common?

It's probably not overkill. You definitely want some
fast way of doing coordinate transformations, and
numpy is excellent for this sort of thing.

And once you've got it, you tend to find other uses for
it as well. E.g. once I figured out a way of using it to do
hit testing between a ray and a triangle mesh of any size,
using only a dozen or so Python-level operations.

-- 
Greg

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to