Class providing vertex attributes and instructions for rendering of a Sphere. More...
#include </home/chochlik/devel/oglplus/include/oglplus/shapes/sphere.hpp>
Inherits oglplus::shapes::DrawingInstructionWriter, and oglplus::shapes::DrawMode.
Public Types | |
typedef VertexAttribsInfo< Sphere > | VertexAttribs |
Vertex attribute information for this shape builder. More... | |
typedef std::vector< GLushort > | IndexArray |
The type of index container returned by Indices() | |
Public Member Functions | |
Sphere (void) | |
Creates a sphere with unit radius centered at the origin. | |
Sphere (double radius, unsigned sections, unsigned rings) | |
Creates a sphere with specified radius centered at the origin. More... | |
double | Radius (void) const |
Returns the radius of the sphere. | |
void | Radius (double radius) |
Sets the radius of the sphere. More... | |
unsigned | Sections (void) const |
Returns the number of sections of the sphere. | |
void | Sections (unsigned sections) |
Sets the number of sections of the sphere. More... | |
unsigned | Rings (void) const |
Returns the number of rings of the sphere. | |
void | Rings (unsigned rings) |
Sets the number of rings of the sphere. More... | |
FaceOrientation | FaceWinding (void) const |
Returns the winding direction of faces. | |
template<typename T > | |
GLuint | Normals (std::vector< T > &dest) const |
Makes vertex normals and returns number of values per vertex. | |
template<typename T > | |
GLuint | Tangents (std::vector< T > &dest) const |
Makes vertex tangents and returns number of values per vertex. | |
template<typename T > | |
GLuint | Bitangents (std::vector< T > &dest) const |
Makes vertex bi-tangents and returns number of values per vertex. | |
template<typename T > | |
GLuint | Positions (std::vector< T > &dest) const |
Makes vertex coordinates and returns number of values per vertex. | |
template<typename T > | |
GLuint | TexCoordinates (std::vector< T > &dest) const |
Makes texture-coorinates and returns 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. | |
Class providing vertex attributes and instructions for rendering of a Sphere.
typedef VertexAttribsInfo<Sphere> oglplus::shapes::Sphere::VertexAttribs |
Vertex attribute information for this shape builder.
Sphere provides build functions for the following named vertex attributes:
oglplus::shapes::Sphere::Sphere | ( | double | radius, |
unsigned | sections, | ||
unsigned | rings | ||
) |
Creates a sphere with specified radius centered at the origin.
void oglplus::shapes::Sphere::Radius | ( | double | radius | ) |
Sets the radius of the sphere.
void oglplus::shapes::Sphere::Rings | ( | unsigned | rings | ) |
Sets the number of rings of the sphere.
void oglplus::shapes::Sphere::Sections | ( | unsigned | sections | ) |
Sets the number of sections of the sphere.