00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include "tango-gl/frustum.h"
00017
00018 namespace tango_gl {
00019
00020 static const float float_vertices[] = {
00021 0.0f, 0.0f, 0.0f, -1.0f, 1.0f, -1.0f, 0.0f, 0.0f, 0.0f, 1.0f,
00022 1.0f, -1.0f, 0.0f, 0.0f, 0.0f, -1.0f, -1.0f, -1.0f, 0.0f, 0.0f,
00023 0.0f, 1.0f, -1.0f, -1.0f, -1.0f, 1.0f, -1.0f, 1.0f, 1.0f, -1.0f,
00024 1.0f, 1.0f, -1.0f, 1.0f, -1.0f, -1.0f, 1.0f, -1.0f, -1.0f, -1.0f,
00025 -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, 1.0f, -1.0f};
00026
00027 Frustum::Frustum() : Line(3.0f, GL_LINES) {
00028 SetShader();
00029 size_t size = sizeof(float_vertices) / sizeof(float);
00030 for (size_t i = 0; i < size; i += 3) {
00031 vec_vertices_.push_back(glm::vec3(float_vertices[i], float_vertices[i + 1],
00032 float_vertices[i + 2]));
00033 }
00034 }
00035 }