Does anyone know how to within the engine calculate the extreme X, Y, Z coordinates (min, max X ... min, max Y, etc.)?
I've been looking through the .bsp stuff and would like to know for "minimap" purposes, but alas I don't understand enough to be able to identify how to capture these values.
Calculating the Extreme X, Y, Z of a .bsp?
Yeah like what metlslime said.
setup a mins to be 99999999 (or some ridiculous number to make sure everything is caught)
maxs to be -99999999
if (vert[0] < mins[0]) mins[0] = vert[0];
same for y and z etc... you get the idea
It's like starting off with an inverted box, then pushing it out every time you have a vertex that requires it to grow.
The result should be a bbox for 'worldspawn'
setup a mins to be 99999999 (or some ridiculous number to make sure everything is caught)
maxs to be -99999999
if (vert[0] < mins[0]) mins[0] = vert[0];
same for y and z etc... you get the idea
It's like starting off with an inverted box, then pushing it out every time you have a vertex that requires it to grow.
The result should be a bbox for 'worldspawn'
Benjamin Darling
http://www.bendarling.net/
Reflex - In development competitive arena fps combining modern tech with the speed, precision and freedom of 90's shooters.
http://www.reflexfps.net/
http://www.bendarling.net/
Reflex - In development competitive arena fps combining modern tech with the speed, precision and freedom of 90's shooters.
http://www.reflexfps.net/