I am trying to create a rendering of raw data from a Quake 3..map file using Java. The .map format stores information about the brush (shape) as a series of planes, but I would like to convert them to points of the shape (x, y, z). In this regard, math is a little taller than me, just as anyone has tips on how I can do this? I am fine using external libraries if necessary, but I would rather use my own code if possible.
Some data to play:
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 shows a cube that has 6 sides. Each of these six sides can be saved as a plane, with three coordinates to show position and orientation. Each row of the above data shows one plane, and all 6 lines form 6 planes that make up the cube.
This image helps illustrate my point: Three points defining a plane
The points p1, p2 and p3 are what I give in the line in the above data.
The Quake 3 engine needs to figure out which parts of the aircraft to keep during compilation, but at the moment I'm not interested. If you need more information, feel free to ask!
Fiarr source
share