OGLplus (0.52.0) a C++ wrapper for OpenGL

oglplus::shapes::Cube Class Reference

Class providing vertex attributes and instructions for rendering of a cube. More...

#include </home/chochlik/devel/oglplus/include/oglplus/shapes/cube.hpp>

Inherits oglplus::shapes::DrawingInstructionWriter, and oglplus::shapes::DrawMode.

Public Types

typedef VertexAttribsInfo< CubeVertexAttribs
 Vertex attribute information for this shape builder. More...
 
typedef std::vector< GLushort > IndexArray
 The type of the index container returned by Indices()
 

Public Member Functions

 Cube (void)
 Constructs a unit cube centered at the origin.
 
 Cube (GLdouble w, GLdouble h, GLdouble d)
 Constructs a cube with width, height, depth.
 
 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.
 
FaceOrientation FaceWinding (void) const
 Returns the winding direction of faces.
 
template<typename T >
GLuint Positions (std::vector< T > &dest) const
 Makes the vertices and returns the number of values per vertex.
 
template<typename T >
GLuint Normals (std::vector< T > &dest) const
 Makes the normals and returns the number of values per vertex.
 
template<typename T >
GLuint Tangents (std::vector< T > &dest) const
 Makes the tangents and returns the number of values per vertex.
 
template<typename T >
GLuint TexCoordinates (std::vector< T > &dest) const
 Makes the texture coordinates and returns the number of values per vertex.
 
template<typename T >
void BoundingSphere (oglplus::Sphere< T > &bounding_sphere) const
 Queries the bounding sphere coordinates and dimensions.
 
IndexArray Indices (Default=Default()) const
 Returns element indices that are used with the drawing instructions.
 
DrawingInstructions Instructions (Default=Default()) const
 Returns the instructions for rendering of faces.
 
IndexArray Indices (Edges) const
 Returns element indices for the Cube's edges.
 
DrawingInstructions Instructions (Edges) const
 Returns the instructions for rendering of edges.
 

Detailed Description

Class providing vertex attributes and instructions for rendering of a cube.

Examples:
standalone/003_dsa_texture.cpp, and standalone/007_glm_boxes.cpp.

Member Typedef Documentation

typedef VertexAttribsInfo<Cube> oglplus::shapes::Cube::VertexAttribs

Vertex attribute information for this shape builder.

Cube provides build functions for the following named vertex attributes:

  • "Position" the vertex positions (Positions)
  • "Normal" the vertex normal vectors (Normals)
  • "Tangent" the vertex tangent vector (Tangents)
  • "TexCoord" the ST texture coordinates (TexCoordinates)

The documentation for this class was generated from the following file:
  • /home/chochlik/devel/oglplus/include/oglplus/shapes/cube.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).