libcvd
|
Overloaded versions of GL functions to use CVD classes and datatypes, and other helpful GL classes and functions. More...
![]() |
Modules | |
OpenGL text rendering | |
Classes | |
class | CVD::VideoDisplay |
A cheap and cheerful GL display window using X and the GLX library. More... | |
Functions | |
void | CVD::glVertex (const ImageRef &i) |
Specify the (x,y) co-ordinates of a vertex. More... | |
void | CVD::glTexCoord (const ImageRef &i) |
Specify the (s,t) texture co-ordinates. More... | |
void | CVD::glRasterPos (const ImageRef &i) |
Specify the (x,y) co-ordinates of the current raster position. More... | |
void | CVD::glRect (const ImageRef &p, const ImageRef &q) |
Draws a rectangle by specifing two opposing vertices. More... | |
template<class P1 , class P2 > | |
void | CVD::glLine (const P1 &x1, const P2 &x2) |
draws a line from x1 to x2 any type that is accepted by glVertex is possible | |
template<class C > | |
void | CVD::glVertex (const C &list) |
sets a whole list of vertices stored in a std::vector. More... | |
void | CVD::glColor (const CVD::Rgb< byte > &c) |
Set the new colour to the red, green, blue components given (where 0 represents zero intensity and 255 full intensity) More... | |
void | CVD::glColor (const CVD::Rgb< float > &c) |
Set the new colour to the red, green and blue components given (where 0.0 represents zero intensity and 1.0 full intensity) More... | |
void | CVD::glColor3 (const CVD::Rgb8 &c) |
Set the new colour to the red, green and blue components given (where 0.0 represents zero intensity and 1.0 full intensity). More... | |
void | CVD::glColor4 (const CVD::Rgb8 &c) |
Set the new colour to the red, green, blue and alpha components given (where 0.0 represents zero intensity and 1.0 full intensity) More... | |
void | CVD::glColor (const CVD::Rgba< unsigned char > &c) |
Set the new colour to the red, green, blue and alpha components given (where 0 represents zero intensity and 255 full intensity) More... | |
void | CVD::glColor (const CVD::Rgba< float > &c) |
Set the new colour to the red, green, blue and alpha components given (where 0.0 represents zero intensity and 1.0 full intensity) More... | |
template<class C > | |
void | CVD::glDrawPixels (const BasicImage< C > &i) |
Draw an image to the frame buffer at the current raster position. More... | |
template<class C > | |
void | CVD::glReadPixels (BasicImage< C > &i, ImageRef origin=ImageRef(0, 0)) |
Read the current image from the colour buffer specified by glReadBuffer. More... | |
template<class C > | |
Image< C > | CVD::glReadPixels (ImageRef size, ImageRef origin=ImageRef(0, 0)) |
Read the current image from the colour buffer specified by glReadBuffer. More... | |
template<class C > | |
void | CVD::glTexSubImage2D (const BasicImage< C > &i, GLint xoffset=0, GLint yoffset=0, GLenum target=GL_TEXTURE_2D, GLint level=0) |
Sets an image as a texture sub region. More... | |
template<class C > | |
void | CVD::glTexImage2D (const BasicImage< C > &i, GLint border=0, GLenum target=GL_TEXTURE_2D, GLint level=0) |
Sets an image as a texture. More... | |
void | CVD::glPrintErrors (void) |
Prints the current errors on the gl error stack. | |
void | CVD::glTranslate (const ImageRef &v) |
add a translation specified by an ImageRef More... | |
template<int N, typename P , typename A > | |
void | CVD::glTranslate (const TooN::Vector< N, P, A > &v) |
add a translation specified from the first three coordinates of a vector More... | |
template<typename P , typename A > | |
void | CVD::glTranslate (const TooN::Vector< 2, P, A > &v) |
add a translation specified from the first two coordinates of a 2-vector z is set to zero here More... | |
template<typename P , typename A > | |
void | CVD::glTranslate (const TooN::Vector< 1, P, A > &v) |
add a translation specified from the first coordinate of a 1-vector Y and Z are zero here More... | |
template<int N, class P , class A > | |
void | CVD::glMultMatrix (const TooN::Matrix< N, N, P, A > &m) |
multiply a TooN matrix onto the current matrix stack. More... | |
template<class P , class A > | |
void | CVD::glMultMatrix (const TooN::Matrix< 3, 3, P, A > &m) |
multiply a TooN 3x3 matrix onto the current matrix stack. More... | |
template<class P , class A > | |
void | CVD::glMultMatrix (const TooN::Matrix< 2, 2, P, A > &m) |
multiply a TooN 2x2 matrix onto the current matrix stack. More... | |
template<typename P > | |
void | CVD::glMultMatrix (const TooN::SO3< P > &so3) |
multiplies a SO3 onto the current matrix stack More... | |
template<typename P > | |
void | CVD::glMultMatrix (const TooN::SE3< P > &se3) |
multiplies a SE3 onto the current matrix stack. More... | |
template<typename P > | |
void | CVD::glMultMatrix (const TooN::SO2< P > &so2) |
multiplies a SO2 onto the current matrix stack More... | |
template<typename P > | |
void | CVD::glMultMatrix (const TooN::SE2< P > &se2) |
multiplies a SE2 onto the current matrix stack. More... | |
template<typename P , typename A > | |
void | CVD::glFrustum (const TooN::Vector< 4, P, A > ¶ms, const float width, const float height, const float nearPlane=0.1, const float farPlane=100) |
sets a gl frustum from the linear camera parameters, image size and near and far plane. More... | |
template<class CAMERA > | |
void | CVD::glFrustum (const CAMERA &camera, const float width, const float height, const float nearPlane=0.1, const float farPlane=100) |
sets a gl frustum taking the first 4 parameters from the camera model. More... | |
template<typename P , typename A > | |
void | CVD::glColor (const TooN::Vector< 3, P, A > &v) |
Set the new colour to the red, green and blue components given in the Vector (where 0.0 represents zero intensity and 1.0 full intensity) More... | |
template<typename P , typename A > | |
void | CVD::glColor (const TooN::Vector< 4, P, A > &v) |
Set the new colour to the red, green, blue and alpha components given in the Vector (where 0.0 represents zero intensity and 1.0 full intensity) More... | |
template<typename P , typename A > | |
void | CVD::glClearColor (const TooN::Vector< 4, P, A > &v) |
Set the new clear colour to the red, green, blue and alpha components given in the Vector (where 0.0 represents zero intensity and 1.0 full intensity) More... | |
template<typename P , typename A > | |
void | CVD::glClearColor (const TooN::Vector< 3, P, A > &v) |
Set the new clear colour to the red, green, blue components given in the Vector alpha is set to 1. More... | |
template<typename P , typename A > | |
void | CVD::glColor (const TooN::Vector<-1, P, A > &v) |
glColor version for dynamic TooN::Vector, will test for 3 or 4 components More... | |
template<class C > | |
void | CVD::glTexBasicImage2D (const BasicImage< C > &i, GLint xoffset=0, GLint yoffset=0, GLenum target=GL_TEXTURE_2D, GLint level=0) |
Sets an image as a texture sub region. More... | |
Overloaded versions of GL functions to use CVD classes and datatypes, and other helpful GL classes and functions.
|
inline |
Set the new clear colour to the red, green, blue and alpha components given in the Vector (where 0.0 represents zero intensity and 1.0 full intensity)
v | The new colour |
|
inline |
Set the new clear colour to the red, green, blue components given in the Vector alpha is set to 1.
v | The new colour |
|
inline |
Set the new colour to the red, green and blue components given in the Vector (where 0.0 represents zero intensity and 1.0 full intensity)
v | The new colour |
|
inline |
Set the new colour to the red, green, blue and alpha components given in the Vector (where 0.0 represents zero intensity and 1.0 full intensity)
v | The new colour |
|
inline |
glColor version for dynamic TooN::Vector, will test for 3 or 4 components
v | The new colour |
Set the new colour to the red, green, blue components given (where 0 represents zero intensity and 255 full intensity)
c | The new colour |
|
inline |
Set the new colour to the red, green and blue components given (where 0.0 represents zero intensity and 1.0 full intensity)
c | The new colour |
|
inline |
Set the new colour to the red, green, blue and alpha components given (where 0 represents zero intensity and 255 full intensity)
c | The new colour |
|
inline |
Set the new colour to the red, green, blue and alpha components given (where 0.0 represents zero intensity and 1.0 full intensity)
c | The new colour |
|
inline |
Set the new colour to the red, green and blue components given (where 0.0 represents zero intensity and 1.0 full intensity).
Set the new colour to the red, green and blue components given (where 0.0 represents zero intensity and 255 full intensity).
The Rgb8::dummy member is ignored
c | The new colour |
|
inline |
Set the new colour to the red, green, blue and alpha components given (where 0.0 represents zero intensity and 1.0 full intensity)
Set the new colour to the red, green, blue and alpha components given (where 0.0 represents zero intensity and 255 full intensity)
c | The new colour |
|
inline |
Draw an image to the frame buffer at the current raster position.
Use glRasterPos to set the current raster position
i | The image to draw |
|
inline |
sets a gl frustum from the linear camera parameters, image size and near and far plane.
The camera will be in OpenGL style with camera center in the origin and the viewing direction down the negative z axis, with y pointing upwards and x pointing to the left and the image plane at z=-1. Images coordinates need to be rotated around the x axis to make sense here, because typically the camera is described as y going down (pixel lines) and image plane at z=1.
params | vector containing fu, fv, pu, pv as in the linear part of camera parameters |
width | width of the image plane in pixels, here the viewport for example |
height | height of the image plane in pixels, here the viewport for example |
near | near clipping plane |
far | far clipping plane |
|
inline |
sets a gl frustum taking the first 4 parameters from the camera model.
see
camera | camera supplying the parameters for the frustum |
width | width of the image plane in pixels, here the viewport for example |
height | height of the image plane in pixels, here the viewport for example |
near | near clipping plane |
far | far clipping plane |
|
inline |
multiply a TooN matrix onto the current matrix stack.
Works for matrizes of size n >= 4 and uses the upper left 4x4 submatrix. The matrix is also transposed to account for GL's column major format.
m | the transformation matrix |
|
inline |
multiply a TooN 3x3 matrix onto the current matrix stack.
The GL matrix last column and row are set to 0 with the lower right element to 1. The matrix is also transposed to account for GL's column major format.
m | the transformation matrix |
|
inline |
multiply a TooN 2x2 matrix onto the current matrix stack.
The TooN matrix will only occupy the upper left hand block, the remainder will be from the identity matrix. The matrix is also transposed to account for GL's column major format.
m | the transformation matrix |
|
inline |
multiplies a SO3 onto the current matrix stack
so3 | the SO3 |
|
inline |
multiplies a SE3 onto the current matrix stack.
This multiplies the SO3 and the translation in order.
se3 | the SE3 |
|
inline |
multiplies a SO2 onto the current matrix stack
so2 | the SO2 |
|
inline |
multiplies a SE2 onto the current matrix stack.
This multiplies the SO2 and the translation in order.
se3 | the SE2 |
|
inline |
Specify the (x,y) co-ordinates of the current raster position.
i | The raster position |
|
inline |
Read the current image from the colour buffer specified by glReadBuffer.
i | The image to write the image data into. This must already be initialised to be an BasicImage (or Image) of the right size. |
origin | The window co-ordinate of the first pixel to be read from the frame buffer |
|
inline |
Read the current image from the colour buffer specified by glReadBuffer.
size | The size of the area to read. |
origin | The window co-ordinate of the first pixel to be read from the frame buffer |
Draws a rectangle by specifing two opposing vertices.
p | the first vertex |
q | the second vertex |
|
inline |
Sets an image as a texture sub region.
note the reordering of the various parameters to make better use of default parameters
i | the image to set as texture |
|
inline |
Specify the (s,t) texture co-ordinates.
i | The texture coordinates |
|
inline |
Sets an image as a texture.
note the reordering of the various parameters to make better use of default parameters
i | the image to set as texture |
|
inline |
Sets an image as a texture sub region.
note the reordering of the various parameters to make better use of default parameters
i | the image to set as texture |
|
inline |
|
inline |
add a translation specified from the first three coordinates of a vector
v | the translation vector |
|
inline |
add a translation specified from the first two coordinates of a 2-vector z is set to zero here
v | the translation vector |
|
inline |
add a translation specified from the first coordinate of a 1-vector Y and Z are zero here
v | the translation vector |
|
inline |
Specify the (x,y) co-ordinates of a vertex.
i | The vertex location |
|
inline |
sets a whole list of vertices stored in a std::vector.
It uses the various glVertex helpers defined in this header file.
list | the list of vertices |