Hey Maurizio, I believe you are looking for the code defining an object oriented bounding box. This uses the eigen vectors of a covariance matrix. Alas I cannot provide any sample code.... but this site has been kind enough to give out c code. A port of this math lib would be a great addition to pymel.
http://www.geometrictools.com/LibFoundation/Containment/Containment.html Good to hear from you Marurizio don't be a stranger to SF. Matt On Wed, Mar 24, 2010 at 3:35 PM, Beau Garcia <[email protected]> wrote: > Im not 100% sure this is what your asking, > But If you want to work out the orientation of a object based on the actual > mesh information, rather than its transform. > I guess you could specify 3 vertex ID's which will allow you to calculate > the cross products and derive a orientation that way. > The vertex ID's would have to remain the same for it to work though. > > Beau > > -- > http://groups.google.com/group/python_inside_maya > > To unsubscribe from this group, send email to python_inside_maya+ > unsubscribegooglegroups.com or reply to this email with the words "REMOVE > ME" as the subject. > -- http://groups.google.com/group/python_inside_maya To unsubscribe from this group, send email to python_inside_maya+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
