| jase439 | posted: Sun Aug 14, 2005 8:19 am | |
Member since: 2005-03-16 Posts: 93
| What is the relationship between these two transform lists? These structures seem to be modified in parallel with each other (i.e. such as in the RemoveBone code). If I want to procedurally reposition a bone from the GMDC plugin, which data structures should I care about? Sorry for the n00b question here - I'm still trying to wrap my head around all the data structures and the object model for this plugin. |
| quaxi | posted: Sun Aug 14, 2005 8:53 pm | |
Member since: 2006-04-28 Posts: 3154
| joints[i].AssignedTransformNode:
Returns the TransformNode Object that describes the Initial Position of the Joint in Question (can be null if none was found). This Position is relative to the Parent of the Joint.
model.Transformations[i]:
Contain the absolute Position of the Joint in the Scene (not relative to the Parent) |
| jase439 | posted: Mon Aug 15, 2005 3:33 am | |
Member since: 2005-03-16 Posts: 93
| Thanks, Quaxi.
Are the values stored in model.Transformations[i] stored/read in directly from the GMDC, or are they dynamically calculated at runtime using the CRES TransformNode by applying each transform in the heirarchy to calculate the absolute joint position?
Perhaps the better question: If I want to alter the initial position of a bone, is it sufficient to alter model.Transformations[i] or should I be editing joints[i].AssignedTransformNode? I've tried changing the latter, but joints[i] seems to be a copy of the CRES data - and not the CRES data itself. These values do not appear to be persistent. Editing model.Transformations[i] gives me the persistent visual results I want, but I'm not sure what the ramifications are of having this data "out of sync" with what's represented in the CRES Transform Nodes.
EDIT: Well, from the looks of it, it looks like TransformNode::GetEffectiveTransformation is called on import and in response to the user clicking on Rebuild. Looks like you have an option to propogate changes to the CRES if you go through the built-in Import/Export functions. Seems like it would be easy enough to get at the CRES node via joints[i].AssignedTransformNode.GetFirstParent() but it still begs the question: Are there any ill side-effects of not updating the CRES TransformNodes and just updating the GMDC? |
| jase439 | posted: Sun Aug 21, 2005 2:30 am | |
Member since: 2005-03-16 Posts: 93
| Well, I haven't observed any visible problems with adjusting only the GMDC transforms. So I guess I'll go with it and just leave the CRES alone. |
| quaxi | posted: Sun Aug 21, 2005 2:59 pm | |
Member since: 2006-04-28 Posts: 3154
| As far as my (and Emily's) experiments with CRES go, we would say, that the Models Section is only used for the Preview (the Time when you select the Object from the catalog until you place it), as this Model seems to be built without Bones, so it needs absolute Transformations for the Vertices.
As soon as you place an Object in the Scene, a new Version, including the bines get generated. The Bone definition is then read from the CRES (where ralative transformations are stored). So If you do only update the Model Transformations in the GMDC, the Object should look displaced when put int the scene. |
viewthread, 0, 0, jointsiAssignedTransformNode-vs-modelTransformationsi