13 #ifndef OGLPLUS_SHAPES_CUBE_1107121519_HPP 
   14 #define OGLPLUS_SHAPES_CUBE_1107121519_HPP 
   30  : 
public DrawingInstructionWriter
 
   34     GLdouble _sx, _sy, _sz;
 
   35     GLdouble _ox, _oy, _oz;
 
   48     Cube(GLdouble w, GLdouble h, GLdouble d)
 
   79     typedef GLuint (
Cube::*VertexAttribFunc)(std::vector<GLfloat>&) 
const;
 
   81     std::vector<GLfloat> _positions(
void) 
const;
 
   83     GLuint Positions(std::vector<GLfloat>& dest)
 const 
   93         auto v = _positions();
 
   94         dest.assign(v.begin(), v.end());
 
   98     std::vector<GLfloat> _normals(
void) 
const;
 
  100     GLuint Normals(std::vector<GLfloat>& dest)
 const 
  107     template <
typename T>
 
  111         dest.assign(v.begin(), v.end());
 
  115     std::vector<GLfloat> _tangents(
void) 
const;
 
  117     GLuint Tangents(std::vector<GLfloat>& dest)
 const 
  124     template <
typename T>
 
  127         auto v = _tangents();
 
  128         dest.assign(v.begin(), v.end());
 
  132     std::vector<GLfloat> _tex_coords(
void) 
const;
 
  134     GLuint TexCoordinates(std::vector<GLfloat>& dest)
 const 
  136         dest = _tex_coords();
 
  141     template <
typename T>
 
  144         auto v = _tex_coords();
 
  145         dest.assign(v.begin(), v.end());
 
  149 #if OGLPLUS_DOCUMENTATION_ONLY 
  160     typedef VertexAttribsInfo<
 
  166             VertexTexCoordinatesTag
 
  172     template <
typename T>
 
  179             T(std::sqrt(_sx*_sx + _sy*_sy + _sz*_sz))
 
  205 #if !OGLPLUS_LINK_LIBRARY || defined(OGLPLUS_IMPLEMENTING_LIBRARY) 
  206 #include <oglplus/shapes/cube.ipp> 
  207 #endif // OGLPLUS_LINK_LIBRARY 
  209 #endif // include guard 
Implementation of shape draw instructions. 
GLuint Normals(std::vector< T > &dest) const 
Makes the normals and returns the number of values per vertex. 
Definition: cube.hpp:108
GLuint Positions(std::vector< T > &dest) const 
Makes the vertices and returns the number of values per vertex. 
Definition: cube.hpp:91
Cube(GLdouble w, GLdouble h, GLdouble d, GLdouble x, GLdouble y, GLdouble z)
Constructs a cube with width, height, depth and x,y and z offsets. 
Definition: cube.hpp:58
Cube(void)
Constructs a unit cube centered at the origin. 
Definition: cube.hpp:38
VertexAttribsInfo< Cube > VertexAttribs
Vertex attribute information for this shape builder. 
Definition: cube.hpp:158
IndexArray Indices(Default=Default()) const 
Returns element indices that are used with the drawing instructions. 
Definition: cube.hpp:187
FaceOrientation
Face orientation enumeration. 
Definition: face_mode.hpp:62
OpenGL face type-related enumeration. 
GLuint TexCoordinates(std::vector< T > &dest) const 
Makes the texture coordinates and returns the number of values per vertex. 
Definition: cube.hpp:142
DrawingInstructions Instructions(Default=Default()) const 
Returns the instructions for rendering of faces. 
void BoundingSphere(oglplus::Sphere< T > &bounding_sphere) const 
Queries the bounding sphere coordinates and dimensions. 
Definition: cube.hpp:173
GLuint Tangents(std::vector< T > &dest) const 
Makes the tangents and returns the number of values per vertex. 
Definition: cube.hpp:125
FaceOrientation FaceWinding(void) const 
Returns the winding direction of faces. 
Definition: cube.hpp:74
std::vector< GLushort > IndexArray
The type of the index container returned by Indices() 
Definition: cube.hpp:184
Class providing vertex attributes and instructions for rendering of a cube. 
Definition: cube.hpp:29
Cube(GLdouble w, GLdouble h, GLdouble d)
Constructs a cube with width, height, depth. 
Definition: cube.hpp:48
Classes providing additional information about the shape builders. 
Class encapsulating the instructions for drawing of a shape. 
Definition: draw.hpp:219
Class implementing sphere-related functionality. 
Definition: sphere.hpp:29