views:

297

answers:

3

I want to create a very basic 3D modeling tool. The application is supposed to be windowed and will need to respond to mouse click and drag events in the 3D viewport.

I've decided on wxPython for the actual window since I'm fairly familiar with it already. However, I need to produce an OpenGL viewport that can respond to the various mouse events. It wouldn't hurt to have some convenience math in place for converting the 2D mouse positions in "camera space" into world space coordinates to make selection tasks easier.

I'm looking for recommendations on which modules I should be looking at.

+1  A: 

I'm not aware of any boxed up modules which provide that functionality, but you can take some inspiration from Blender 3D, which has all of the features you described: its a 3D modeling tool, its written in Python, has an OpenGL viewport which responds to mouse events, and its open source.

You can probably take inspiration from Blender and apply it your own projects.

Juliet
Blender is such a large project, I'd imagine they probably developed their own internal libraries, something I don't want to rely on.
Soviut
+3  A: 

Any reason you wouldn't use wx's GLCanvas? Here's an example that draws a sphere.

llimllib
+2  A: 

As a very basic 3D modelling tool I'd recommend VPython.

J.F. Sebastian
The integration into wxPython is what made me choose the other answer. VPython looks compelling though, especially since it has built in mouse support and convenience functions for translation mouse-space coordinates to 3d world space.
Soviut