Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 51 lines (34 sloc) 1.411 kb
a96ec4d @acaudwell Initial revision of Gource.
authored
1 /*
2 Copyright (C) 2009 Andrew Caudwell (acaudwell@gmail.com)
3
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version
7 3 of the License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18 #ifndef SPLINE_EDGE_H
19 #define SPLINE_EDGE_H
20
21 #include "core/display.h"
22 #include "core/vectors.h"
23 #include "core/pi.h"
24
25 #include "pawn.h"
26
27 #include <vector>
28
29 class SplineEdge {
30
e5a8c32 @acaudwell Update Gource to use latest version of Core library.
authored
31 std::vector<vec2> spline_point;
32 std::vector<vec4> spline_colour;
a96ec4d @acaudwell Initial revision of Gource.
authored
33
e5a8c32 @acaudwell Update Gource to use latest version of Core library.
authored
34 vec2 midpoint;
88e70be @acaudwell Calculating the real midpoint of splines to position the directory name ...
authored
35
e5a8c32 @acaudwell Update Gource to use latest version of Core library.
authored
36 void drawBeam(const vec2 & pos1, const vec4 & col1, const vec2 & pos2, const vec4 & col2, float radius, bool first) const;
a96ec4d @acaudwell Initial revision of Gource.
authored
37 public:
38 SplineEdge();
88e70be @acaudwell Calculating the real midpoint of splines to position the directory name ...
authored
39
e5a8c32 @acaudwell Update Gource to use latest version of Core library.
authored
40 const vec2& getMidPoint() const;
88e70be @acaudwell Calculating the real midpoint of splines to position the directory name ...
authored
41
e5a8c32 @acaudwell Update Gource to use latest version of Core library.
authored
42 void update(const vec2& pos1, const vec4& col1, const vec2& pos2, const vec4& col2, const vec2& spos);
a96ec4d @acaudwell Initial revision of Gource.
authored
43
7730617 @acaudwell Draw edges using VBOs.
authored
44 void drawToVBO(quadbuf& buffer) const;
45
7705cb5 Efficiency improvements for Gource and some const correctness.
Jacob authored
46 void drawShadow() const;
47 void draw() const;
a96ec4d @acaudwell Initial revision of Gource.
authored
48 };
49
50 #endif
Something went wrong with that request. Please try again.