Ejemplo n.º 1
0
        internal void sample(Color color)
        {
            ///*
            GeometryModel3D bigCubeModel = GeometryGenerator.CreateCubeModel();

            bigCubeModel.Material = new DiffuseMaterial(new SolidColorBrush(color));

            this.Content = bigCubeModel;

            Transform3DGroup transformGroup = new Transform3DGroup();

            transformGroup.Children.Add(new TranslateTransform3D(0.5 * parent.Children.Count, 0, 0));
            this.Transform = transformGroup;
            //*/
        }
Ejemplo n.º 2
0
        internal void createPlane()
        {
            if (target != null)
            {
                Rect3D          r         = target.Content.Bounds;
                GeometryModel3D cubeModel = GeometryGenerator.CreateCubeModel();
                cubeModel.Material = new DiffuseMaterial(new SolidColorBrush(Colors.Red));

                Transform3DGroup transformGroup = new Transform3DGroup();
                transformGroup.Children.Add(new ScaleTransform3D(r.X, r.Y, 5));
                transformGroup.Children.Add(new TranslateTransform3D(0, 0, 0));
                cubeModel.Transform = transformGroup;

                this.Content = cubeModel;
            }
        }
Ejemplo n.º 3
0
        internal void sample(Material material)
        {
            ///*
            GeometryModel3D bigCubeModel = GeometryGenerator.CreateBraceModel(1);

            bigCubeModel.Material = material;

            this.Content = bigCubeModel;

            //Transform3DGroup transformGroup = new Transform3DGroup();
            //transformGroup.Children.Add(scaleBrace());
            //transformGroup.Children.Add(locateBrace());
            //this.Transform = transformGroup;

            scaleBrace();
            locateBrace();
        }
Ejemplo n.º 4
0
        internal void sample(Color color)
        {
            ///*
            GeometryModel3D bigCubeModel = GeometryGenerator.CreateCubeModel();

            bigCubeModel.Material = MaterialHelper.CreateMaterial(new SolidColorBrush(color));

            this.Content = bigCubeModel;
            Rect3D           r              = this.Parent.Content.Bounds;
            double           min            = Math.Min(r.SizeX, Math.Min(r.SizeY, r.SizeZ));
            Transform3DGroup transformGroup = new Transform3DGroup();

            //transformGroup.Children.Add(new TranslateTransform3D(0.5 * parent.Children.Count, 0, 0));
            //transformGroup.Children.Add(new TranslateTransform3D(new Point3D(r.X, r.Y, r.Z).ToVector3D()));
            //transformGroup.Children.Add(new ScaleTransform3D(new Vector3D(r.SizeY, r.SizeY, r.SizeY), new Point3D(r.X,r.Y,r.Z)));
            transformGroup.Children.Add(new TranslateTransform3D(parent.rootPoint().ToVector3D()));
            transformGroup.Children.Add(new ScaleTransform3D(new Vector3D(min, min, min), parent.rootPoint()));
            this.Transform = transformGroup;
            //*/
        }