I'm trying to build render the raw data from a Quake 3 .map file with Java. The .map format stores brush (shape) information as a series of planes, but I'd like to convert them to points of the form (x,y,z). The math involved is a bit beyond me at this point, so does anyone have any advice on how I can do this? I'm fine with using external libraries if need be, but I'd rather use my own code if possible.
Some data to play with:
Dimensions: 64*64*64
Position: All sides are equidistant from the origin (0,0,0)
Shape: Cube
( 64 64 64 ) ( 64 -64 64 ) ( -64 64 64 )
( 64 64 64 ) ( -64 64 64 ) ( 64 64 -64 )
( 64 64 64 ) ( 64 64 -64 ) ( 64 -64 64 )
( -64 -64 -64 ) ( 64 -64 -64 ) ( -64 64 -64 )
( -64 -64 -64 ) ( -64 -64 64 ) ( 64 -64 -64 )
( -64 -64 -64 ) ( -64 64 -64 ) ( -64 -64 64 )
Edit:
This data is showing a cube, which has 6 sides. Each of these six sides can be stored as a plane, with three coordinates to show the position and orientation. Each row of the above data shows one plane, and all 6 of the rows make the 6 planes that make up a cube.
This image helps illustrate my point: Three Points Defining a Plane
Points p1, p2, and p3 are what I'm giving per row, in the above data.
The Quake 3 engine has to sort out what parts of the planes to keep at compile time, but I'm not interested in that at the moment. If you would like more information, feel free to ask!