void _textureControl_EditableTransformChanged(object sender, EventArgs e) { int currentIndex = _textureControl.selectedTransformIndex; int boneIndex = _editableTransforms[currentIndex].boneIndex; //create new transform... needed edited part, allong with the part that leads up to it from the original parsed file TransformMatrix tm = _textureControl.getEditedTransform() * _editableTransforms[currentIndex].StartingTransform; Transform tfrm = tm.ToTransform(); //remove the old one first if (_bones[boneIndex].hasTransform()) { _bones[boneIndex].removeTransform(); } //add edited _bones[boneIndex].addTransform(tfrm); }
void _textureControl_EditableTransformChanged(object sender, EventArgs e) { if (volNode != null) { volNode.setDoDrawVolume(_textureControl.getDisplayVolumeChecked()); volNode.setOpacity(_textureControl.getOpacity()); volNode.setSliceNum(_textureControl.getNumSlices()); } if (CBenabled) { CBenabled = false; int currentIndex = _textureControl.selectedTransformIndex; int boneIndex = _editableTransforms[currentIndex].boneIndex; //create new transform... needed edited part, allong with the part that leads up to it from the original parsed file TransformMatrix tm = _textureControl.getEditedTransform() * _editableTransforms[currentIndex].StartingTransform; Transform tfrm = tm.ToTransform(); //remove the old one first if (_bones[boneIndex].hasTransform()) { _bones[boneIndex].removeTransform(); } //add edited _bones[boneIndex].addTransform(tfrm); resetCenterball(); //next thing-after each text box thing, create a new centerball, give it the above calculated locaiton for a new center //extract the old quaternions and put them into the new centerball, and apply the change in orientation to the centerball wasRotated(); CBenabled = true; } }