Hello,
I have a problem that I doesn't understand.. I'm trying to calculate an Oriented Bounding Box from a Object. when I've calculated the parameters for the oriented bounding box (orientation and dimension), i Transform the Object. for Example.
btQuaternion MyQuat;
btVector3* myPos;
btVector3* myDimension;
btTransform T;
T.setIdentity();
T.setOrigin(Mypos)
T.setRotation(Myquat);
btBoxShape* OrientedBox=new btBoxShape(myDimension)
this->setWorldTransform(T);//my class is a derivate of a btCollision Object..
Now.. I'm trying to get my bounding volume Bounding Points... (for example vertices or edge).
If I make...
btBoxshape->getEdge or getVertex... I obtain the object centred in the origin and without any transformation... it's normal? I've already used btConvexHullShape and the vertex were in transformed positions.
If that is normal... how I can find the right positions? and if I use btCompoundShape... How I can find the transformed position of the objects?
thank you so much...
Shape and Object Transforms
-
Erwin Coumans
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Shape and Object Transforms
Try multiplying with the world transform of the object.
Thanks,
Erwin
Thanks,
Erwin
-
aleradish
- Posts: 22
- Joined: Thu Mar 05, 2009 9:41 pm
Re: Shape and Object Transforms
Yes, I'm trying to make exactly like that... to resolve... but sorry but I don't understand these things...
when I build a shape... like a btBoxShape..for example, and I transform the object btTransform T. Am I transforming the object but the shape is in the same position? Are these things indipendent one from the other?
And if I use the compoundShape how can I know the real position of each child in the btTransformed object? Have I to multiply the Transform of Object and the transform of each child?
thank you so much for your precious help.
when I build a shape... like a btBoxShape..for example, and I transform the object btTransform T. Am I transforming the object but the shape is in the same position? Are these things indipendent one from the other?
And if I use the compoundShape how can I know the real position of each child in the btTransformed object? Have I to multiply the Transform of Object and the transform of each child?
thank you so much for your precious help.