OGLplus (0.52.0) a C++ wrapper for OpenGL

metaballs.hpp
Go to the documentation of this file.
1 
12 #pragma once
13 #ifndef OGLPLUS_IMAGES_METABALLS_1107121519_HPP
14 #define OGLPLUS_IMAGES_METABALLS_1107121519_HPP
15 
16 #include <oglplus/images/image.hpp>
17 
18 namespace oglplus {
19 namespace images {
20 
22 
26  : public Image
27 {
28 public:
30 
48  GLsizei width,
49  GLsizei height,
50  const GLfloat* balls,
51  std::size_t size,
52  std::size_t n_per_ball
53  );
54 };
55 
57 
60 class Metaballs
61  : public BaseMetaballs
62 {
63 public:
65 
76  GLsizei width,
77  GLsizei height,
78  const GLfloat* balls,
79  std::size_t size
80  ): BaseMetaballs(width, height, balls, size, 3)
81  { }
82 };
83 
84 
86 
90  : public BaseMetaballs
91 {
92 private:
93  static std::vector<GLfloat> _make_balls(
94  std::size_t count,
95  GLfloat rad_min,
96  GLfloat rad_max
97  );
98 public:
100 
108  GLsizei width,
109  GLsizei height,
110  std::size_t count,
111  GLfloat rad_min,
112  GLfloat rad_max
113  );
114 };
115 
117 
121  : public BaseMetaballs
122 {
123 public:
125 
139  GLsizei width,
140  GLsizei height,
141  const GLfloat* balls,
142  std::size_t size
143  ): BaseMetaballs(width, height, balls, size, 5)
144  { }
145 };
146 
148 
152  : public BaseMetaballs
153 {
154 private:
155  static std::vector<GLfloat> _make_stars(
156  std::size_t count,
157  GLfloat rad_min,
158  GLfloat rad_max,
159  GLfloat dif_min,
160  GLfloat dif_max,
161  GLuint pt_min,
162  GLuint pt_max
163  );
164 public:
166 
174  GLsizei width,
175  GLsizei height,
176  std::size_t count,
177  GLfloat rad_min,
178  GLfloat rad_max,
179  GLfloat dif_min,
180  GLfloat dif_max,
181  GLuint ptc_min,
182  GLuint ptc_max
183  );
184 };
185 
186 } // images
187 } // oglplus
188 
189 #if !OGLPLUS_LINK_LIBRARY || defined(OGLPLUS_IMPLEMENTING_LIBRARY)
190 #include <oglplus/images/metaballs.ipp>
191 #endif
192 
193 #endif // include guard
Creates a Red (one components per pixel) seamless 2D metaballs image.
Definition: metaballs.hpp:60
Metastars(GLsizei width, GLsizei height, const GLfloat *balls, std::size_t size)
Creates an image with specified dimensions.
Definition: metaballs.hpp:138
Creates a Red seamless 2D image with random metastars.
Definition: metaballs.hpp:151
Creates a Red seamless 2D image with random metaballs.
Definition: metaballs.hpp:89
BaseMetaballs(GLsizei width, GLsizei height, const GLfloat *balls, std::size_t size, std::size_t n_per_ball)
Creates an image with specified dimensions.
RandomMetastars(GLsizei width, GLsizei height, std::size_t count, GLfloat rad_min, GLfloat rad_max, GLfloat dif_min, GLfloat dif_max, GLuint ptc_min, GLuint ptc_max)
Creates an image with the specified dimensions and params.
Creates a Red (one components per pixel) seamless 2D metaballs image.
Definition: metaballs.hpp:25
Wrapper for (texture) image data.
Definition: image.hpp:45
Creates a Red (one components per pixel) seamless 2D metastars image.
Definition: metaballs.hpp:120
Metaballs(GLsizei width, GLsizei height, const GLfloat *balls, std::size_t size)
Creates an image with specified dimensions.
Definition: metaballs.hpp:75
RandomMetaballs(GLsizei width, GLsizei height, std::size_t count, GLfloat rad_min, GLfloat rad_max)
Creates an image with the specified dimensions and params.
Image data wrapper.

Copyright © 2010-2014 Matúš Chochlík, University of Žilina, Žilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Mon Sep 22 2014 by Doxygen (version 1.8.6).