Esempio n. 1
0
        private static Model3D CreateCube(double x, double z, int scaleOfheight, Brush brush)
        {
            var perfectCube = BuildingFactory.CreateCube(brush);

            var transformGroup          = new Transform3DGroup();
            var verticalTransformOffset = scaleOfheight / 2d;

            transformGroup.Children.Add(new ScaleTransform3D(1, scaleOfheight, 1));
            transformGroup.Children.Add(new TranslateTransform3D(x, verticalTransformOffset, z));

            perfectCube.Transform = transformGroup;
            return(perfectCube);
        }