17#ifndef __gui_shapes_sphere_h__
18#define __gui_shapes_sphere_h__
23#include "gui/opengl/gl_core_3_3.h"
39 Sphere () : num_indices (0) { }
41 void LOD (
const size_t);
51 Vertex (
const float x[3]) { p[0] = x[0]; p[1] = x[1]; p[2] = x[2]; }
52 template <
class Container>
53 Vertex (
const Container& vertices,
size_t i1,
size_t i2) {
54 p[0] = vertices[i1][0] + vertices[i2][0];
55 p[1] = vertices[i1][1] + vertices[i2][1];
56 p[2] = vertices[i1][2] + vertices[i2][2];
57 Eigen::Map<Eigen::Vector3f> (p).normalize();
60 float& operator[] (
const int n) {
return p[n]; }
61 float operator[] (
const int n)
const {
return p[n]; }
Object< gl::VERTEX_SHADER > Vertex