13 #ifndef OGLPLUS_SHAPES_VECTOR_1107121519_HPP
14 #define OGLPLUS_SHAPES_VECTOR_1107121519_HPP
29 :
public DrawingInstructionWriter
55 typedef GLuint (
PointAndVector::*VertexAttribFunc)(std::vector<GLfloat>&)
const;
61 T _positions[3] = {
T(0),
T(0),
T(0)};
62 dest.assign(_positions, _positions+3);
68 GLuint
Normals(std::vector<T>& dest)
const
70 T _normals[3] = {
T(_x),
T(_y),
T(_z)};
71 dest.assign(_normals, _normals+3);
75 #if OGLPLUS_DOCUMENTATION_ONLY
84 typedef VertexAttribsInfo<
101 T(std::sqrt(_x*_x + _y*_y + _z*_z))
118 operation.
method = DrawOperation::Method::DrawArrays;
125 return this->MakeInstructions(operation);
132 #endif // include guard
Implementation of shape draw instructions.
std::vector< GLushort > IndexArray
The type of the index container returned by Indices()
Definition: vector.hpp:106
GLuint Normals(std::vector< T > &dest) const
Makes the normals and returns the number of values per vertex.
Definition: vector.hpp:68
IndexArray Indices(Default=Default()) const
Returns element indices that are used with the drawing instructions.
Definition: vector.hpp:109
DrawingInstructions Instructions(Default=Default()) const
Returns the instructions for rendering of faces.
Definition: vector.hpp:115
PointAndVector(GLdouble x, GLdouble y, GLdouble z)
Constructs a vector with x,y,z coordinates.
Definition: vector.hpp:43
GLuint first
The first element.
Definition: draw.hpp:111
FaceOrientation
Face orientation enumeration.
Definition: face_mode.hpp:62
OpenGL face type-related enumeration.
Class providing vertex attributes and instructions for rendering of a vector.
Definition: vector.hpp:28
PrimitiveType mode
The primitive type to be used to draw.
Definition: draw.hpp:108
GLuint restart_index
Primitive restart index.
Definition: draw.hpp:126
static GLuint NoRestartIndex(void)
Special constant for disabling primitive restart.
Definition: draw.hpp:117
VertexAttribsInfo< PointAndVector > VertexAttribs
Vertex attribute information for this shape builder.
Definition: vector.hpp:82
Structure containing information about how to draw a part of a shape.
Definition: draw.hpp:100
GLuint count
Count of elements.
Definition: draw.hpp:114
Method method
The method to be used to draw.
Definition: draw.hpp:106
Classes providing additional information about the shape builders.
GLuint phase
The phase of the drawing process.
Definition: draw.hpp:135
Class encapsulating the instructions for drawing of a shape.
Definition: draw.hpp:219
FaceOrientation FaceWinding(void) const
Returns the winding direction of faces.
Definition: vector.hpp:50
Class implementing sphere-related functionality.
Definition: sphere.hpp:29
GLuint Positions(std::vector< T > &dest) const
Makes the vertices and returns the number of values per vertex.
Definition: vector.hpp:59
void BoundingSphere(oglplus::Sphere< T > &bounding_sphere) const
Queries the bounding sphere coordinates and dimensions.
Definition: vector.hpp:95
PointAndVector(void)
Constructs an unit vector pointing in the x-axis direction.
Definition: vector.hpp:36