Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
BIAS::GeometryGL Class Reference

Reusable Geometry an drawing functions for OpenGL. More...

#include <Gui/GeometryGL.hh>

Public Member Functions

 GeometryGL ()
 ctor More...
 
virtual ~GeometryGL ()
 destructor More...
 

Static Public Member Functions

static void CreateSampleDisplayListScene (int &dplistID)
 creates a sample scene as one dispaly list returned in dplistID once the arg is kept as it is if initialization was done before. More...
 
static BIAS::Matrix4x4< double > CreateTextureMatrix (BIAS::PMatrix &P, const unsigned int w, const unsigned int h, const bool &useRECTcoord=false)
 compose an OpenGL 4x4 (projective) texture matrix More...
 
static void DisplayCallsSampleDisplayListScene (const double &curTime)
 
static void DisplayCameraExternalParams (BIAS::PMatrix &P)
 
static void DisplayCameraExternalParams (const BIAS::Vector3< double > &C, const BIAS::Vector3< double > &up, const BIAS::Vector3< double > &a)
 
static void DisplayCameraInternalParams (const int &x0, const int &y0, const unsigned int &width, const unsigned int &height, const float &fovY, const float &zNear, const float &zFar)
 
static void DisplayClear (const GLbitfield &mask=CLEAR_DEFAULT_MASK)
 utility functions More...
 
static void DisplayCoordCross (const float &size=1.0f, const float &linewidth=1.0f)
 draw a coord cross as three lines in r,g,b More...
 
static void DisplayCoordCross (const float &size, const float &linewidth, const BIAS::DrawTextGL &font, const std::string &LabelX=std::string("x"), const std::string &LabelY=std::string("y"), const std::string &LabelZ=std::string("z"))
 draw coord cross with labels in r,g,b JW More...
 
static void DisplayCoordCrossAxesLabel (const float &size, const BIAS::DrawTextGL &font, const std::string &LabelX=std::string("x"), const std::string &LabelY=std::string("y"), const std::string &LabelZ=std::string("z"))
 draw only the axes labels for a coord cross as text in r,g,b JW More...
 
static void DisplayImgPlaneTextured (BIAS::PMatrix &P, const unsigned int &w, const unsigned int &h, const int &texID, const int &texTarget, const double &scale, const bool &flipY, const BIAS::Vector4< float > &vertexColor=BIAS::Vector4< float >(1.0, 0.0, 1.0, 0.0))
 draws a pkane with attched texture coordinates More...
 
static void DisplayP (BIAS::PMatrix &P, const unsigned int &w, const unsigned int &h, const double &scale, const float &linewidth=1.0f)
 
static void DisplayQuadTexCoord2D (const BIAS::ImgObjGL &texobj, const bool &additionalFlipY)
 
static void DisplayQuadTexCoord2DFull (const BIAS::ImgObjGL &texobj, const bool &additionalFlipY)
 
static void DisplayRenderMode (const BIAS::RenderModeGL &m)
 
static void DisplaySceneExampleSimple ()
 
static void DisplaySimpleAnimation (const double &time)
 time dependant scene for samples More...
 
static void FillCubemap (BIAS::ImgObjGL &im, const bool &mipmapColorChange=false)
 fill More...
 
static BIAS::Vector2< double > GetImgCorner2d (const unsigned int &w, const unsigned int &h, const unsigned int &corner, const int texMode, const bool flipY)
 
static BIAS::Vector3< double > GetImgCorner3d (BIAS::PMatrix &P, const unsigned int &width, const unsigned int &height, const unsigned int &corner, const double &scale)
 compute 3D pos. More...
 
static void GetInfoGL (std::ostream &os)
 print all GL state informatino to os including displaylist, texobj and matric info More...
 
static void GetInfoGLDisplayLists (std::ostream &os)
 
static void GetInfoGLenvironment (std::ostream &os)
 print individual information to os More...
 
static void GetInfoGLmatrices (std::ostream &os)
 
static void GetInfoGLTexID (const GLint id, int &foundTextures, std::ostream &os, const bool &noOutputIfInvalid=true)
 
static void GetInfoGLTexObjects (std::ostream &os)
 
static void GetInfoGLWriteMasks (std::ostream &os)
 
