private void moveBox(int index, ref FEIT3DCubeBox box, Vector3D vec) { TranslateTransform3D trans = new TranslateTransform3D(vec); mBoxesGear.AddTransform(index, trans); for (int i = 0; i < 6; i++) { box.mModels[i].Transform = mBoxesGear.GetTransform(index); } }
public void rotateBox(int index, Vector3D vec, double angle) { AxisAngleRotation3D rotation = new AxisAngleRotation3D(); rotation.Axis = vec; rotation.Angle = angle; RotateTransform3D trans = new RotateTransform3D(); trans.Rotation = rotation; mBoxesGear.AddTransform(index, trans); for (int i = 0; i < 6; i++) { mBoxesGear.Boxes[index].mModels[i].Transform = mBoxesGear.GetTransform(index); } }