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 AddBox(ref FEIT3DCubeBox box, int index) { //six surfaces //eight boxes mBoxesGear.AddBox(index, ref box); for (int i = 0; i < 6; i++) { mGroup.Children.Add(box.mModels[i]); } placeBox(ref box, index); }
private void placeBox(ref FEIT3DCubeBox box, int index) { switch (index) { case 0: moveBox(index, ref box, new Vector3D(1, 1, 1)); break; case 1: moveBox(index, ref box, new Vector3D(-1, 1, 1)); break; case 2: moveBox(index, ref box, new Vector3D(-1, 1, -1)); break; case 3: moveBox(index, ref box, new Vector3D(1, 1, -1)); break; case 4: moveBox(index, ref box, new Vector3D(1, -1, 1)); break; case 5: moveBox(index, ref box, new Vector3D(-1, -1, 1)); break; case 6: moveBox(index, ref box, new Vector3D(-1, -1, -1)); break; case 7: moveBox(index, ref box, new Vector3D(1, -1, -1)); break; } }
public void AddBox(int index, ref FEIT3DCubeBox box) { Boxes.Add(index, box); Transforms.Add(index, new Transform3DGroup()); }