static std::string GetName (const GLint flag, const bool withNumericDisplay=true, const bool numerixHexFormat=true)
 return a name for an OpenGL flags nr. More...
 

Detailed Description

Reusable Geometry an drawing functions for OpenGL.

Author
Jan Woetzel

Definition at line 53 of file GeometryGL.hh.

Constructor & Destructor Documentation

GeometryGL::~GeometryGL ( )
virtual

destructor

Author
Jan Woetzel 04/2005

Definition at line 32 of file GeometryGL.cpp.

GeometryGL::GeometryGL ( )

ctor

Definition at line 34 of file GeometryGL.cpp.

Member Function Documentation

void GeometryGL::CreateSampleDisplayListScene ( int &  dplistID)
static

creates a sample scene as one dispaly list returned in dplistID once the arg is kept as it is if initialization was done before.

Definition at line 1081 of file GeometryGL.cpp.

Referenced by DisplayCallsSampleDisplayListScene().

BIAS::Matrix4x4< double > GeometryGL::CreateTextureMatrix ( BIAS::PMatrix P,
const unsigned int  w,
const unsigned int  h,
const bool &  useRECTcoord = false 
)
static

compose an OpenGL 4x4 (projective) texture matrix

Parameters
useRECTcoordtrue to use RECT 0..npixels instead of 0..1 normalized pw2 texture coordinate JW

Definition at line 908 of file GeometryGL.cpp.

References BIAS::Matrix3x3< T >::SetIdentity(), and BIAS::Matrix4x4< T >::SetIdentity().

void GeometryGL::DisplayCallsSampleDisplayListScene ( const double &  curTime)
static

Definition at line 1193 of file GeometryGL.cpp.

References CreateSampleDisplayListScene().

void GeometryGL::DisplayCameraExternalParams ( BIAS::PMatrix P)
static
void GeometryGL::DisplayCameraExternalParams ( const BIAS::Vector3< double > &  C,
const BIAS::Vector3< double > &  up,
const BIAS::Vector3< double > &  a 
)
static

Definition at line 679 of file GeometryGL.cpp.

void GeometryGL::DisplayCameraInternalParams ( const int &  x0,
const int &  y0,
const unsigned int &  width,
const unsigned int &  height,
const float &  fovY,
const float &  zNear,
const float &  zFar 
)
static

Definition at line 633 of file GeometryGL.cpp.

void GeometryGL::DisplayClear ( const GLbitfield &  mask = CLEAR_DEFAULT_MASK)
static

utility functions

deps to glut:

Definition at line 424 of file GeometryGL.cpp.

Referenced by BIAS::OpenGLCanvasBase::DisplayClear().

void GeometryGL::DisplayCoordCross ( const float &  size = 1.0f,
const float &  linewidth = 1.0f 
)
static

draw a coord cross as three lines in r,g,b

Parameters
withAxesLabel true to draw x/y/Z text as axes label JW

Definition at line 598 of file GeometryGL.cpp.

Referenced by BIAS::OpenGLCanvasBase::DisplayCoordCross(), and DisplaySceneExampleSimple().

void GeometryGL::DisplayCoordCross ( const float &  size,
const float &  linewidth,
const BIAS::DrawTextGL font,
const std::string &  LabelX = std::string("x"),
const std::string &  LabelY = std::string("y"),
const std::string &  LabelZ = std::string("z") 
)
static

draw coord cross with labels in r,g,b JW

Definition at line 556 of file GeometryGL.cpp.

void GeometryGL::DisplayCoordCrossAxesLabel ( const float &  size,
const BIAS::DrawTextGL font,
const std::string &  LabelX = std::string("x"),
const std::string &  LabelY = std::string("y"),
const std::string &  LabelZ = std::string("z") 
)
static

draw only the axes labels for a coord cross as text in r,g,b JW

Definition at line 568 of file GeometryGL.cpp.

References BIAS::DrawTextGL::IsInitialized(), and BIAS::DrawTextGL::Print3D().

Referenced by BIAS::OpenGLCanvasBase::DisplayCoordCross().

void GeometryGL::DisplayImgPlaneTextured ( BIAS::PMatrix P,
const unsigned int &  w,
const unsigned int &  h,
const int &  texID,
const int &  texTarget,
const double &  scale,
const bool &  flipY,
const BIAS::Vector4< float > &  vertexColor = BIAS::Vector4<float>(1.0,0.0,1.0, 0.0) 
)
static

