13 #ifndef OGLPLUS_SHAPES_ICOSAHEDRON_1206011111_HPP
14 #define OGLPLUS_SHAPES_ICOSAHEDRON_1206011111_HPP
29 static const GLushort* _indices(
void);
30 static const GLdouble* _positions(
void);
35 :
public DrawingInstructionWriter
37 ,
public IcosahedronBase
46 typedef GLuint (
SimpleIcosahedron::*VertexAttribFunc)(std::vector<GLfloat>&)
const;
52 const GLdouble* p = _positions();
53 dest.assign(p, p+12*3);
57 #if OGLPLUS_DOCUMENTATION_ONLY
65 typedef VertexAttribsInfo<
67 std::tuple<VertexPositionsTag>
84 const GLushort* i = _indices();
99 :
public DrawingInstructionWriter
101 ,
public IcosahedronBase
110 typedef GLuint (
Icosahedron::*VertexAttribFunc)(std::vector<GLfloat>&)
const;
113 template <
typename T>
118 const GLdouble* p = _positions();
119 const GLushort* i = _indices();
121 for(GLuint f=0; f!=20; ++f)
123 for(GLuint v=0; v!=3; ++v)
125 for(GLuint c=0; c!=3; ++c)
127 dest[f*9+v*3+c] = p[i[f*3+v]*3+c];
135 template <
typename T>
140 const GLdouble* p = _positions();
141 const GLushort* i = _indices();
143 for(GLuint f=0; f!=20; ++f)
162 for(GLuint v=0; v!=3; ++v)
164 for(GLuint c=0; c!=3; ++c)
166 dest[f*9+v*3+c] = fn[c];
173 #if OGLPLUS_DOCUMENTATION_ONLY
182 typedef VertexAttribsInfo<
192 template <
typename T>
219 #if !OGLPLUS_LINK_LIBRARY || defined(OGLPLUS_IMPLEMENTING_LIBRARY)
220 #include <oglplus/shapes/icosahedron.ipp>
221 #endif // OGLPLUS_LINK_LIBRARY
223 #endif // include guard
Implementation of shape draw instructions.
Definition: vector.hpp:14
GLuint Positions(std::vector< T > &dest) const
Makes the positions and returns the number of values per vertex.
Definition: icosahedron.hpp:114
IndexArray Indices(Default=Default()) const
Returns element indices that are used with the drawing instructions.
Definition: icosahedron.hpp:82
VertexAttribsInfo< Icosahedron > VertexAttribs
Vertex attribute information for this shape builder.
Definition: icosahedron.hpp:63
FaceOrientation FaceWinding(void) const
Returns the winding direction of faces.
Definition: icosahedron.hpp:41
FaceOrientation FaceWinding(void) const
Returns the winding direction of faces.
Definition: icosahedron.hpp:105
PrimitiveType
Primitive type enumeration.
Definition: primitive_type.hpp:29
void BoundingSphere(oglplus::Sphere< T > &bounding_sphere) const
Queries the bounding sphere coordinates and dimensions.
Definition: icosahedron.hpp:73
GLuint Normals(std::vector< T > &dest) const
Makes the normals and returns the number of values per vertex.
Definition: icosahedron.hpp:136
IndexArray Indices(Default=Default()) const
Returns element indices that are used with the drawing instructions.
Definition: icosahedron.hpp:202
FaceOrientation
Face orientation enumeration.
Definition: face_mode.hpp:62
OpenGL face type-related enumeration.
DrawingInstructions Instructions(Default=Default()) const
Returns the instructions for rendering of faces.
Definition: icosahedron.hpp:210
DrawingInstructions Instructions(Default=Default()) const
Returns the instructions for rendering of faces.
Definition: icosahedron.hpp:91
Class providing vertex attributes and instructions for drawing of a icosahedron.
Definition: icosahedron.hpp:98
std::vector< GLushort > IndexArray
The type of the index container returned by Indices()
Definition: icosahedron.hpp:199
Classes providing additional information about the shape builders.
GLuint Positions(std::vector< T > &dest) const
Makes the positions and returns the number of values per vertex.
Definition: icosahedron.hpp:50
Class encapsulating the instructions for drawing of a shape.
Definition: draw.hpp:219
Class implementing sphere-related functionality.
Definition: sphere.hpp:29
void BoundingSphere(Sphere< T > ¢er_and_radius) const
Queries the bounding sphere coordinates and dimensions.
Definition: icosahedron.hpp:193
Class providing vertex attributes and instructions for drawing of a icosahedron.
Definition: icosahedron.hpp:34
std::vector< GLushort > IndexArray
The type of the index container returned by Indices()
Definition: icosahedron.hpp:79
Class providing vertex attributes and instructions for rendering of a Sphere.
Definition: sphere.hpp:28
VertexAttribsInfo< Icosahedron > VertexAttribs
Vertex attribute information for this shape builder.
Definition: icosahedron.hpp:180