download the source
If you need to hack together a small 3D application, you may find that the code for sceneEditor can serve as a useful start. In its current form, it has support for a camera and a scene of objects, each of which is an arbitrary triangle mesh. The code has support for multiple selection of objects, and also implements a basic 3D widget "manipulator" that can be used to translate, rotate, or scale objects. The code does not, however, support many other basic features of a 3D modelling system, such as file i/o. In total, there are currently about 4700 lines of code.
gzip -d sceneEditor.tar.gz tar -xf sceneEditor.tar cd sceneEditor ln -s Makefile.linux Makefile makeIf it won't compile, you might have to fix up the
Makefile
.
If you're trying to compile it on a DGP machine at the
University of Toronto, try changing the LIBS
line in the
Makefile
to one of
LIBS=-lglut -lMesaGLU -lMesaGL -lm -L/usr/X11R6/lib -lXi -lXmuor
LIBS=-lglut -lGLU -lGL -lm -L/usr/X11R6/lib -lXi -lXmu
Once things have compiled,
read the README
file,
and then run it with
./sceneEditor
A brush stroke sculpting a mesh. The brush, which has a gaussian shape, is seen in red. |
A 3D widget used to translate/rotate/scale a cube. Grey axes show the cube's local space. |
download the source