Документ взят из кэша поисковой машины. Адрес оригинального документа : http://astro.uni-altai.ru/~aw/stellarium/api/GenericVertexTypes_8hpp_source.html
Дата изменения: Unknown
Дата индексирования: Fri Feb 28 07:56:56 2014
Кодировка:

Поисковые слова: total solar eclipse
Stellarium: core/renderer/GenericVertexTypes.hpp Source File
Stellarium 0.12.3
GenericVertexTypes.hpp
1 /*
2  * Stellarium
3  * Copyright (C) 2012 Ferdinand Majerech
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
18  */
19 
20 #ifndef _GENERICVERTEXTYPES_HPP_
21 #define _GENERICVERTEXTYPES_HPP_
22 
23 #include "StelVertexAttribute.hpp"
24 #include "VecMath.hpp"
25 
27 struct VertexP2
28 {
29  Vec2f position;
30 
32  VertexP2(const Vec2f position) : position(position) {}
33 
35  VertexP2(const float x, const float y) : position(x, y) {}
36  VERTEX_ATTRIBUTES(Vec2f Position);
37 };
38 
40 struct VertexP3T2
41 {
42  Vec3f position;
43  Vec2f texCoord;
44 
46  VertexP3T2(const Vec3f& position, const Vec2f texCoord)
47  : position(position), texCoord(texCoord) {}
48 
50  VertexP3T2(const Vec2f pos, const Vec2f texCoord)
51  : position(pos[0], pos[1], 0.0f), texCoord(texCoord) {}
52 
53  VERTEX_ATTRIBUTES(Vec3f Position, Vec2f TexCoord);
54 };
55 
58 {
59  Vec3f position;
60  Vec2f texCoord;
61  Vec4f color;
62 
64  VertexP3T2C4(const Vec3f& position, const Vec2f texCoord, const Vec4f& color)
65  : position(position), texCoord(texCoord), color(color) {}
66 
68  VertexP3T2C4(const Vec2f pos, const Vec2f texCoord, const Vec4f& color)
69  : position(pos[0], pos[1], 0.0f), texCoord(texCoord), color(color) {}
70 
71  VERTEX_ATTRIBUTES(Vec3f Position, Vec2f TexCoord, Vec4f Color);
72 };
73 #endif // _GENERICVERTEXTYPES_HPP_