KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Macros | Functions
gr_opengl.cpp File Reference
#include "gr_cpp/gr_opengl.h"
#include <i_cpp/i_pixel.h>
#include <m_cpp/m_vector.h>
#include <m_cpp/m_vector_d.h>
#include <m_cpp/m_matrix.h>
#include <m_cpp/m_matrix_d.h>
#include <g_cpp/g_quaternion.h>
#include <i_cpp/i_image.h>
#include <g_cpp/g_util.h>
#include <l_cpp/l_int_matrix.h>
#include <gr_cpp/gr_opengl_headers.h>
#include <g_cpp/g_line.h>
#include <boost/multi_array.hpp>

Namespaces

 kjb
 Classes and functions for dealing with trajectory files.
 
 kjb::opengl
 

Macros

#define GLUT_BITMAP_8_BY_13   0
 

Functions

template<bool bgr_format>
float * kjb::opengl::to_gl_array (const Image &img)
 Allocate and build a float array representing the pixel data. More...
 
void kjb::opengl::glRotate (const kjb::Quaternion &q)
 glRotate for a kjb::Quaternion. More...
 
void kjb::opengl::glTranslate (const kjb::Vector &p)
 glTranslate for a kjb::Vector. More...
 
void kjb::opengl::glTranslate (const kjb::Vector3 &p)
 glTranslate for a kjb::Vector3. More...
 
void kjb::opengl::glVertex (const Vector &p)
 glVertex for a kjb::Vector. More...
 
void kjb::opengl::glTranslate (const kjb::Vector2 &p)
 
void kjb::opengl::glVertex (const Vector2 &p)
 
void kjb::opengl::glVertex (const Vector3 &p)
 
void kjb::opengl::glVertex (const Vector4 &p)
 
void kjb::opengl::glColor (const Vector &color)
 glColor for a kjb::Vector. More...
 
void kjb::opengl::glColor (const kjb::PixelRGBA &color)
 
void kjb::opengl::glColor (const Vector3 &color)
 
void kjb::opengl::glColor (const Vector4 &color)
 
void kjb::opengl::glLoadMatrix (const kjb::Matrix &m)
 glLoadMatrix for a kjb::Matrix. More...
 
void kjb::opengl::glLoadMatrix (const kjb::Matrix_d< 4, 4 > &m)
 
template<class Matrix_type >
void kjb::opengl::glMultMatrix_disp_ (const Matrix_type &m)
 
void kjb::opengl::glMultMatrix (const kjb::Matrix &m)
 glMultMatrix for a kjb::Matrix. More...
 
void kjb::opengl::glMultMatrix (const Matrix_d< 4, 4 > &m)
 
void kjb::opengl::gluBuild2DMipmaps (const Image &img)
 NEEDS COMMENTING!!!. More...
 
void kjb::opengl::glTexImage2D (const Image &img)
 Copy kjb::Image into an opengl texture. More...
 
template<class ReturnVectorType , class VectorType >
ReturnVectorType kjb::opengl::gluUnProject_dispatch_ (const VectorType &vertex, double *modelview, double *projection, int *viewport)
 
Vector kjb::opengl::gluUnProject (const Vector &vertex, double *modelview, double *projection, int *viewport)
 Wraps gluUnproject using kjb::Vertex. More...
 
Vector3 kjb::opengl::gluUnProject (const Vector2 &vertex, double *modelview, double *projection, int *viewport)
 
Vector3 kjb::opengl::gluUnProject (const Vector3 &vertex, double *modelview, double *projection, int *viewport)
 
void kjb::opengl::gluLookAt (Matrix &M, const Vector &eye, const Vector &target, const Vector &up)
 Computes a gluLookAt matrix and multiplies it by the given matrix. More...
 
template<class Matrix_type >
void kjb::opengl::glOrtho_disp_ (Matrix_type &state, double left, double right, double bottom, double top, double znear, double zfar)
 
template void kjb::opengl::glOrtho_disp_ (Matrix &state, double left, double right, double bottom, double top, double znear, double zfar)
 
template void kjb::opengl::glOrtho_disp_ (Matrix_d< 4, 4 > &state, double left, double right, double bottom, double top, double znear, double zfar)
 
void kjb::opengl::glOrtho (Matrix &state, double left, double right, double bottom, double top, double znear, double zfar)
 
void kjb::opengl::glOrtho (Matrix_d< 4, 4 > &state, double left, double right, double bottom, double top, double znear, double zfar)
 
