Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.GaussianProcessTuning/ILNumerics.2.14.4735.573/Drawing/Shapes/ILLitTriangles.cs @ 9426

Last change on this file since 9426 was 9102, checked in by gkronber, 12 years ago

#1967: ILNumerics source for experimentation

File size: 6.8 KB
Line 
1///
2///    This file is part of ILNumerics Community Edition.
3///
4///    ILNumerics Community Edition - high performance computing for applications.
5///    Copyright (C) 2006 - 2012 Haymo Kutschbach, http://ilnumerics.net
6///
7///    ILNumerics Community Edition is free software: you can redistribute it and/or modify
8///    it under the terms of the GNU General Public License version 3 as published by
9///    the Free Software Foundation.
10///
11///    ILNumerics Community Edition is distributed in the hope that it will be useful,
12///    but WITHOUT ANY WARRANTY; without even the implied warranty of
13///    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14///    GNU General Public License for more details.
15///
16///    You should have received a copy of the GNU General Public License
17///    along with ILNumerics Community Edition. See the file License.txt in the root
18///    of your distribution package. If not, see <http://www.gnu.org/licenses/>.
19///
20///    In addition this software uses the following components and/or licenses:
21///
22///    =================================================================================
23///    The Open Toolkit Library License
24///   
25///    Copyright (c) 2006 - 2009 the Open Toolkit library.
26///   
27///    Permission is hereby granted, free of charge, to any person obtaining a copy
28///    of this software and associated documentation files (the "Software"), to deal
29///    in the Software without restriction, including without limitation the rights to
30///    use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
31///    the Software, and to permit persons to whom the Software is furnished to do
32///    so, subject to the following conditions:
33///
34///    The above copyright notice and this permission notice shall be included in all
35///    copies or substantial portions of the Software.
36///
37///    =================================================================================
38///   
39
40using System.Drawing;
41
42
43namespace ILNumerics.Drawing.Shapes {
44   
45    public class ILLitTriangles
46        : ILLitCompositeShape<C4fN3fV3f> {
47
48        #region constructors
49        /// <summary>
50        /// create lit triangles
51        /// </summary>
52        /// <param name="panel">hosting panel</param>
53        /// <param name="numVertices">number of vertices to create. Vertex data must be defined afterwards.</param>
54        public ILLitTriangles (ILPanel panel, int numVertices)
55            : base (panel, numVertices, 3) {
56            m_fillColor = Color.Yellow;
57        }
58        ///// <summary>
59        ///// create lit triangles
60        ///// </summary>
61        ///// <param name="panel">hosting panel</param>
62        ///// <param name="X">x coordinates vector </param>
63        ///// <param name="Y">y coordinates vector </param>
64        ///// <param name="Z">z coordinates vector </param>
65        //public ILLitTriangles (ILPanel panel, ILBaseArray X, ILBaseArray Y, ILBaseArray Z)
66        //    : base (panel,3,X,Y,Z) {
67        //    m_fillColor = Color.Yellow; 
68        //}
69        ///// <summary>
70        ///// create lit triangles, indexed storage
71        ///// </summary>
72        ///// <param name="panel">hosting panel</param>
73        ///// <param name="X">x coordinates vector </param>
74        ///// <param name="Y">y coordinates vector </param>
75        ///// <param name="Z">z coordinates vector </param>
76        ///// <param name="mapping">Mapping of shapes, composes lit triangles out of vertices. Matrix having 
77        ///// 3 rows. Every element in a column specifies the index of a vertex according to its position in X,Y,Z.
78        ///// The 3 elements in a column therefore compose a single lit triangle. Vertices may
79        ///// get used arbitrary times (or not at all). All elements must be positive integer values in
80        ///// range 0...[<see cref="ILNumerics.Drawing.Shapes.ILShape.VertexCount"/>-1].</param>
81        //public ILLitTriangles (ILPanel panel, ILBaseArray X, ILBaseArray Y, ILBaseArray Z, ILBaseArray mapping)
82        //    : base (panel,3,X,Y,Z,mapping) {
83        //    m_fillColor = Color.Yellow;
84        //}
85        ///// <summary>
86        ///// create lit triangles, flat shading
87        ///// </summary>
88        ///// <param name="panel">hosting panel</param>
89        ///// <param name="X">x coordinates vector </param>
90        ///// <param name="Y">y coordinates vector </param>
91        ///// <param name="Z">z coordinates vector </param>
92        ///// <param name="color">Fill color for all shapes.</param>
93        ///// <param name="mapping">Mapping of shapes, composes lit triangles out of vertices. Matrix having 
94        ///// 3 rows. Every element in a column specifies the index of a vertex according to its position in X,Y,Z.
95        ///// The 3 elements in a column therefore compose a single lit triangle. Vertices may
96        ///// get used arbitrary times (or not at all). All elements must be positive integer values in
97        ///// range 0...[<see cref="ILNumerics.Drawing.Shapes.ILShape.VertexCount"/>-1].</param>
98        //public ILLitTriangles (ILPanel panel, ILBaseArray X, ILBaseArray Y, ILBaseArray Z, Color color, ILBaseArray mapping)
99        //    : base (panel,3,X,Y,Z,mapping) {
100        //    m_fillColor = color;
101        //}
102        ///// <summary>
103        ///// create lit triangles, interpolated shading
104        ///// </summary>
105        ///// <param name="panel">hosting panel</param>
106        ///// <param name="X">x coordinates vector </param>
107        ///// <param name="Y">y coordinates vector </param>
108        ///// <param name="Z">z coordinates vector </param>
109        ///// <param name="colors">matrix with <see cref="ILNumerics.Drawing.Shapes.ILShape.VertexCount"/>
110        ///// rows, 3 columns for (R,G,B) or 4 columns for
111        ///// (A,R,G,B) for every vertex specified by X,Y,Z. Elements must range from 0..255. If colors
112        ///// has 3 columns only, alpha values of 255 are used as default.</param>
113        ///// <param name="mapping">Mapping of shapes, composes lit triangles out of vertices. Matrix having 
114        ///// 3 rows. Every element in a column specifies the index of a vertex according to its position in X,Y,Z.
115        ///// The 3 elements in a column therefore compose a single lit triangle. Vertices may
116        ///// get used arbitrary times (or not at all). All elements must be positive integer values in
117        ///// range 0...[<see cref="ILNumerics.Drawing.Shapes.ILShape.VertexCount"/>-1].</param>
118        //public ILLitTriangles (ILPanel panel, ILBaseArray X, ILBaseArray Y, ILBaseArray Z, ILBaseArray colors, ILBaseArray mapping)
119        //    : base (panel,3,X,Y,Z,colors,mapping) {
120        //    m_fillColor = Color.Yellow;
121        //}
122        #endregion
123
124    }
125}
Note: See TracBrowser for help on using the repository browser.