draws a pkane with attched texture coordinates

Definition at line 804 of file GeometryGL.cpp.

References BIAS::LOWER_LEFT, BIAS::LOWER_RIGHT, BIAS::UPPER_LEFT, and BIAS::UPPER_RIGHT.

void GeometryGL::DisplayP ( BIAS::PMatrix P,
const unsigned int &  w,
const unsigned int &  h,
const double &  scale,
const float &  linewidth = 1.0f 
)
static
void GeometryGL::DisplayQuadTexCoord2D ( const BIAS::ImgObjGL texobj,
const bool &  additionalFlipY 
)
static
void GeometryGL::DisplayQuadTexCoord2DFull ( const BIAS::ImgObjGL texobj,
const bool &  additionalFlipY 
)
static

Definition at line 956 of file GeometryGL.cpp.

Referenced by BIAS::ImageCanvasGLBase::DisplayCalls().

void GeometryGL::DisplayRenderMode ( const BIAS::RenderModeGL m)
static
void GeometryGL::DisplaySceneExampleSimple ( )
static

Definition at line 517 of file GeometryGL.cpp.

References DisplayCoordCross().

Referenced by BIAS::OpenGLCanvasBase::DisplaySampleScene().

void GeometryGL::DisplaySimpleAnimation ( const double &  time)
static

time dependant scene for samples

Definition at line 502 of file GeometryGL.cpp.

void GeometryGL::FillCubemap ( BIAS::ImgObjGL im,
const bool &  mipmapColorChange = false 
)
static

fill

Definition at line 1384 of file GeometryGL.cpp.

BIAS::Vector2< double > GeometryGL::GetImgCorner2d ( const unsigned int &  w,
const unsigned int &  h,
const unsigned int &  corner,
const int  texMode,
const bool  flipY 
)
static
BIAS::Vector3< double > GeometryGL::GetImgCorner3d ( BIAS::PMatrix P,
const unsigned int &  w,
const unsigned int &  h,
const unsigned int &  corner,
const double &  scale 
)
static

compute 3D pos.

of P in OpenGL coordinate system TODO: move this to PMatrix with addition imgDim parameter JW

Definition at line 761 of file GeometryGL.cpp.

References BIAS::PMatrix::GetC(), BIAS::PMatrix::GetK(), BIAS::PMatrix::GetRayWorldCoo(), BIAS::LOWER_LEFT, BIAS::LOWER_RIGHT, BIAS::Vector3< T >::Normalize(), BIAS::OPTICAL_CENTER, BIAS::HomgPoint2D::Set(), BIAS::UPPER_LEFT, and BIAS::UPPER_RIGHT.

void GeometryGL::GetInfoGL ( std::ostream &  os)
static

print all GL state informatino to os including displaylist, texobj and matric info

Definition at line 411 of file GeometryGL.cpp.

Referenced by BIAS::OpenGLCanvasBase::GetInfoGL().

void GeometryGL::GetInfoGLDisplayLists ( std::ostream &  os)
static

Definition at line 75 of file GeometryGL.cpp.

void GeometryGL::GetInfoGLenvironment ( std::ostream &  os)
static

print individual information to os

Definition at line 177 of file GeometryGL.cpp.

void GeometryGL::GetInfoGLmatrices ( std::ostream &  os)
static

Definition at line 37 of file GeometryGL.cpp.

void GeometryGL::GetInfoGLTexID ( const GLint  id,
int &  foundTextures,
std::ostream &  os,
const bool &  noOutputIfInvalid = true 
)
static

Definition at line 92 of file GeometryGL.cpp.

void GeometryGL::GetInfoGLTexObjects ( std::ostream &  os)
static

Definition at line 165 of file GeometryGL.cpp.

void GeometryGL::GetInfoGLWriteMasks ( std::ostream &  os)
static

Definition at line 384 of file GeometryGL.cpp.

std::string GeometryGL::GetName ( const GLint  flag,
const bool  withNumericDisplay = true,
const bool  numerixHexFormat = true 
)
static

return a name for an OpenGL flags nr.

TODO

Todo:
extract all OpenGL defines from gl.h/glew.h with regular expression.

Definition at line 1243 of file GeometryGL.cpp.


The documentation for this class was generated from the following files: