Primitives package

There has been some murmuring in the forums of greating a package of geometry primitives and some efforts were started.

I have gathered many of the known, BSD licensed xith3d primitive code and arranged it into the one package (org.xith3d.geometry).

This code is maintained in the xith-tk CVS, the new (rebourn) standardised location for third party BSD licensed Xith3D tools. Developer access to the CVS is granted on request. If you would like to add new primitive types, please apply.

Currently it contains the following classes:
Cone
Cube
Cylinder
Disk
Ellipsoid
GeoEllipsoid
GeoSphere
Quad
Rectangle
Ring
SkyBox
Sphere
Torus

Code is here
Javadocs are here

Current contributing authors are:
Daniel Herring (largest contribution)
Yuri Vl. Gushchin
William Denniss
Abdul Bezrati (Java Cool Dude)

A new demo org.xith3d.test.Xith3DGeomTest was added (note this is in the xith-tk package).

Screenshots:

http://xith.org/tutes/filestore/screenshot_2004-12-09-113404.png

http://xith.org/tutes/filestore/screenshot_2004-12-09-113347.png

Useful Command parameters:
-DXITHDEMO_LWJGL=true to use LWJGL renderer (This can be used on any demo which extends my new Xith3DTestCanvas)
-DXITH3D_ENABLE_WIREFRAME_MODE=true for wireframe mode

Will.

I thought I would add that Daniel Herring really did a good job on his primitives – they are very customisable. You can set exactly how many segments you want, and therefore control the complexity (i.e. number of triangles) of the objects.

Using the GeometricMath class you can also apply a lot of transformations to the geometry data itself (this is useful not just for the primitives – for example, you could create a squashed version of a character in the game).

Anyone currently using the sphere generation method in TestUtils in their projects should probably look at the GeomSphere method. GeomSpheres are of course much lower poly but still look good.

Will.