void kjb::opengl::glClearDepthBuffer ()
 
void kjb::opengl::glcolormask (bool b1, bool b2, bool b3, bool b4)
 
void kjb::opengl::glEnableLineSmooth ()
 
void kjb::opengl::glDisableLineSmooth ()
 
void kjb::opengl::default_init_opengl (unsigned int width=100, unsigned int height=100)
 Initializes OpenGL in a standard way. More...
 
size_t kjb::opengl::get_viewport_width ()
 Get current GL viewport width. More...
 
size_t kjb::opengl::get_viewport_height ()
 Get current GL viewport height. More...
 
Image kjb::opengl::get_framebuffer_as_image ()
 Read pixels from opengl's whole back-buffer into an image. More...
 
Matrix kjb::opengl::get_modelview_matrix ()
 Returns a copy of the current modelview matrix. More...
 
Matrix kjb::opengl::get_projection_matrix ()
 Returns a copy of the current projection matrix. More...
 
Vector kjb::opengl::project (const Vector &x)
 Computes the window coordinates of the given point using current GL state. More...
 
Vector2 kjb::opengl::project (const Vector3 &x)
 
template<class ReturnVectorType , class VectorType >
ReturnVectorType kjb::opengl::unproject_dispatch_ (const VectorType &vertex)
 
Vector kjb::opengl::unproject (const Vector &vertex)
 Unproject a point from screen coordinates to world coordinates. More...
 
Vector3 kjb::opengl::unproject (const Vector2 &vertex)
 
Vector3 kjb::opengl::unproject (const Vector3 &vertex)
 
void kjb::opengl::draw_full_screen_quad (float z)
 
bool kjb::opengl::has_stencil_buffer ()
 Returns true if OpenGL version supports stencil buffer (right?). More...
 
void kjb::opengl::set_framebuffer (const Image &img)
 Puts the contents of an image into the framebuffer. More...
 
void kjb::opengl::set_framebuffer (const Matrix &mat)
 Puts the contents of a matrix into the framebuffer. More...
 
void kjb::opengl::set_framebuffer (const Int_matrix &mat)
 Puts the contents of a int matrix into the framebuffer. More...
 
Image kjb::opengl::get_framebuffer_as_image (size_t x, size_t y, size_t width, size_t height)
 Read pixels from opengl's back-buffer into an image. More...
 
void kjb::opengl::get_buffer_as_matrix_ (size_t x, size_t y, size_t width, size_t height, GLenum format, Matrix &result)
 
void kjb::opengl::get_framebuffer_as_matrix (size_t x, size_t y, size_t width, size_t height, Matrix &result)
 
void kjb::opengl::get_depth_buffer_as_matrix (size_t x, size_t y, size_t width, size_t height, Matrix &result)
 
Matrix kjb::opengl::get_framebuffer_as_matrix (size_t x, size_t y, size_t width, size_t height)
 
Matrix kjb::opengl::get_depth_buffer_as_matrix (size_t x, size_t y, size_t width, size_t height)
 
Matrix kjb::opengl::get_framebuffer_as_matrix ()
 Read pixels from opengl's whole back-buffer into a matrix. More...
 
Matrix kjb::opengl::get_depth_buffer_as_matrix ()
 Read pixels from opengl's whole (back) depth-buffer into a matrix. More...
 
Int_matrix kjb::opengl::get_framebuffer_as_int_matrix ()
 Read pixels from opengl's whole back-buffer into a int matrix. More...
 
Int_matrix kjb::opengl::get_framebuffer_as_int_matrix (size_t x, size_t y, size_t width, size_t height)
 
void kjb::opengl::bitmap_string (const std::string &s, double x, double y, void *font=NULL)
 Draws a bitmap string at the specified location. More...
 
void kjb::opengl::move_in_plane (kjb::Vector3 &plane_pt, const kjb::Vector2 &new_pt)
 Translate a point so it projects to a screen point. More...
 
void kjb::opengl::get_backprojection_line (const Vector2 &pt, Vector3 &line_pt, Vector3 &line_dir)
 Get backprojection line using current opengl state. More...
 
void kjb::opengl::render_xz_plane_grid (double xmin, double xmax, double zmin, double zmax, double csz=1.0)
 Draw a grid representing the ground plane. More...
 
void kjb::opengl::render_xy_plane_grid (double xmin, double xmax, double ymin, double ymax, double csz=1.0)
 Draw a grid representing the ground plane. More...
 

Macro Definition Documentation

#define GLUT_BITMAP_8_BY_13   0