OGLplus (0.52.0) a C++ wrapper for OpenGL

oglplus::images::BaseMetaballs Class Reference

Creates a Red (one components per pixel) seamless 2D metaballs image. More...

#include </home/chochlik/devel/oglplus/include/oglplus/images/metaballs.hpp>

Inheritance diagram for oglplus::images::BaseMetaballs:
Collaboration diagram for oglplus::images::BaseMetaballs:

Public Member Functions

 BaseMetaballs (GLsizei width, GLsizei height, const GLfloat *balls, std::size_t size, std::size_t n_per_ball)
 Creates an image with specified dimensions. More...
 
GLsizei Dimension (std::size_t i) const
 Returns the i-th dimension of the image. More...
 
GLsizei Width (void) const
 Returns the width of the image.
 
GLsizei Height (void) const
 Returns the height of the image.
 
GLsizei Depth (void) const
 Returns the depth of the image.
 
GLsizei Channels (void) const
 Returns the number of channels.
 
PixelDataType Type (void) const
 Returns the pixel data type.
 
PixelDataFormat Format (void) const
 Return the pixel data format.
 
PixelDataInternalFormat InternalFormat (void) const
 Return a suitable pixel data internal format.
 
template<typename T >
const TData (void) const
 Returns a pointer to the data.
 
const void * RawData (void) const
 Returns an untyped pointer to the data.
 
std::size_t DataSize (void) const
 Returns the size of data in bytes.
 
Vector< double, 4 > Pixel (GLsizei width, GLsizei height, GLsizei depth) const
 Returns the pixel at the specified coordinates.
 
double Component (GLsizei width, GLsizei height, GLsizei depth, GLsizei component) const
 Returns the component of the pixel at the specified coordinates.
 
template<typename T >
T ComponentAs (GLsizei width, GLsizei height, GLsizei depth, GLsizei component) const
 Returns the component of the pixel at the specified coordinates.
 

Detailed Description

Creates a Red (one components per pixel) seamless 2D metaballs image.

Constructor & Destructor Documentation

oglplus::images::BaseMetaballs::BaseMetaballs ( GLsizei  width,
GLsizei  height,
const GLfloat *  balls,
std::size_t  size,
std::size_t  n_per_ball 
)

Creates an image with specified dimensions.

Parameters
widththe width of the image
heightthe height of the image
ballsthe metaball data. This array contains the metaball parameters: 3, 4 or 5 values per single metaball. The first two values are the x, y coordinates of the center of the balls normalized to (0, 1). The third value is the radius of the ball, also normalized to (0, 1). If four values are specified then meta-stars are generated and the fourth value is the number of star's points. If five values are used then the fifth value controls the 'pointiness' of the star, normalized to (0, 1).
sizethe number of values in the balls array.
n_per_ballthe number of values per single ball in the balls array.
Precondition
(balls) && (size) && (size % n_per_ball == 0)

Member Function Documentation

GLsizei oglplus::images::Image::Dimension ( std::size_t  i) const
inherited

Returns the i-th dimension of the image.

0: Width 1: Height 2: Depth 3: Channels

References oglplus::images::Image::Channels(), oglplus::images::Image::Depth(), oglplus::images::Image::Height(), and oglplus::images::Image::Width().


The documentation for this class was generated from the following file:
  • /home/chochlik/devel/oglplus/include/oglplus/images/metaballs.hpp

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).