1 #ifndef __GLPROJECTIONPARAMETERSINTERFACE_hh__
2 #define __GLPROJECTIONPARAMETERSINTERFACE_hh__
5 #include <bias_config.h>
7 #ifndef BIAS_HAVE_OPENGL
8 # error You need BIAS with USE_OpenGL Please recompile BIAS.
9 #endif // BUILD_GLviewer
11 #include <Base/Geometry/HomgPoint3D.hh>
12 #include <Base/Geometry/HomgPoint2D.hh>
13 #include <Base/Geometry/Quaternion.hh>
14 #include <Geometry/RMatrix.hh>
15 #include <Geometry/ProjectionParametersBase.hh>
17 #include <OpenGLFramework/Base/glfRenderTarget.hh>
18 #include <OpenGLFramework/Base/glfFramebufferObject.hh>
19 #include <GLviewer/Scenes/SceneBGImage.hh>
20 #include <GLviewer/OutputAttachments/GLProjectionOutputAttachment.hh>
23 #define GLP_ACTIVITY_BASIC 1
24 #define GLP_ACTIVITY_MEDIUM 2
25 #define GLP_ACTIVITY_HIGH 4
26 #define GLP_ACTIVITY_FULL 7
27 #define GLP_STATE_BASIC 8
28 #define GLP_STATE_MEDIUM 16
29 #define GLP_STATE_HIGH 32
30 #define GLP_STATE_FULL 63
31 #define GLP_PROJECTION 1<<17
32 #define GLP_VIEWPORT 1<<18
64 } ViewingReshapeBehaviour;
70 GetMyselfAsProjectionParametersBase()
const =0;
72 virtual void SetDebugLevel(
const long int lv)=0;
73 virtual void AddDebugLevel(
const long int lv)=0;
97 const unsigned int y) = 0;
102 virtual bool PoseValid() = 0;
109 virtual bool GetViewportCoordinates(
int& x,
int& y)=0;
112 virtual void SetZClippingPlanes (
float n,
float f)=0;
113 virtual void SetNearClippingPlane(
float n)=0;
114 virtual void SetFarClippingPlane (
float f)=0;
115 virtual float GetNearClippingPlane()
const =0;
116 virtual float GetFarClippingPlane ()
const =0;
119 #ifdef BIAS_HAVE_XML2
120 virtual int XMLRead (
const std::string& Filename)=0;
121 virtual int XMLWrite(
const std::string& Filename)
const =0;
122 virtual int Load (
const std::string& filename)=0;
123 virtual int Save (
const std::string& filename)
const =0;
129 virtual void SetClearDepth(
const float d)=0;
132 virtual float GetClearDepth()=0;
135 virtual void SwitchToOffscreenRendering(
bool offscreen =
true)=0;
136 virtual void AppendOutputAttachment(
int val, std::vector<int> args
137 = std::vector<int>())=0;
139 virtual void SetAutoReshapeBehaviour(ViewingReshapeBehaviour newBehaviour)=0;
142 virtual double GetDepth(
const unsigned int x,
const unsigned int y) = 0;
146 const float invalid=0.0)=0;
148 const float invalid = 0.0,
149 const bool flip =
true)
const = 0;
151 const float invalid = 0.0,
152 const bool flip =
true)
const = 0;
154 const float invalid = 0.0,
155 const bool flip =
true)
const = 0;
158 const float invalid = 0.0) =0;
163 virtual int Draw(std::vector<BIAS::SceneBase *>& scenes,
175 #endif //__GLPROJECTIONPARAMETERSINTERFACE_hh__
class HomgPoint2D describes a point with 2 degrees of freedom in projective coordinates.
bool offscreenRenderingEnabled_
Scene that renders a background image behind all other scenes.
rescale internal projection parameters preserving aspect ratio and scale by integer values only...
Abstract interface class to handle changes in rendering parameters by controllers and in rendering co...
virtual ~GLProjectionParametersInterface()
Render part of the image or the whole image, does not change projection parameters.
class HomgPoint3D describes a point with 3 degrees of freedom in projective coordinates.
Calculate new simple perspective camera parameters keeping the current field of view in "y direction"...
Class for extra rendering pass in GLProjection (for now only used in glutGLviewer) ...
Camera parameters which define the mapping between rays in the camera coordinate system and pixels in...
Interface for render targets.