Go Back   AC3D Forums > Technical > AC3D Developers
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 28th April 2004, 10:34 PM   #1
cjwillms
Junior Member
Junior member
 
Join Date: Apr 2004
Posts: 3
Default X Y Z

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.
cjwillms is offline   Reply With Quote
Old 29th April 2004, 08:17 AM   #2
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,366
Default Re: X Y Z

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
Andy is offline   Reply With Quote
Old 4th June 2007, 01:15 PM   #3
conzar
Member
Advanced member
 
conzar's Avatar
 
Join Date: May 2006
Posts: 36
Default Re: X Y Z

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
conzar is offline   Reply With Quote
Old 5th June 2007, 04:56 AM   #4
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,366
Default Re: X Y Z

Try:

Code:
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:

Code:
 
Prototype void find_box_size(Point3 *max, Point3 *min, Point3 *out)
{
Point3 diff = *max;
 
SUBTRACTPOINTS(min, &diff);
ABSPOINT(&diff);
*out = diff;
}
Andy is offline   Reply With Quote
Old 5th June 2007, 08:52 PM   #5
conzar
Member
Advanced member
 
conzar's Avatar
 
Join Date: May 2006
Posts: 36
Default Re: X Y Z

Awesome. That worked very well.

Thanks Andy!!!!
conzar is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 07:00 AM.


AC3D Forum
(C) Inivis Limited 2020