Basic Image AlgorithmS Library
2.8.0
|
GLPPB encapsulates the opengl rendering interface for the projectionparameter classes. More...
#include <GLviewer/GLProjectionParametersBase.hh>
Public Types | |
enum | ViewingReshapeBehaviour { Deny =0, AutoRescaleParams, AutoCutImage, AutoSimplePerspectiveCam, AdaptToCroppedImage, AutoRescaleSimple } |
Public Member Functions | |
virtual void | AddDebugLevel (const long int lv) |
void | AddDebugLevel (const std::string &name) |
void | AppendOutputAttachment (int type, std::vector< int > args=std::vector< int >()) |
virtual void | Assign (BIAS::ProjectionParametersBase &p) |
bool | DebugLevelIsSet (const long int lv) const |
bool | DebugLevelIsSet (const std::string &name) const |
virtual int | Draw (std::vector< BIAS::SceneBase * > &scenes, BIAS::SceneBGImage *backgroundImageScene=NULL, BIAS::glfFramebufferObject *theTarget=NULL) |
Renders scenes passed as argument beginning with the smallest index. More... | |
bool | FirstRenderingPassFinished () |
Is true if in multipass rendering procedure is rendering for second or subsequent time. More... | |
void | ForceSceneUpdate () |
Rendering will call UpdateCameraRelatedState() on scenes. More... | |
GLProjectionOutputAttachment * | GetAttachmentByType (int type) |
virtual BIAS::Vector4< float > | GetClearColor () |
virtual float | GetClearDepth () |
int | GetDebugLevel () const |
std::ostream & | GetDebugStream () const |
void | GetDebugStream (std::ostream &os) const |
virtual double | GetDepth (const unsigned int x, const unsigned int y) |
evaluate depth. More... | |
virtual double | GetDepth (const BIAS::HomgPoint2D &p) |
int | GetDepthMap (BIAS::Image< float > &depthMap, const float invalid=0.0) |
Calculates depth map from current z-Buffer state. More... | |
virtual int | GetExtrinsics (BIAS::Vector3< double > &C, BIAS::Vector3< double > &up) const |
virtual int | GetExtrinsics (BIAS::Vector3< double > &C, BIAS::RMatrix &R) const |
BIAS::Matrix4x4< double > | GetGLModelViewMatrixTransposed () |
BIAS::Matrix4x4< double > | GetGLProjectionMatrixTransposed () |
void | GetGreyImage (BIAS::Image< unsigned char > &image) |
void | GetImage (BIAS::Image< unsigned char > &image) |
int | GetMetricZMap (BIAS::Image< float > &metricZMap, const float invalid=0.0) |
virtual BIAS::ProjectionParametersBase * | GetMyselfAsProjectionParametersBase () const |
the pure virtual GetMyselfAsProjectionParameterBase() forces the child classes to inherit from a projectionparameterbase class and allows to access the projectionparams in cases where only a GLPPB* is available. More... | |
virtual BIAS::glfRenderTarget * | GetRenderTarget () |
bool | GetViewportCoordinates (int &x, int &y) |
Takes x, y as window coordinates, checks whether the coordinates lie in the rendered image (in the viewrange of projection). More... | |
int | GetZBuffer (BIAS::Image< float > &zBuffer) |
GLProjectionParametersBase () | |
virtual int | Load (const std::string &filename)=0 |
long int | Name2DebugLevel (const std::string &name) const |
looks up a debuglevel in the internal map, returns 0 if not found More... | |
long int | NewDebugLevel (const std::string &name) |
creates a new debuglevel More... | |
virtual bool | PoseValid () |
void | PrintDebugLevel (std::ostream &os=std::cout) const |
BIAS::HomgPoint2D | Project (BIAS::HomgPoint3D &point) |
void | RemoveDebugLevel (const long int lv) |
void | RemoveDebugLevel (const std::string &name) |
void | Rescale (float ratio) |
Returns the absolute world coordinate frame position of camera. More... | |
virtual int | Save (const std::string &filename) const =0 |
virtual void | Set (BIAS::ProjectionParametersBase *p) |
void | SetAutoReshapeBehaviour (BIAS::GLProjectionParametersInterface::ViewingReshapeBehaviour newBehaviour) |
virtual void | SetClearColor (const BIAS::Vector4< float > &cc)=0 |
setclearcolor is pure virtual. More... | |
void | SetClearDepth (const float d) |
set the clear depth for render targets More... | |
virtual void | SetDebugLevel (const long int lv) |
void | SetDebugLevel (const std::string &name) |
void | SetDebugStream (const std::ostream &os) |
virtual int | SetExtrinsics (const BIAS::HomgPoint3D &C, const BIAS::RMatrix &R) |
virtual int | SetExtrinsics (const BIAS::Vector3< double > &C, const BIAS::RMatrix &R) |
virtual int | SetExtrinsics (const BIAS::HomgPoint3D &C, const BIAS::Quaternion< double > &Q) |
virtual int | SetExtrinsics (const BIAS::Vector3< double > &C, const BIAS::Quaternion< double > &Q) |
virtual int | SetExtrinsics (const BIAS::Vector3< double > &C, const BIAS::Vector3< double > &scenePoint, const BIAS::Vector3< double > &up) |
virtual void | SetGLCameraToLocal () |
Sets gl's Modelview matrix for rendering relative to camera coordinate system (ignoring camera pose). More... | |
virtual int | SetGLMatrices (bool forceUpdate=true)=0 |
Method loads the parameters into the projection and modelview Matrix. More... | |
virtual void | SetIntrinsics (BIAS::ProjectionParametersBase *p) |
virtual void | SetRenderTarget (BIAS::glfRenderTarget *RT) |
void | ShowDebugLevel (std::ostream &os=std::cout) const |
prints all internally known debuglevels More... | |
void | SubtractFromBackgroundImage (bool subtract=true) |
void | SwitchToOffscreenRendering (bool offscreen=true) |
virtual void | TranslateDepthToZ (BIAS::Image< float > &depthtoz, const float invalid=0.0, const bool flip=true) const |
helper function which converts a z map obtained with the last camera into a depth map for the last camera More... | |
virtual void | TranslateZToDepth (BIAS::Image< float > &ztodepth, const float invalid=0.0, const bool flip=true) const |
helper function which converts a z map obtained with the last camera into a depth map for the last camera More... | |
virtual void | TranslateZToMetricZ (BIAS::Image< float > &depthMap, const float invalid=0.0, const bool flip=true) const |
BIAS::HomgPoint3D | UnProject (const unsigned int x, const unsigned int y) |
BIAS::HomgPoint3D | UnProject (const BIAS::HomgPoint2D &p) |
BIAS::HomgPoint3D | UnProject (BIAS::HomgPoint2D &point2D, double depth) |
virtual int | UpdateGLProjectionMatrix_ (unsigned int x0, unsigned int y0, unsigned int width, unsigned int height)=0 |
virtual int | XMLRead (const std::string &Filename)=0 |
virtual int | XMLWrite (const std::string &Filename) const =0 |
virtual | ~GLProjectionParametersBase () |
virtual int | SetExtrinsics (float eyex, float eyey, float eyez, float scenex, float sceney, float scenez, float upx, float upy, float upz) |
Set extrinsic similar to GL's gluLookAt. More... | |
void | SetZClippingPlanes (float n, float f) |
Setting the near and far z-Clipping planes. More... | |
void | SetNearClippingPlane (float n) |
void | SetFarClippingPlane (float f) |
float | GetNearClippingPlane () const |
float | GetFarClippingPlane () const |
Static Public Member Functions | |
static long int | GetGlobalDebugLevel () |
static void | SetGlobalDebugLevel (long int lev) |
Static Public Attributes | |
static int | instanceCounter = -1 |
Protected Member Functions | |
virtual int | BeginDraw_ (BIAS::glfFramebufferObject *theTarget=NULL) |
long | ConsumeNextFreeDebuglevel_ () |
returns the next available debuglevel More... | |
virtual int | Draw_ (std::vector< SceneBase * > &scenes, BIAS::glfFramebufferObject *theTarget=NULL)=0 |
Implement in deriving classes. More... | |
int | DrawPartOfImage_ (const unsigned int ulX, const unsigned int ulY, const unsigned int width, const unsigned int height, std::vector< SceneBase * > scenes) |
Renders a rectangular part of actual image. More... | |
virtual int | DrawWithMatchedParamsAndViewport_ (int viewport[4], int imageWidth, int imageHeight, std::vector< SceneBase * > &scenes) |
Takes care of adapting internal parameters and gl viewport by specified behaviour scheme. More... | |
virtual int | EndDraw_ (BIAS::glfFramebufferObject *theTarget=NULL) |
int | GetGLViewport_ (int &lowerleftx, int &lowerlefty, int &sizex, int &sizey) |
void | InitBeforeDraw_ () |
void | InitRaw_ () |
void | PrepareOutputAttachments_ () |
void | ReadDepthBufferToTexture_ (int texID, int width, int height) |
virtual void | Rescale_ (float scale)=0 |
int | SetGLViewport_ (int lowerleftx, int lowerlefty, int sizex, int sizey) |
void | SetToUnknownState_ () |
int | UpdateGLModelViewMatrix_ () |
virtual double | Z2Depth_ (const int x, const int y, const double z) const =0 |
virtual void | ZBufferToDepthMap_ (BIAS::Image< float > &depthMap) |
used by GetDepthMap() which writes the current zbuffer in depthMap. More... | |
Protected Attributes | |
long int | _liDebugLevel |
long int | _liNextDebugLevel |
new concept, debuglevel are managed here in the debug class More... | |
std::map< std::string, long int > | _String2Debuglevel |
BIAS::GLProjectionParametersInterface::ViewingReshapeBehaviour | AutoViewingMatchBehaviour_ |
BIAS::SceneBGImage * | backgroundImageScene_ |
BIAS::Vector2< unsigned int > | drawingUpperLeft_ |
When cutting the image this field is telling the projection the upper left corner of the drawn image part. More... | |
bool | ExtrinsicStateChanged_ |
Changes to the parameters or GL state that lead to new calculation of GL_MODELVIEW matrix. More... | |
bool | FirstRenderingPassFinished_ |
bool | informScenesOfChange_ |
Abstract projection params have changed, scenes have to be informed about this. More... | |
unsigned int | instanceNum_ |
bool | IntrinsicStateChanged_ |
Changes to the parameters or GL state that lead to new calculation of GL_PROJECTION matrix. More... | |
double | lastAutoRescaleRatio_ |
BIAS::Vector2< unsigned int > | lastDrawingUpperLeft_ |
Keeping track which image part was drawn last time Draw() was called. More... | |
BIAS::Vector4< int > | lastFullGLViewport_ |
Remembering the last full viewport prevent unecessary calculations in AutoRescaleParams behaviour. More... | |
BIAS::Vector4< int > | lastUsedGLViewport_ |
Keeping track which part of image was drawn last time Draw() was called and where it was drawn. More... | |
bool | offscreenRenderingEnabled_ |
bool | subtractFromBackgroundImage_ |
double | zFar_ |
double | zNear_ |
BIAS::Matrix4x4< double > | GLProjectionMatrix_ |
BIAS::Matrix4x4< double > | GLModelViewMatrix_ |
bool | callInitBeforeDraw_ |
}@ More... | |
BIAS::Vector4< float > | ClearColor_ |
float | ClearDepth_ |
bool | useStencilBuffer_ |
int | cubeSideResolution_ |
bool | distort_ |
BIAS::glfRenderTarget * | currentRenderTarget_ |
std::deque < BIAS::GLProjectionOutputAttachment * > | outputAttachments_ |
std::deque< std::vector< int > > | outputAttachmentOptions_ |
std::deque< int > | outputAttachmentIdentifiers_ |
Static Protected Attributes | |
static std::ostream | _zDebugStream |
static long int | GlobalDebugLevel = 0 |
GLPPB encapsulates the opengl rendering interface for the projectionparameter classes.
GLPPB replaces the glprojection. In constrast to the good old glprojection every projection type (e.g. perspective or fisheye) implements its own class based on the GLPPB interface. This hopefully reduces the code complextity and the need for gigantic case differentiations. Unlike the glprojection it does not inherit anything from the related projection class. the specific implementations (e.g. GLprojectionsparametersperspective ) are derived from GLPPB and a projectionparameter class (e.g. projectionparametersperspective). the GLPPbase class should stay generic and must not contain methods or members only related to a specific projection type. (e.g. distortion)
Definition at line 44 of file GLProjectionParametersBase.hh.
Definition at line 44 of file GLProjectionParametersInterface.hh.
GLProjectionParametersBase::GLProjectionParametersBase | ( | ) |
Definition at line 25 of file GLProjectionParametersBase.cpp.
References backgroundImageScene_, callInitBeforeDraw_, ClearColor_, ClearDepth_, currentRenderTarget_, InitRaw_(), instanceCounter, instanceNum_, BIAS::GLProjectionParametersInterface::offscreenRenderingEnabled_, outputAttachmentIdentifiers_, outputAttachmentOptions_, outputAttachments_, subtractFromBackgroundImage_, and useStencilBuffer_.
|
virtual |
Definition at line 50 of file GLProjectionParametersBase.cpp.
|
virtual |
Implements BIAS::GLProjectionParametersInterface.
Definition at line 62 of file GLProjectionParametersBase.cpp.
References BIAS::Debug::AddDebugLevel().
|
inlineinherited |
|
virtual |
Implements BIAS::GLProjectionParametersInterface.
Definition at line 1536 of file GLProjectionParametersBase.cpp.
References BIAS::GLProjectionOutputAttachment::LensDistortion, outputAttachmentIdentifiers_, outputAttachmentOptions_, and outputAttachments_.
Referenced by BIAS::GLProjectionParametersPerspective::InitShaders_().
|
virtual |
Definition at line 74 of file GLProjectionParametersBase.cpp.
References BIAS::ProjectionParametersBase::GetC(), BIAS::ProjectionParametersBase::GetR(), SetExtrinsics(), and SetIntrinsics().
|
protectedvirtual |
Definition at line 706 of file GLProjectionParametersBase.cpp.
References BIAS::glfRenderTarget::Bind(), callInitBeforeDraw_, ClearColor_, BIAS::glfRenderTarget::ClearColorBuffer(), ClearDepth_, BIAS::glfRenderTarget::ClearDepthBuffer(), BIAS::glfRenderTarget::ClearStencilBuffer(), BIAS::Vector4< T >::GetData(), BIAS::Matrix< T >::GetData(), GetGLViewport_(), BIAS::glfException::GetMessageString(), GetRenderTarget(), GLModelViewMatrix_, GLProjectionMatrix_, InitBeforeDraw_(), IntrinsicStateChanged_, lastUsedGLViewport_, UpdateGLProjectionMatrix_(), and useStencilBuffer_.
Referenced by BIAS::GLProjectionParametersPerspective::Draw_().
|
inlineprotectedinherited |
|
inlineinherited |
Definition at line 341 of file Debug.hh.
Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), BIAS::MonteCarloTransform::GetSamples_(), and BIAS::MonteCarloTransform::Transform().
|
inlineinherited |
|
virtual |
Renders scenes passed as argument beginning with the smallest index.
Depth test is enabled per default with depth func set to GL_LESS< >. Therfore scenes rendered first will also appear in front if competing with other scenes over depth-values. If different behaviour is wanted change this within specific scene code! The background image scene must be passed through a special parameter and should not be contained in the 'scenes' vector.
Implements BIAS::GLProjectionParametersInterface.
Definition at line 158 of file GLProjectionParametersBase.cpp.
References BIAS::GLProjectionParametersInterface::AdaptToCroppedImage, AutoViewingMatchBehaviour_, backgroundImageScene_, Draw_(), DrawWithMatchedParamsAndViewport_(), ExtrinsicStateChanged_, GetGLViewport_(), BIAS::glfException::GetMessageString(), lastDrawingUpperLeft_, BIAS::GLProjectionParametersInterface::offscreenRenderingEnabled_, outputAttachments_, PrepareOutputAttachments_(), SetGLViewport_(), SetRenderTarget(), UpdateGLModelViewMatrix_(), and UpdateGLProjectionMatrix_().
Referenced by EndDraw_().
|
protectedpure virtual |
Implement in deriving classes.
Implemented in BIAS::GLProjectionParametersPerspective.
Referenced by Draw(), DrawPartOfImage_(), and DrawWithMatchedParamsAndViewport_().
|
protected |
Renders a rectangular part of actual image.
Use if not full resolution is available for example with scrollbars. Does not update external parameter forces internal parameter update upon next call to Draw().
Definition at line 668 of file GLProjectionParametersBase.cpp.
References Draw_(), ExtrinsicStateChanged_, IntrinsicStateChanged_, UpdateGLModelViewMatrix_(), and UpdateGLProjectionMatrix_().
Referenced by DrawWithMatchedParamsAndViewport_().
|
protectedvirtual |
Takes care of adapting internal parameters and gl viewport by specified behaviour scheme.
External parameters update is not performed here.
Reimplemented in BIAS::GLProjectionParametersPerspective.
Definition at line 283 of file GLProjectionParametersBase.cpp.
References BIAS::GLProjectionParametersInterface::AdaptToCroppedImage, BIAS::GLProjectionParametersInterface::AutoCutImage, BIAS::GLProjectionParametersInterface::AutoRescaleParams, BIAS::GLProjectionParametersInterface::AutoRescaleSimple, BIAS::GLProjectionParametersInterface::AutoSimplePerspectiveCam, AutoViewingMatchBehaviour_, BIAS::GLProjectionParametersInterface::Deny, Draw_(), drawingUpperLeft_, DrawPartOfImage_(), BIAS::Equal(), lastDrawingUpperLeft_, lastFullGLViewport_, lastUsedGLViewport_, Rescale(), SetGLViewport_(), BIAS::ProjectionParametersPerspective::SetSimplePerspective(), and UpdateGLProjectionMatrix_().
Referenced by Draw(), and BIAS::GLProjectionParametersPerspective::DrawWithMatchedParamsAndViewport_().
|
protectedvirtual |
Definition at line 802 of file GLProjectionParametersBase.cpp.
References backgroundImageScene_, BIAS::glfRenderTarget::Bind(), currentRenderTarget_, Draw(), BIAS::Singleton< GlewInitWrapper >::GetInstance(), BIAS::glfException::GetMessageString(), BIAS::GlewInitWrapper::Init(), BIAS::GLProjectionParametersInterface::offscreenRenderingEnabled_, outputAttachments_, BIAS::SceneBase::Render(), and subtractFromBackgroundImage_.
Referenced by BIAS::GLProjectionParametersPerspective::Draw_().
|
inline |
Is true if in multipass rendering procedure is rendering for second or subsequent time.
In single pass rendering it never should return true.
Definition at line 207 of file GLProjectionParametersBase.hh.
void GLProjectionParametersBase::ForceSceneUpdate | ( | ) |
Rendering will call UpdateCameraRelatedState() on scenes.
Definition at line 1514 of file GLProjectionParametersBase.cpp.
References informScenesOfChange_.
|
virtual |
Implements BIAS::GLProjectionParametersInterface.
Definition at line 1551 of file GLProjectionParametersBase.cpp.
References outputAttachmentIdentifiers_, and outputAttachments_.
|
inlinevirtual |
Implements BIAS::GLProjectionParametersInterface.
Definition at line 254 of file GLProjectionParametersBase.hh.
|
inlinevirtual |
Implements BIAS::GLProjectionParametersInterface.
Definition at line 258 of file GLProjectionParametersBase.hh.
|
inlineinherited |
Definition at line 332 of file Debug.hh.
Referenced by BIAS::listenthread(), BIAS::Image< StorageType >::operator=(), and BIAS::ImageBase::operator=().
|
inlineinherited |
|
inlineinherited |
|
virtual |
evaluate depth.
Point is given in pixel coords relative to upper left image corner with positive x axis directed to the right and the positive y-axis pointing down. Result is the depth on optical ray.
Implements BIAS::GLProjectionParametersInterface.
Definition at line 1191 of file GLProjectionParametersBase.cpp.
References BIAS::glfRenderTarget::Bind(), GetRenderTarget(), lastUsedGLViewport_, and Z2Depth_().
Referenced by GetDepth(), and UnProject().
|
virtual |
Implements BIAS::GLProjectionParametersInterface.
Definition at line 1157 of file GLProjectionParametersBase.cpp.
References GetDepth(), and BIAS::Less().
|
virtual |
Calculates depth map from current z-Buffer state.
Implements BIAS::GLProjectionParametersInterface.
Definition at line 1233 of file GLProjectionParametersBase.cpp.
References GetZBuffer(), and TranslateZToDepth().
|
virtual |
Implements BIAS::GLProjectionParametersInterface.
Definition at line 1018 of file GLProjectionParametersBase.cpp.
References BIAS::ProjectionParametersBase::GetC(), and BIAS::ProjectionParametersBase::GetR().
Referenced by UpdateGLModelViewMatrix_().
|
virtual |
Implements BIAS::GLProjectionParametersInterface.
Definition at line 1031 of file GLProjectionParametersBase.cpp.
References BIAS::ProjectionParametersBase::GetC(), and BIAS::ProjectionParametersBase::GetR().
|
inlinevirtual |
Implements BIAS::GLProjectionParametersInterface.
Definition at line 143 of file GLProjectionParametersBase.hh.
|
inline |
Definition at line 235 of file GLProjectionParametersBase.hh.
References BIAS::Matrix4x4< T >::Transpose().
|
inlinestaticinherited |
|
inline |
Definition at line 232 of file GLProjectionParametersBase.hh.
References BIAS::Matrix4x4< T >::Transpose().
|
protected |
Definition at line 250 of file GLProjectionParametersBase.cpp.
Referenced by BeginDraw_(), and Draw().
|
virtual |
Implements BIAS::GLProjectionParametersInterface.
Definition at line 1439 of file GLProjectionParametersBase.cpp.
References BIAS::glfScreen::Bind(), BIAS::glfRenderTarget::Bind(), BIAS::ImageBase::Flip(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::glfScreen::GetInstance(), GetRenderTarget(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), lastUsedGLViewport_, and BIAS::Image< StorageType >::Release().
|
virtual |
Implements BIAS::GLProjectionParametersInterface.
Definition at line 1370 of file GLProjectionParametersBase.cpp.
References BIAS::glfScreen::Bind(), BIAS::glfRenderTarget::Bind(), BIAS::ImageBase::Flip(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::glfScreen::GetInstance(), GetRenderTarget(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), lastUsedGLViewport_, and BIAS::Image< StorageType >::Release().
|
virtual |
Implements BIAS::GLProjectionParametersInterface.
Definition at line 1314 of file GLProjectionParametersBase.cpp.
References GetZBuffer(), and TranslateZToMetricZ().
|
inlinevirtual |
the pure virtual GetMyselfAsProjectionParameterBase() forces the child classes to inherit from a projectionparameterbase class and allows to access the projectionparams in cases where only a GLPPB* is available.
this avoids the undesired need to derive GLPPB from PPB.
Implements BIAS::GLProjectionParametersInterface.
Reimplemented in BIAS::GLProjectionParametersPerspective.
Definition at line 61 of file GLProjectionParametersBase.hh.
Referenced by PrepareOutputAttachments_(), and SetExtrinsics().
|
inlinevirtual |
Implements BIAS::GLProjectionParametersInterface.
Definition at line 142 of file GLProjectionParametersBase.hh.
|
virtual |
Implements BIAS::GLProjectionParametersInterface.
Definition at line 103 of file GLProjectionParametersBase.cpp.
References currentRenderTarget_, and BIAS::GLProjectionParametersInterface::offscreenRenderingEnabled_.
Referenced by BeginDraw_(), GetDepth(), GetGreyImage(), GetImage(), GetZBuffer(), and PrepareOutputAttachments_().
|
virtual |
Takes x, y as window coordinates, checks whether the coordinates lie in the rendered image (in the viewrange of projection).
If so
Implements BIAS::GLProjectionParametersInterface.
Definition at line 939 of file GLProjectionParametersBase.cpp.
References lastUsedGLViewport_.
|
virtual |
Implements BIAS::GLProjectionParametersInterface.
Definition at line 1323 of file GLProjectionParametersBase.cpp.
References BIAS::glfScreen::Bind(), BIAS::glfRenderTarget::Bind(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::glfScreen::GetInstance(), GetRenderTarget(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), lastUsedGLViewport_, and BIAS::Image< StorageType >::Release().
Referenced by GetDepthMap(), and GetMetricZMap().
|
protected |
Definition at line 700 of file GLProjectionParametersBase.cpp.
References BIAS::Singleton< GlewInitWrapper >::GetInstance(), and BIAS::GlewInitWrapper::Init().
Referenced by BeginDraw_().
|
protected |
Definition at line 119 of file GLProjectionParametersBase.cpp.
References currentRenderTarget_, BIAS::glfScreen::GetInstance(), SetToUnknownState_(), zFar_, and zNear_.
Referenced by GLProjectionParametersBase().
|
pure virtual |
Implements BIAS::GLProjectionParametersInterface.
Implemented in BIAS::GLProjectionParametersPerspective.
|
inlineinherited |
|
inlineinherited |
creates a new debuglevel
Definition at line 474 of file Debug.hh.
Referenced by BIAS::COSAC< SolutionType >::COSAC(), BIAS::ProjectionParametersPerspectiveDepth::Init(), BIAS::MonteCarloTransform::MonteCarloTransform(), BIAS::PMatrixEstimation::PMatrixEstimation(), BIAS::PreemptiveRANSAC< SolutionType >::PreemptiveRANSAC(), BIAS::RANSACPreKnowledge< SolutionType >::RANSACPreKnowledge(), BIAS::ROI::ROI(), BIAS::RotationAveraging::RotationAveraging(), BIAS::SceneOpenSceneGraph::SceneOpenSceneGraph(), BIAS::ThreeDOutOpenSceneGraph::ThreeDOutOpenSceneGraph(), BIAS::Triangulation::Triangulation(), and BIAS::UnscentedTransform::UnscentedTransform().
|
inlinevirtual |
Implements BIAS::GLProjectionParametersInterface.
Definition at line 104 of file GLProjectionParametersBase.hh.
References PoseValid().
Referenced by PoseValid(), and UpdateGLModelViewMatrix_().
|
protected |
Definition at line 1561 of file GLProjectionParametersBase.cpp.
References ClearColor_, GetMyselfAsProjectionParametersBase(), GetRenderTarget(), BIAS::GLProjectionOutputAttachment::Haze, BIAS::GLProjectionOutputAttachment::LensDistortion, outputAttachmentIdentifiers_, outputAttachmentOptions_, outputAttachments_, BIAS::GLProjectionOutputAttachment::Underwater, BIAS::GLProjectionOutputAttachment::WoWVX, and BIAS::GLProjectionOutputAttachment::WoWVX2.
Referenced by Draw().
|
inlineinherited |
|
virtual |
Implements BIAS::GLProjectionParametersInterface.
Definition at line 1012 of file GLProjectionParametersBase.cpp.
|
protected |
Definition at line 1363 of file GLProjectionParametersBase.cpp.
|
inlineinherited |
|
inlineinherited |
void GLProjectionParametersBase::Rescale | ( | float | ratio | ) |
Returns the absolute world coordinate frame position of camera.
Definition at line 1225 of file GLProjectionParametersBase.cpp.
References IntrinsicStateChanged_, and Rescale_().
Referenced by BIAS::GLProjectionParametersPerspective::DrawWithMatchedParamsAndViewport_(), and DrawWithMatchedParamsAndViewport_().
|
protectedpure virtual |
Implemented in BIAS::GLProjectionParametersPerspective.
Referenced by Rescale().
|
pure virtual |
Implements BIAS::GLProjectionParametersInterface.
Implemented in BIAS::GLProjectionParametersPerspective.
|
virtual |
Reimplemented in BIAS::GLProjectionParametersPerspective.
Definition at line 85 of file GLProjectionParametersBase.cpp.
|
inlinevirtual |
Implements BIAS::GLProjectionParametersInterface.
Definition at line 213 of file GLProjectionParametersBase.hh.
|
pure virtual |
setclearcolor is pure virtual.
in some cases like for example distortion rendering the lower render layers (offscreen surfaces) must informed about changes of the clear color thus the child classes have to deal with the clear color on their own.
Implements BIAS::GLProjectionParametersInterface.
Implemented in BIAS::GLProjectionParametersPerspective.
|
inlinevirtual |
set the clear depth for render targets
Implements BIAS::GLProjectionParametersInterface.
Definition at line 250 of file GLProjectionParametersBase.hh.
|
virtual |
Implements BIAS::GLProjectionParametersInterface.
Definition at line 55 of file GLProjectionParametersBase.cpp.
References BIAS::Debug::SetDebugLevel().
|
inlineinherited |
|
inlineinherited |
|
virtual |
Implements BIAS::GLProjectionParametersInterface.
Definition at line 1086 of file GLProjectionParametersBase.cpp.
Referenced by Assign(), BIAS::biasGLviewerGLUT::Init(), and SetExtrinsics().
|
virtual |
Implements BIAS::GLProjectionParametersInterface.
Definition at line 1060 of file GLProjectionParametersBase.cpp.
References ExtrinsicStateChanged_, GetMyselfAsProjectionParametersBase(), informScenesOfChange_, BIAS::ProjectionParametersBase::SetC(), and BIAS::ProjectionParametersBase::SetR().
|
virtual |
Implements BIAS::GLProjectionParametersInterface.
Definition at line 1045 of file GLProjectionParametersBase.cpp.
References ExtrinsicStateChanged_, informScenesOfChange_, and BIAS::ProjectionParametersBase::SetQC().
|
virtual |
Implements BIAS::GLProjectionParametersInterface.
Definition at line 1073 of file GLProjectionParametersBase.cpp.
References ExtrinsicStateChanged_, informScenesOfChange_, BIAS::ProjectionParametersBase::SetC(), and BIAS::ProjectionParametersBase::SetQ().
|
virtual |
Set extrinsic similar to GL's gluLookAt.
Defines the camera coordinate base through specified scenepoint that is observed from given position (the eye point). And the up direction in the image (which is the -y axis of image cooridinates). Assuming orthonormal base, extrinsics are calculated. Orthonormality is assured.
Definition at line 1094 of file GLProjectionParametersBase.cpp.
References SetExtrinsics().
|
virtual |
Implements BIAS::GLProjectionParametersInterface.
Definition at line 1104 of file GLProjectionParametersBase.cpp.
References BIAS::Vector3< T >::CrossProduct(), BIAS::Vector3< T >::Normalize(), BIAS::Vector3< T >::NormL2(), SetExtrinsics(), and BIAS::Vector3< T >::Sub().
|
virtual |
Implements BIAS::GLProjectionParametersInterface.
Definition at line 972 of file GLProjectionParametersBase.cpp.
References IntrinsicStateChanged_, and zFar_.
Referenced by SetZClippingPlanes().
|
virtual |
Sets gl's Modelview matrix for rendering relative to camera coordinate system (ignoring camera pose).
Definition at line 146 of file GLProjectionParametersBase.cpp.
|
pure virtual |
Method loads the parameters into the projection and modelview Matrix.
forceUpdate do not check if camera state changed always recalculate.
Implemented in BIAS::GLProjectionParametersPerspective.
|
inlinestaticinherited |
|
protected |
Definition at line 262 of file GLProjectionParametersBase.cpp.
References lastUsedGLViewport_.
Referenced by Draw(), BIAS::GLProjectionParametersPerspective::DrawWithMatchedParamsAndViewport_(), and DrawWithMatchedParamsAndViewport_().
|
virtual |
Reimplemented in BIAS::GLProjectionParametersPerspective.
Definition at line 80 of file GLProjectionParametersBase.cpp.
Referenced by Assign().
|
virtual |
Implements BIAS::GLProjectionParametersInterface.
Definition at line 965 of file GLProjectionParametersBase.cpp.
References IntrinsicStateChanged_, and zNear_.
Referenced by SetZClippingPlanes().
|
virtual |
Implements BIAS::GLProjectionParametersInterface.
Definition at line 90 of file GLProjectionParametersBase.cpp.
References currentRenderTarget_, and BIAS::glfScreen::GetInstance().
Referenced by Draw().
|
protected |
Definition at line 128 of file GLProjectionParametersBase.cpp.
References BIAS::GLProjectionParametersInterface::AutoRescaleParams, AutoViewingMatchBehaviour_, drawingUpperLeft_, FirstRenderingPassFinished_, lastDrawingUpperLeft_, lastFullGLViewport_, lastUsedGLViewport_, and subtractFromBackgroundImage_.
Referenced by InitRaw_().
|
virtual |
Setting the near and far z-Clipping planes.
Implements BIAS::GLProjectionParametersInterface.
Definition at line 958 of file GLProjectionParametersBase.cpp.
References SetFarClippingPlane(), and SetNearClippingPlane().
|
inlineinherited |
|
inline |
Definition at line 209 of file GLProjectionParametersBase.hh.
|
virtual |
Implements BIAS::GLProjectionParametersInterface.
Definition at line 1521 of file GLProjectionParametersBase.cpp.
References AutoViewingMatchBehaviour_, BIAS::GLProjectionParametersInterface::Deny, and BIAS::GLProjectionParametersInterface::offscreenRenderingEnabled_.
|
virtual |
helper function which converts a z map obtained with the last camera into a depth map for the last camera
Implements BIAS::GLProjectionParametersInterface.
Definition at line 1286 of file GLProjectionParametersBase.cpp.
References BIAS::ImageBase::Flip(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::HomgPoint2D, lastUsedGLViewport_, BIAS::Vector3< T >::MultIP(), BIAS::Vector3< T >::Normalize(), zFar_, and zNear_.
|
virtual |
helper function which converts a z map obtained with the last camera into a depth map for the last camera
Implements BIAS::GLProjectionParametersInterface.
Definition at line 1243 of file GLProjectionParametersBase.cpp.
References BIAS::ImageBase::Flip(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), Z2Depth_(), zFar_, and zNear_.
Referenced by GetDepthMap().
|
virtual |
Implements BIAS::GLProjectionParametersInterface.
Definition at line 1265 of file GLProjectionParametersBase.cpp.
References BIAS::ImageBase::Flip(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::ImageBase::GetWidth(), zFar_, and zNear_.
Referenced by GetMetricZMap().
|
virtual |
Implements BIAS::GLProjectionParametersInterface.
Definition at line 998 of file GLProjectionParametersBase.cpp.
References BIAS::HomgPoint2D.
BIAS::HomgPoint3D GLProjectionParametersBase::UnProject | ( | const BIAS::HomgPoint2D & | p | ) |
Definition at line 980 of file GLProjectionParametersBase.cpp.
References GetDepth(), BIAS::HomgPoint3D, and BIAS::Vector3< T >::NormL2().
|
virtual |
Implements BIAS::GLProjectionParametersInterface.
Definition at line 1005 of file GLProjectionParametersBase.cpp.
|
protected |
Definition at line 911 of file GLProjectionParametersBase.cpp.
References ExtrinsicStateChanged_, GetExtrinsics(), GLModelViewMatrix_, PoseValid(), BIAS::Matrix3x3< T >::Transpose(), and BIAS::Matrix4x4< T >::Transpose().
Referenced by Draw(), DrawPartOfImage_(), and BIAS::GLProjectionParametersPerspective::SetGLMatrices().
|
pure virtual |
Referenced by BeginDraw_(), Draw(), DrawPartOfImage_(), and DrawWithMatchedParamsAndViewport_().
|
pure virtual |
Implements BIAS::GLProjectionParametersInterface.
Implemented in BIAS::GLProjectionParametersPerspective.
|
pure virtual |
Implements BIAS::GLProjectionParametersInterface.
Implemented in BIAS::GLProjectionParametersPerspective.
|
protectedpure virtual |
Implemented in BIAS::GLProjectionParametersPerspective.
Referenced by GetDepth(), TranslateZToDepth(), and ZBufferToDepthMap_().
|
protectedvirtual |
used by GetDepthMap() which writes the current zbuffer in depthMap.
AdjustRawZBuffer_ computes the distance from the camera to every pixel
Definition at line 1209 of file GLProjectionParametersBase.cpp.
References BIAS::Image< StorageType >::GetImageData(), lastUsedGLViewport_, and Z2Depth_().
|
protectedinherited |
Definition at line 510 of file Debug.hh.
Referenced by BIAS::Debug::operator=(), and BIAS::ImageBase::operator=().
|
protectedinherited |
new concept, debuglevel are managed here in the debug class
Definition at line 516 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
protectedinherited |
Definition at line 517 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
staticprotectedinherited |
Definition at line 511 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
protected |
Definition at line 317 of file GLProjectionParametersBase.hh.
Referenced by Draw(), BIAS::GLProjectionParametersPerspective::DrawWithMatchedParamsAndViewport_(), DrawWithMatchedParamsAndViewport_(), SetToUnknownState_(), and SwitchToOffscreenRendering().
|
protected |
Definition at line 321 of file GLProjectionParametersBase.hh.
Referenced by Draw(), EndDraw_(), and GLProjectionParametersBase().
|
protected |
}@
Definition at line 367 of file GLProjectionParametersBase.hh.
Referenced by BeginDraw_(), and GLProjectionParametersBase().
|
protected |
Definition at line 369 of file GLProjectionParametersBase.hh.
Referenced by BeginDraw_(), GLProjectionParametersBase(), PrepareOutputAttachments_(), and BIAS::GLProjectionParametersPerspective::SetClearColor().
|
protected |
Definition at line 370 of file GLProjectionParametersBase.hh.
Referenced by BeginDraw_(), and GLProjectionParametersBase().
|
protected |
Definition at line 379 of file GLProjectionParametersBase.hh.
|
protected |
Definition at line 383 of file GLProjectionParametersBase.hh.
Referenced by EndDraw_(), GetRenderTarget(), GLProjectionParametersBase(), InitRaw_(), and SetRenderTarget().
|
protected |
Definition at line 381 of file GLProjectionParametersBase.hh.
Referenced by BIAS::GLProjectionParametersPerspective::UpdateGLProjectionMatrix_().
|
protected |
When cutting the image this field is telling the projection the upper left corner of the drawn image part.
Definition at line 334 of file GLProjectionParametersBase.hh.
Referenced by DrawWithMatchedParamsAndViewport_(), and SetToUnknownState_().
|
protected |
Changes to the parameters or GL state that lead to new calculation of GL_MODELVIEW matrix.
Definition at line 345 of file GLProjectionParametersBase.hh.
Referenced by Draw(), DrawPartOfImage_(), BIAS::GLProjectionParametersPerspective::Set(), SetExtrinsics(), BIAS::GLProjectionParametersPerspective::SetGLMatrices(), BIAS::GLProjectionParametersPerspective::SetIntrinsics(), BIAS::GLProjectionParametersPerspective::SetSimplePerspectiveCam(), UpdateGLModelViewMatrix_(), and BIAS::GLProjectionParametersPerspective::XMLRead().
|
protected |
Definition at line 320 of file GLProjectionParametersBase.hh.
Referenced by SetToUnknownState_().
|
protected |
Definition at line 364 of file GLProjectionParametersBase.hh.
Referenced by BeginDraw_(), BIAS::GLProjectionParametersPerspective::SetGLMatrices(), and UpdateGLModelViewMatrix_().
|
staticprotectedinherited |
|
protected |
Definition at line 363 of file GLProjectionParametersBase.hh.
Referenced by BeginDraw_(), BIAS::GLProjectionParametersPerspective::SetGLMatrices(), and BIAS::GLProjectionParametersPerspective::UpdateGLProjectionMatrix_().
|
protected |
Abstract projection params have changed, scenes have to be informed about this.
Definition at line 353 of file GLProjectionParametersBase.hh.
Referenced by BIAS::GLProjectionParametersPerspective::Draw_(), BIAS::GLProjectionParametersPerspective::DrawWithMatchedParamsAndViewport_(), ForceSceneUpdate(), BIAS::GLProjectionParametersPerspective::Set(), SetExtrinsics(), BIAS::GLProjectionParametersPerspective::SetIntrinsics(), and BIAS::GLProjectionParametersPerspective::SetSimplePerspectiveCam().
|
static |
Definition at line 221 of file GLProjectionParametersBase.hh.
Referenced by GLProjectionParametersBase().
|
protected |
Definition at line 316 of file GLProjectionParametersBase.hh.
Referenced by GLProjectionParametersBase().
|
protected |
Changes to the parameters or GL state that lead to new calculation of GL_PROJECTION matrix.
Definition at line 349 of file GLProjectionParametersBase.hh.
Referenced by BeginDraw_(), DrawPartOfImage_(), BIAS::GLProjectionParametersPerspective::DrawWithMatchedParamsAndViewport_(), Rescale(), BIAS::GLProjectionParametersPerspective::Set(), SetFarClippingPlane(), BIAS::GLProjectionParametersPerspective::SetGLMatrices(), BIAS::GLProjectionParametersPerspective::SetIntrinsics(), SetNearClippingPlane(), BIAS::GLProjectionParametersPerspective::SetSimplePerspectiveCam(), BIAS::GLProjectionParametersPerspective::UpdateGLProjectionMatrix_(), and BIAS::GLProjectionParametersPerspective::XMLRead().
|
protected |
Definition at line 341 of file GLProjectionParametersBase.hh.
|
protected |
Keeping track which image part was drawn last time Draw() was called.
The width and height of the drawn image is contained in lastUsedGLViewport
Definition at line 339 of file GLProjectionParametersBase.hh.
Referenced by Draw(), DrawWithMatchedParamsAndViewport_(), and SetToUnknownState_().
|
protected |
Remembering the last full viewport prevent unecessary calculations in AutoRescaleParams behaviour.
Definition at line 330 of file GLProjectionParametersBase.hh.
Referenced by BIAS::GLProjectionParametersPerspective::DrawWithMatchedParamsAndViewport_(), DrawWithMatchedParamsAndViewport_(), and SetToUnknownState_().
|
protected |
Keeping track which part of image was drawn last time Draw() was called and where it was drawn.
Set by Draw_();
Definition at line 326 of file GLProjectionParametersBase.hh.
Referenced by BeginDraw_(), DrawWithMatchedParamsAndViewport_(), GetDepth(), GetGreyImage(), GetImage(), GetViewportCoordinates(), GetZBuffer(), SetGLViewport_(), SetToUnknownState_(), TranslateDepthToZ(), and ZBufferToDepthMap_().
|
protectedinherited |
Definition at line 167 of file GLProjectionParametersInterface.hh.
Referenced by Draw(), EndDraw_(), GetRenderTarget(), GLProjectionParametersBase(), and SwitchToOffscreenRendering().
|
protected |
Definition at line 387 of file GLProjectionParametersBase.hh.
Referenced by AppendOutputAttachment(), GetAttachmentByType(), GLProjectionParametersBase(), BIAS::GLProjectionParametersPerspective::GLProjectionParametersPerspective(), BIAS::GLProjectionParametersPerspective::InitShaders_(), BIAS::GLProjectionParametersPerspective::operator=(), and PrepareOutputAttachments_().
|
protected |
|
protected |
Definition at line 385 of file GLProjectionParametersBase.hh.
Referenced by AppendOutputAttachment(), Draw(), EndDraw_(), GetAttachmentByType(), GLProjectionParametersBase(), BIAS::GLProjectionParametersPerspective::GLProjectionParametersPerspective(), BIAS::GLProjectionParametersPerspective::operator=(), and PrepareOutputAttachments_().
|
protected |
Definition at line 319 of file GLProjectionParametersBase.hh.
Referenced by EndDraw_(), GLProjectionParametersBase(), and SetToUnknownState_().
|
protected |
Definition at line 377 of file GLProjectionParametersBase.hh.
Referenced by BeginDraw_(), BIAS::GLProjectionParametersPerspective::Draw_(), and GLProjectionParametersBase().
|
protected |
Definition at line 354 of file GLProjectionParametersBase.hh.
Referenced by InitRaw_(), SetFarClippingPlane(), TranslateDepthToZ(), TranslateZToDepth(), TranslateZToMetricZ(), BIAS::GLProjectionParametersPerspective::UpdateGLProjectionMatrix_(), and BIAS::GLProjectionParametersPerspective::Z2Depth_().
|
protected |
Definition at line 354 of file GLProjectionParametersBase.hh.
Referenced by InitRaw_(), SetNearClippingPlane(), TranslateDepthToZ(), TranslateZToDepth(), TranslateZToMetricZ(), BIAS::GLProjectionParametersPerspective::UpdateGLProjectionMatrix_(), and BIAS::GLProjectionParametersPerspective::Z2Depth_().