Create2DSkeleton/AppendBone root problem... 2005-06-14 - By Bradley R. Gabe
Back Hi Raf-
You'll need a more complete answer with regards to chain building, but here's a quickie that helps with zeroing transforms for any X3D object you have a pointer to.
// Create a new SITransformation object var oTrans = XSIMath.CreateTransform();
// Set your X3D object local kinematics to the transform object myObj.kinematics.local.transform = oTrans;
What's nice about this technique is that it's only 2 lines of code, and it's freakin fast! :-) I'll try to work up a more specific example of what you're doing, if someone else doesn't beat me to it.
-Brad
>I'm not sure if there's a better way to do this trhough the object model, >but I am trying to build chains by specifying an array of (x,y,z position >coordinates) and a position for an up vector. > >My procedure involves creating the first bone in the chain using > >1- Create2DSkeleton command to generate the first bone >2- zero out the root to match a null correctly oriented. >3- zero out the first joint. >3- AppendBone to add additional bones. > >Unfortunately, every time I use an AppendBone command, it seem to >re-orient the root and throws off the rotation bone values. > >If anyone has a better procedure for handling chain ganeration, with >zeroing bones ??? > > >THX >RSM > >__ ____ ____ ____ ____ ____ ____ ____ ____ ____ _____ >Raffaele Scaduto-Mendola - www.turbolinea.com > raffaele@(protected) >--- >Unsubscribe? Mail Majordomo@(protected) with the following text in body: >unsubscribe xsi
<html> <body> Hi Raf-<br><br> You'll need a more complete answer with regards to chain building, but here's a quickie that helps with zeroing transforms for any X3D object you have a pointer to.<br><br> <font face="Courier New, Courier" color="#008000">// Create a new SITransformation object<br> </font><font face="Courier New, Courier">var oTrans = XSIMath.CreateTransform();<br><br> </font><font face="Courier New, Courier" color="#008000">// Set your X3D object local kinematics to the transform object<br> </font><font face="Courier New, Courier">myObj.kinematics.local.transform = oTrans;<br><br> <br><br> </font>What's nice about this technique is that it's only 2 lines of code, and it's freakin fast! :-)<br> I'll try to work up a more specific example of what you're doing, if someone else doesn't beat me to it.<br><br> -Brad<br><br> <blockquote type=cite class=cite cite="">I'm not sure if there's a better way to do this trhough the object model, but I am trying to build chains by specifying an array of (x,y,z position coordinates) and a position for an up vector.<br><br> My procedure involves creating the first bone in the chain using<br><br> 1- Create2DSkeleton command to generate the first bone<br> 2- zero out the root to match a null correctly oriented.<br> 3- zero out the first joint.<br> 3- AppendBone to add additional bones.<br><br> Unfortunately, every time I use an AppendBone command, it seem to re-orient the root and throws off the rotation bone values.<br><br> If anyone has a better procedure for handling chain ganeration, with zeroing bones ???<br><br> <br> THX<br> RSM<br><br> __ ____ ____ ____ ____ ____ ____ ____ ____ ____ _____<br> Raffaele Scaduto-Mendola - <a href="http://www.turbolinea.com/" eudora="autourl">www.turbolinea.com</a><br> <x-tab> </x-tab><x-tab> </x-tab><x-tab>   ; </x-tab> raffaele@(protected)<br> ---<br> Unsubscribe? Mail Majordomo@(protected) with the following text in body:<br> unsubscribe xsi<br> </blockquote></body> </html>
|
|