Half extents of a cube scene node or AABB

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

Half extents of a cube scene node or AABB

Post by 3DModelerMan »

I'm working on my Havok integration, and I need to be able to match the sizes of boxes exactly. How can I get the half extents, and convex size of an Irrlicht cube scene node? And for automatically matching spheres, would it work to get the AABB of the sphere node, then divide the height of the sphere's AABB by 2 to use as the radius for the havok sphere?
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Re: Half extents of a cube scene node or AABB

Post by vitek »

3DModelerMan wrote:How can I get the half extents, and convex size of an Irrlicht cube scene node?
Why can't you use the scene node's object space bounding box? That box should completely and exactly enclose the box. If you want the half extents, you get the extents and divide by two. I have no idea what you mean by 'convex size' though.
3DModelerMan wrote:And for automatically matching spheres, would it work to get the AABB of the sphere node, then divide the height of the sphere's AABB by 2 to use as the radius for the havok sphere?
Yes, that would work.
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

Post by 3DModelerMan »

Okay, the convex size was what got confusing, but If I just build it with the half extents it should be fine.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
Post Reply