View Full Version : X Y Z
cjwillms
28th April 2004, 11:34 PM
Is there any way to find the dimensions of a generated object useing AC3D in terms of X,Y,Z (using DX's scale)? I find it hard to find these numbers. I have been trying to make a game, but I have to render the image in my DX engine, and move around it to get its size.
Andy
29th April 2004, 09:17 AM
Within AC3D, select the object and read the size from the info. at the top of the control panel.
You can also use this to get distances - select any two vertices and it will show you the distrnce between them.
Andy
conzar
4th June 2007, 02:15 PM
Sorry to bring up such an old post; however, I would like to know if there is a way to get the ACObject's dimensions through the SDK. If so, how do you do this?
Thanks
Andy
5th June 2007, 05:56 AM
Try:
Prototype int ac_object_find_bound(ACObject *ob, Point3 *max, Point3 *min); // returns 0 if no geometry (therefore bb is invalid)
then something like this:
Prototype void find_box_size(Point3 *max, Point3 *min, Point3 *out)
{
Point3 diff = *max;
SUBTRACTPOINTS(min, &diff);
ABSPOINT(&diff);
*out = diff;
}
conzar
5th June 2007, 09:52 PM
Awesome. That worked very well.
Thanks Andy!!!!
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.