• Create Account

### #Actualultramailman

Posted 19 April 2013 - 02:15 AM

Maybe it will help you to know how Bullet deals with the problem.
The box itself only has "half-dimensions" and is always origin-centered. Somithing like

struct AABB {
int hwidth, hheight;
}; 

This box is used to create rigid bodies, which provide a transform. In line of concept, it's like
AABB box(2, 3);
int pos[2] = {52, 37};
CollisionBody *cb = NewCollisionBody(box, pos);


I'm omitting rotations to make this super-extra-easy to understand.
I hope this will help you in taking a decision.

Wow, another way to represent AABB. Thanks for sharing.

Is the AABB also separated into "position" and "description" inside the CollisionBody object, or are they only used as parameters for the object creation?

### #1ultramailman

Posted 19 April 2013 - 02:13 AM

Maybe it will help you to know how Bullet deals with the problem.
The box itself only has "half-dimensions" and is always origin-centered. Somithing like

struct AABB {
int hwidth, hheight;
}; 

This box is used to create rigid bodies, which provide a transform. In line of concept, it's like
AABB box(2, 3);
int pos[2] = {52, 37};
CollisionBody *cb = NewCollisionBody(box, pos);


I'm omitting rotations to make this super-extra-easy to understand.
I hope this will help you in taking a decision.

Wow, another way to represent AABB. Thanks for sharing.

Is the AABB also separated into "position" and "description" inside the CollisionBody object?

PARTNERS