예제 #1
0
        static CubeBuilder()
        {
            quadMesh = new MeshGeometry3D();
            quadMesh.Positions.Add(new Point3D(-0.5, 0.5, 0));
            quadMesh.Positions.Add(new Point3D(-0.5, -0.5, 0));
            quadMesh.Positions.Add(new Point3D(0.5, -0.5, 0));
            quadMesh.Positions.Add(new Point3D(0.5, 0.5, 0));

            quadMesh.TextureCoordinates.Add(new Point(0, 0));
            quadMesh.TextureCoordinates.Add(new Point(0, 1));
            quadMesh.TextureCoordinates.Add(new Point(1, 1));
            quadMesh.TextureCoordinates.Add(new Point(1, 0));

            quadMesh.Normals.Add(new Vector3D(0, 0, 1));
            quadMesh.Normals.Add(new Vector3D(0, 0, 1));
            quadMesh.Normals.Add(new Vector3D(0, 0, 1));
            quadMesh.Normals.Add(new Vector3D(0, 0, 1));

            quadMesh.TriangleIndices.Add(0);
            quadMesh.TriangleIndices.Add(1);
            quadMesh.TriangleIndices.Add(2);
            quadMesh.TriangleIndices.Add(0);
            quadMesh.TriangleIndices.Add(2);
            quadMesh.TriangleIndices.Add(3);

            visualHostMaterial = new DiffuseMaterial(
                new SolidColorBrush(Colors.White));
            visualHostMaterial.SetValue(
                Viewport2DVisual3D.IsVisualHostMaterialProperty, true);
        }
 /// <summary>
 /// Sets the attached property IsVisualHostMaterial for the given element.
 /// </summary>
 /// <param name="element">The element to which to write the IsVisualHostMaterial attached property.</param>
 /// <param name="value">The value to set</param>
 public static void SetIsVisualHostMaterial(Material element, Boolean value)
 {
     // [BreakingChange] Dev10 TFS Bug #453513
     // We should throw ArgumentNullException if element is null.
     element.SetValue(IsVisualHostMaterialProperty, BooleanBoxes.Box(value));
 }
예제 #3
0
 /// <summary>
 /// Sets the attached property IsVisualHostMaterial for the given element.
 /// </summary>
 /// <param name="element">The element to which to write the IsVisualHostMaterial attached property.</param>
 /// <param name="value">The value to set</param>
 public static void SetIsVisualHostMaterial(Material element, Boolean value)
 {
     // [BreakingChange] Dev10 TFS Bug #453513
     // We should throw ArgumentNullException if element is null.
     element.SetValue(IsVisualHostMaterialProperty, BooleanBoxes.Box(value));
 }
예제 #4
0
 /// <summary>
 /// Sets the attached property IsVisualHostMaterial for the given element.
 /// </summary>
 /// <param name="element">The element to which to write the IsVisualHostMaterial attached property.</param>
 /// <param name="value">The value to set</param>
 public static void SetIsVisualHostMaterial(Material element, Boolean value)
 {
     // We should throw ArgumentNullException if element is null.
     element.SetValue(IsVisualHostMaterialProperty, BooleanBoxes.Box(value));
 }
예제 #5
0
        /// <summary>
        /// Sets the attached property IsVisualHostMaterial for the given element.
        /// </summary>
        /// <param name="element">The element to which to write the IsVisualHostMaterial attached property.</param>
        /// <param name="value">The value to set</param>
        public static void SetIsVisualHostMaterial(Material element, Boolean value)
        {
            // [BreakingChange] Dev10 TFS

            element.SetValue(IsVisualHostMaterialProperty, BooleanBoxes.Box(value));
        }