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

Wrapper to glut-library. More...

#include <GLviewer/ContextGLUT.hh>

+ Inheritance diagram for BIAS::ContextGLUT:
+ Collaboration diagram for BIAS::ContextGLUT:

Public Member Functions

void AppendScene (SceneBase *scene, bool push_front=false)
 attach scenes to render here More...
 
void AppendView (View *view)
 Append a view to the context. More...
 
void CenterViewport (bool center=true)
 center the viewport More...
 
void ClearScenes ()
 Delete the attached scenes. More...
 
 ContextGLUT (int x0=0, int y0=0, int width=400, int height=600, const std::string &name="ContextGLUT Window", const char *initDisplayString=NULL, int *commandLineArgc=NULL, char **commandLineArgv=NULL)
 
 ContextGLUT (std::string gamemodestring, const std::string &name="ContextGLUT Window", const char *initDisplayString=NULL, int *commandLineArgc=NULL, char **commandLineArgv=NULL)
 
virtual void DeactivateTimer ()
 deactivate timer More...
 
void DeleteBackgroundImageScene ()
 Delete the background image scene. More...
 
void DeleteCamera ()
 Delete the camera. More...
 
void DeleteControler ()
 
void DeleteController ()
 
void DeleteSceneAt (unsigned int index)
 removes scene with the given index in the vector of scenes More...
 
void DeleteScenes ()
 Delete the attached scenes. More...
 
void EnableStencilUsage (bool enable)
 Enable the useage of stencil buffer. More...
 
const
GLProjectionParametersInterface
GetCamera ()
 get the camera More...
 
virtual int GetDepthMap (BIAS::Image< float > &Image, const float invalid=0.0, bool lock=true)
 brief Get the currently displayed depth image Set lock to false if no context lock should be used (i.e. More...
 
const
GLProjectionParametersInterface
GetGLProjectionParametersInterface ()
 get the camera parameters More...
 
int GetGlutWindowID ()
 
virtual int GetGreyImage (BIAS::Image< unsigned char > &Image, bool lock=true)
 brief Get the currently displayed image as unsigned char grey image Set lock to false if no context lock should be used (i.e. More...
 
virtual int GetImage (BIAS::Image< unsigned char > &Image, bool lock=true)
 brief Get the currently displayed image as unsigned char color image. More...
 
virtual int GetMetricZMap (BIAS::Image< float > &Image, const float invalid=0.0, bool lock=true)
 brief Get the currently displayed zbuffer image in metric (real) values Set lock to false if no context lock should be used (i.e. More...
 
SceneBaseGetSceneAt (unsigned int index)
 returns scene with the given index in the vector of scenes More...
 
bool GetSceneCenter (BIAS::Vector3< double > &center, BIAS::Vector3< double > &radius)
 Returns the center of all bounding boxes of appended scenes and the radius which include all scenes. More...
 
int GetSceneCount ()
 Get the number of attached scenes. More...
 
const std::vector< SceneBase * > & GetScenes () const
 return a vector with pointers to all attached scenes More...
 
virtual bool GetSelectionMode ()
 Get the selectinmode. More...
 
virtual int GetZBuffer (BIAS::Image< float > &Image, bool lock=true)
 brief Get the currently displayed zbuffer image (values 0-1) * Set lock to false if no context lock should be used (i.e. More...
 
void GlobalBoundingBoxSwitch (bool theswitch)
 switches rendering of bounding boxes for all scenes More...
 
void InsertSceneAt (SceneBase *scene, unsigned int index)
 Inserts or deletes a scene at the specified position in std::vector<SceneBase*> scenes_. More...
 
int LockContextSwitch ()
 
virtual void MakeGLContextCurrent ()
 try to make this OpenGl context current More...
 
void PrintGLStatus ()
 prints to current status of the OpenGL context More...
 
virtual void Redisplay ()
 Demands a rendering from the Context;. More...
 
int ReleaseContextSwitch ()
 
void RemoveScene (SceneBase *scene, bool noWarning=false)
 removes scene with the given pointer from the vector of scenes More...
 
virtual int Render ()
 Simple rendering routine. More...
 
void SetAutoClipMinZNear (double znear)
 sets minimum znear for autoclipping if autoclpiing is enabled the z-near and z-far plane are computed using the boudingspheres of the scenes. More...
 
void SetAutoClipping (bool on)
 Turn AutoClipping on, now the near and far clipping plane is automatically derived and set. More...
 
bool SetBackfaceCulling (bool cull=true)
 En-/Disable backface culling. More...
 
void SetBackgroundImageScene (SceneBGImage *backgroundImageScene)
 Deactivate background image rendering pass by passing NULL here, or deactivating scene itself. More...
 
bool SetBlending (bool blend=true)
 En-/Disable blending. More...
 
void SetClearColor (const BIAS::Vector4< float > &cc)
 set the opengl clear color for color buffer More...
 
void SetDoubleClickInterval (unsigned int ms)
 
void SetGLProjectionParametersInterface (GLProjectionParametersInterface *newCamera)
 set the camera parameters More...
 
virtual void SetSelectionMode (bool selectionmode)
 Enable or disable selection mode. More...
 
virtual void SetTimer (unsigned int interval)
 activate timer with intervall in ms More...
 
virtual ~ContextGLUT ()
 
void AppendAdditionalListener (ControlInterface *listener)
 additional control listeners can be attached, or removed here More...
 
void ClearAdditionalListeners ()
 
void RemoveAdditionalListener (ControlInterface &listener)
 
void SetControl (BIAS::ControlInterface *newControl)
 Control is implemented the following way: cout<<"F1"<<endl; All input is passed to control_ first, if this is not handling the input, the information is passed to all scenes_. More...
 
void DeleteControl ()
 delete the current controller More...
 
bool LeftMouseDoubleClicked (int x, int y, int m)
 
bool LeftMouseSingleClicked (int x, int y)
 
bool LeftMouseDown (int x, int y)
 
bool LeftMouseUp (int x, int y)
 
bool LeftMouseMoved (int x1, int x2, int y1, int y2)
 
bool RightMouseSingleClicked (int x, int y)
 
bool RightMouseDoubleClicked (int x, int y)
 
bool RightMouseMoved (int x1, int x2, int y1, int y2)
 
bool RightMouseDown (int x, int y)
 
bool RightMouseUp (int x, int y)
 
bool MiddleMouseMoved (int x1, int x2, int y1, int y2)
 
bool MiddleMouseDown (int x, int y)
 
bool MiddleMouseUp (int x, int y)
 
bool LeftAndRightMouseMoved (int x1, int x2, int y1, int y2)
 
bool MouseLeftWindow ()
 
bool SpecialKeyPressed (int key)
 
bool SpecialKeyUp (int key)
 
bool StandardKeyPressed (unsigned char, int, int)
 
bool StandardKeyUp (unsigned char, int, int)
 
bool TimerExpired ()
 Always informs both camera and scenes! More...
 
bool WindowReshape (int width, int height)
 
bool MouseWheelUsed (double stepsize)
 
bool MouseMoved (int x, int y)
 

Protected Member Functions

virtual void CreateWindow_ (int x0, int y0, int width, int height, const std::string &name)
 Creates a glut window and registers all known callbacks to it. More...
 
virtual void DestroyWindow_ ()
 
void EnterGameMode_ (const std::string gamemodestring)
 
void Init_ ()
 called once when rendering starts More...
 
void RegisterCallbacks_ () const
 
virtual void InitContext_ (const char *initDisplayString=NULL, int *commandLineArgc=NULL, char **commandLineArgv=NULL)
 Initialization of glut library, initial display state and registration of callbacks. More...
 

Protected Attributes

std::vector< ControlInterface * > additionalListeners_
 Listening for special keys only. More...
 
bool AutoClipping_
 
double AutoMinZNear_
 
SceneBGImagebackgroundImageScene_
 
bool blendingAllowed_
 
bool bSelectionMode_
 
GLProjectionParametersInterfacecamera_
 
bool centerViewport_
 
BIAS::Vector4< float > ClearColor_
 
ControlInterfacecontrol_
 
bool culling_
 
unsigned int doubleClickInterval_
 
bool gameMode_
 
bool initialized_
 
std::vector< ContextGLUT * >
::iterator 
registrationIterator_
 
std::vector< SceneBase * > scenes_
 
unsigned int TimerInterval_
 
bool UseStencil_
 
int windowID_
 

Friends

void MouseButtonFunc_ (int button, int state, int x, int y)
 
void MouseMotionFunc_ (int x, int y)
 
void MousePassiveMotionFunc_ (int x, int y)
 
void Render_ ()
 
void Reshape_ (int width, int height)
 
void SpecialKeyFunc_ (int key, int x, int y)
 
void SpecialKeyUpFunc_ (int key, int x, int y)
 
void StandardKeyFunc_ (unsigned char key, int x, int y)
 
void StandardKeyUpFunc_ (unsigned char key, int x, int y)
 
void WhenIdle_ ()
 

Detailed Description

Wrapper to glut-library.

Automatisation and unififcation of callback registration following the model implemented in class hierarchy. Does not create windows nor start the main loop. The application still needs to do it herself.

Author
bartczak

Definition at line 38 of file ContextGLUT.hh.

Constructor & Destructor Documentation

ContextGLUT::ContextGLUT ( int  x0 = 0,
int  y0 = 0,
int  width = 400,
int  height = 600,
const std::string &  name = "ContextGLUT Window",
const char *  initDisplayString = NULL,
int *  commandLineArgc = NULL,
char **  commandLineArgv = NULL 
)
ContextGLUT::ContextGLUT ( std::string  gamemodestring,
const std::string &  name = "ContextGLUT Window",
const char *  initDisplayString = NULL,
int *  commandLineArgc = NULL,
char **  commandLineArgv = NULL 
)
ContextGLUT::~ContextGLUT ( )
virtual

Definition at line 506 of file ContextGLUT.cpp.

References DestroyWindow_().

Member Function Documentation

void BIAS::RenderContextBase::AppendAdditionalListener ( ControlInterface listener)
inlineinherited

additional control listeners can be attached, or removed here

Definition at line 124 of file RenderContextBase.hh.

void RenderContextBase::AppendScene ( SceneBase scene,
bool  push_front = false 
)
inherited

attach scenes to render here

Attention
Do not append scene of type SceneBGImage here, for correct background image rendering rather use SetBackgroundImageScene().

Definition at line 332 of file RenderContextBase.cpp.

References BIAS::RenderContextBase::camera_, BIAS::RenderContextBase::scenes_, and BIAS::SceneBase::SetGLProjectionParametersInterface().

void RenderContextBase::AppendView ( View view)
inherited

Append a view to the context.

Parameters
view[in]: the view to append

Definition at line 949 of file RenderContextBase.cpp.

void RenderContextBase::CenterViewport ( bool  center = true)
inherited

center the viewport

Definition at line 893 of file RenderContextBase.cpp.

References BIAS::RenderContextBase::centerViewport_.

void BIAS::RenderContextBase::ClearAdditionalListeners ( )
inlineinherited

Definition at line 126 of file RenderContextBase.hh.

void RenderContextBase::ClearScenes ( )
inherited

Delete the attached scenes.

Attention
The scenes are NOT destroyed, delete outside if intended or use DeleteScenes() instead.

Definition at line 420 of file RenderContextBase.cpp.

References BIAS::RenderContextBase::scenes_.

void ContextGLUT::CreateWindow_ ( int  x0,
int  y0,
int  width,
int  height,
const std::string &  name 
)
protectedvirtual

Creates a glut window and registers all known callbacks to it.

Definition at line 554 of file ContextGLUT.cpp.

References gameMode_, BIAS::Singleton< GlewInitWrapper >::GetInstance(), BIAS::GlewInitWrapper::Init(), RegisterCallbacks_(), and windowID_.

Referenced by ContextGLUT().

void ContextGLUT::DeactivateTimer ( )
virtual

deactivate timer

Implements BIAS::RenderContextBase.

Definition at line 637 of file ContextGLUT.cpp.

void RenderContextBase::DeleteBackgroundImageScene ( )
inherited

Delete the background image scene.

Attention
The scene is deleted by call to delete, do not delete again outside.

Definition at line 379 of file RenderContextBase.cpp.

References BIAS::RenderContextBase::backgroundImageScene_, and BIAS::RenderContextBase::SetBackgroundImageScene().

void BIAS::RenderContextBase::DeleteCamera ( )
inlineinherited

Delete the camera.

Attention
The camera pointer is deleted, do not delete outside again!
Deprecated:
Use DeleteGLProjectionParametersInterface() instead

Definition at line 192 of file RenderContextBase.hh.

void BIAS::RenderContextBase::DeleteControl ( )
inlineinherited

delete the current controller

Attention
the controller is deleted, do not delete outside again

Definition at line 148 of file RenderContextBase.hh.

void BIAS::RenderContextBase::DeleteControler ( )
inlineinherited

Definition at line 110 of file RenderContextBase.hh.

void BIAS::RenderContextBase::DeleteController ( )
inlineinherited

Definition at line 111 of file RenderContextBase.hh.

void RenderContextBase::DeleteSceneAt ( unsigned int  index)
inherited

removes scene with the given index in the vector of scenes

Definition at line 387 of file RenderContextBase.cpp.

References BIAS::RenderContextBase::scenes_.

void RenderContextBase::DeleteScenes ( )
inherited

Delete the attached scenes.

Attention
The scenes are destroyed, do not delete outside again.

Definition at line 406 of file RenderContextBase.cpp.

References BIAS::RenderContextBase::scenes_.

void ContextGLUT::DestroyWindow_ ( )
protectedvirtual

Definition at line 573 of file ContextGLUT.cpp.

References gameMode_, registrationIterator_, and windowID_.

Referenced by ~ContextGLUT().

void RenderContextBase::EnableStencilUsage ( bool  enable)
inherited

Enable the useage of stencil buffer.

Definition at line 955 of file RenderContextBase.cpp.

References BIAS::RenderContextBase::UseStencil_.

void ContextGLUT::EnterGameMode_ ( const std::string  gamemodestring)
protected
const GLProjectionParametersInterface* BIAS::RenderContextBase::GetCamera ( )
inlineinherited

get the camera

Returns
current camera projection parameters, can be of type GLProjection of any from GLProjectionParametersBase derived class.
Deprecated:
Use GetGLProjectionParametersInterface() instead

Definition at line 185 of file RenderContextBase.hh.

int RenderContextBase::GetDepthMap ( BIAS::Image< float > &  Image,
const float  invalid = 0.0,
bool  lock = true 
)
virtualinherited

brief Get the currently displayed depth image Set lock to false if no context lock should be used (i.e.

if called from within an already context locked environment*

Parameters
invalid[in],:depth value which is set as invalid (default = 0.0)

Reimplemented in BIAS::ContextPBuffer.

Definition at line 103 of file RenderContextBase.cpp.

References BIAS::RenderContextBase::camera_, BIAS::GLProjectionParametersInterface::GetDepthMap(), BIAS::RenderContextBase::LockContextSwitch(), and BIAS::RenderContextBase::ReleaseContextSwitch().

const GLProjectionParametersInterface* BIAS::RenderContextBase::GetGLProjectionParametersInterface ( )
inlineinherited

get the camera parameters

Returns
current camera projection parameters, can be of type GLProjection of any from GLProjectionParametersBase derived class.

Definition at line 199 of file RenderContextBase.hh.

int BIAS::ContextGLUT::GetGlutWindowID ( )
inline

Definition at line 66 of file ContextGLUT.hh.

int RenderContextBase::GetGreyImage ( BIAS::Image< unsigned char > &  Image,
bool  lock = true 
)
virtualinherited

brief Get the currently displayed image as unsigned char grey image Set lock to false if no context lock should be used (i.e.

if called from within an already context locked environment

Definition at line 90 of file RenderContextBase.cpp.

References BIAS::RenderContextBase::camera_, BIAS::GLProjectionParametersInterface::GetGreyImage(), BIAS::RenderContextBase::LockContextSwitch(), and BIAS::RenderContextBase::ReleaseContextSwitch().

int RenderContextBase::GetImage ( BIAS::Image< unsigned char > &  Image,
bool  lock = true 
)
virtualinherited

brief Get the currently displayed image as unsigned char color image.

Set lock to false if no context lock should be used (i.e. if called from within an already context locked environment

Reimplemented in BIAS::ContextPBuffer.

Definition at line 77 of file RenderContextBase.cpp.

References BIAS::RenderContextBase::camera_, BIAS::GLProjectionParametersInterface::GetImage(), BIAS::RenderContextBase::LockContextSwitch(), and BIAS::RenderContextBase::ReleaseContextSwitch().

int RenderContextBase::GetMetricZMap ( BIAS::Image< float > &  Image,
const float  invalid = 0.0,
bool  lock = true 
)
virtualinherited

brief Get the currently displayed zbuffer image in metric (real) values Set lock to false if no context lock should be used (i.e.

if called from within an already context locked environment.

Parameters
invalid[in],:z value which is set as invalid (default = 0.0)*

Reimplemented in BIAS::ContextPBuffer.

Definition at line 133 of file RenderContextBase.cpp.

References BIAS::RenderContextBase::camera_, BIAS::GLProjectionParametersInterface::GetMetricZMap(), BIAS::RenderContextBase::LockContextSwitch(), and BIAS::RenderContextBase::ReleaseContextSwitch().

SceneBase * RenderContextBase::GetSceneAt ( unsigned int  index)
inherited

returns scene with the given index in the vector of scenes

Definition at line 414 of file RenderContextBase.cpp.

References BIAS::RenderContextBase::scenes_.

bool BIAS::RenderContextBase::GetSceneCenter ( BIAS::Vector3< double > &  center,
BIAS::Vector3< double > &  radius 
)
inherited

Returns the center of all bounding boxes of appended scenes and the radius which include all scenes.

Return true iff at least one scene with a bounding box was found, else false

Definition at line 438 of file RenderContextBase.cpp.

References BIAS::Vector3< T >::Length().

int RenderContextBase::GetSceneCount ( )
inherited

Get the number of attached scenes.

Returns
Number of attached scenes

Definition at line 327 of file RenderContextBase.cpp.

References BIAS::RenderContextBase::scenes_.

const std::vector<SceneBase*>& BIAS::RenderContextBase::GetScenes ( ) const
inlineinherited

return a vector with pointers to all attached scenes

Returns
vector with pointers to scenes of Type SceneBase

Definition at line 115 of file RenderContextBase.hh.

virtual bool BIAS::RenderContextBase::GetSelectionMode ( )
inlinevirtualinherited

Get the selectinmode.

Definition at line 260 of file RenderContextBase.hh.

int RenderContextBase::GetZBuffer ( BIAS::Image< float > &  Image,
bool  lock = true 
)
virtualinherited

brief Get the currently displayed zbuffer image (values 0-1) * Set lock to false if no context lock should be used (i.e.

if called from within an already context locked environment

Definition at line 118 of file RenderContextBase.cpp.

References BIAS::RenderContextBase::camera_, BIAS::GLProjectionParametersInterface::GetZBuffer(), BIAS::RenderContextBase::LockContextSwitch(), and BIAS::RenderContextBase::ReleaseContextSwitch().

void BIAS::RenderContextBase::GlobalBoundingBoxSwitch ( bool  theswitch)
inlineinherited

switches rendering of bounding boxes for all scenes

Definition at line 245 of file RenderContextBase.hh.

void RenderContextBase::Init_ ( )
protectedinherited
void ContextGLUT::InitContext_ ( const char *  initDisplayString = NULL,
int *  commandLineArgc = NULL,
char **  commandLineArgv = NULL 
)
protectedvirtual

Initialization of glut library, initial display state and registration of callbacks.

Same as calling glutInit(commandLineArgc, commandLineArgv) and glutInitDisplayString(initDisplayString). Must be called before CreateWindow() and glutMainLoop().

Definition at line 530 of file ContextGLUT.cpp.

References BIAS::Singleton< GlutInitWrapper >::GetInstance(), and BIAS::GlutInitWrapper::Init().

Referenced by ContextGLUT().

void RenderContextBase::InsertSceneAt ( SceneBase scene,
unsigned int  index 
)
inherited

Inserts or deletes a scene at the specified position in std::vector<SceneBase*> scenes_.

Definition at line 358 of file RenderContextBase.cpp.

References BIAS::RenderContextBase::scenes_.

bool RenderContextBase::LeftAndRightMouseMoved ( int  x1,
int  x2,
int  y1,
int  y2 
)
inherited
bool RenderContextBase::LeftMouseDoubleClicked ( int  x,
int  y,
int  m 
)
inherited
bool RenderContextBase::LeftMouseDown ( int  x,
int  y 
)
inherited
bool RenderContextBase::LeftMouseMoved ( int  x1,
int  x2,
int  y1,
int  y2 
)
inherited
bool RenderContextBase::LeftMouseSingleClicked ( int  x,
int  y 
)
inherited
bool RenderContextBase::LeftMouseUp ( int  x,
int  y 
)
inherited
int RenderContextBase::LockContextSwitch ( )
inherited
void ContextGLUT::MakeGLContextCurrent ( )
virtual

try to make this OpenGl context current

Implements BIAS::RenderContextBase.

Definition at line 588 of file ContextGLUT.cpp.

References windowID_.

bool RenderContextBase::MiddleMouseDown ( int  x,
int  y 
)
inherited
bool RenderContextBase::MiddleMouseMoved ( int  x1,
int  x2,
int  y1,
int  y2 
)
inherited
bool RenderContextBase::MiddleMouseUp ( int  x,
int  y 
)
inherited
bool RenderContextBase::MouseLeftWindow ( )
inherited
bool RenderContextBase::MouseMoved ( int  x,
int  y 
)
inherited
bool RenderContextBase::MouseWheelUsed ( double  stepsize)
inherited
void RenderContextBase::PrintGLStatus ( )
inherited

prints to current status of the OpenGL context

Definition at line 52 of file RenderContextBase.cpp.

void ContextGLUT::Redisplay ( )
virtual

Demands a rendering from the Context;.

Implements BIAS::RenderContextBase.

Definition at line 598 of file ContextGLUT.cpp.

References gameMode_, and windowID_.

Referenced by BIAS::WhenIdle_().

void ContextGLUT::RegisterCallbacks_ ( ) const
protected
int RenderContextBase::ReleaseContextSwitch ( )
inherited
void BIAS::RenderContextBase::RemoveAdditionalListener ( ControlInterface listener)
inherited

Definition at line 426 of file RenderContextBase.cpp.

void RenderContextBase::RemoveScene ( SceneBase scene,
bool  noWarning = false 
)
inherited

removes scene with the given pointer from the vector of scenes

Definition at line 343 of file RenderContextBase.cpp.

References BIAS::RenderContextBase::scenes_.

int RenderContextBase::Render ( )
virtualinherited
bool RenderContextBase::RightMouseDoubleClicked ( int  x,
int  y 
)
inherited
bool RenderContextBase::RightMouseDown ( int  x,
int  y 
)
inherited
bool RenderContextBase::RightMouseMoved ( int  x1,
int  x2,
int  y1,
int  y2 
)
inherited
bool RenderContextBase::RightMouseSingleClicked ( int  x,
int  y 
)
inherited
bool RenderContextBase::RightMouseUp ( int  x,
int  y 
)
inherited
void BIAS::RenderContextBase::SetAutoClipMinZNear ( double  znear)
inlineinherited

sets minimum znear for autoclipping if autoclpiing is enabled the z-near and z-far plane are computed using the boudingspheres of the scenes.

SetAutoClipMinZNear defines the minimal used znear value.

Definition at line 214 of file RenderContextBase.hh.

void BIAS::RenderContextBase::SetAutoClipping ( bool  on)
inlineinherited

Turn AutoClipping on, now the near and far clipping plane is automatically derived and set.

Definition at line 208 of file RenderContextBase.hh.

bool RenderContextBase::SetBackfaceCulling ( bool  cull = true)
inherited

En-/Disable backface culling.

Definition at line 179 of file RenderContextBase.cpp.

References BIAS::RenderContextBase::culling_.

Referenced by BIAS::RenderContextBase::Init_().

void RenderContextBase::SetBackgroundImageScene ( SceneBGImage backgroundImageScene)
inherited

Deactivate background image rendering pass by passing NULL here, or deactivating scene itself.

First choice will speed up rendering more (if noticeable anyway).

Definition at line 518 of file RenderContextBase.cpp.

References BIAS::RenderContextBase::backgroundImageScene_, and BIAS::RenderContextBase::SetClearColor().

Referenced by BIAS::RenderContextBase::DeleteBackgroundImageScene().

bool RenderContextBase::SetBlending ( bool  blend = true)
inherited

En-/Disable blending.

Definition at line 165 of file RenderContextBase.cpp.

References BIAS::RenderContextBase::blendingAllowed_.

Referenced by BIAS::RenderContextBase::Init_().

void BIAS::RenderContextBase::SetClearColor ( const BIAS::Vector4< float > &  cc)
inlineinherited

set the opengl clear color for color buffer

Parameters
cc[in],:clear color, clamped to range [0..1]

Definition at line 227 of file RenderContextBase.hh.

Referenced by BIAS::RenderContextBase::SetBackgroundImageScene().

void RenderContextBase::SetControl ( BIAS::ControlInterface newControl)
inherited

Control is implemented the following way: cout<<"F1"<<endl; All input is passed to control_ first, if this is not handling the input, the information is passed to all scenes_.

One can think of extending this to different behaviour models, like not passing anything to scenes or always passing input to scenes. Distingushing between the scenes (exluding scene of information) must be handled on scene side.Set the controller.

Parameters
newControl[in],:Pointer to a ControlInterface such as TrackballControl, FlyControl, etc.

Definition at line 526 of file RenderContextBase.cpp.

References BIAS::RenderContextBase::camera_, BIAS::RenderContextBase::control_, and BIAS::ControlInterface::SetGLProjectionParametersInterface().

void BIAS::ContextGLUT::SetDoubleClickInterval ( unsigned int  ms)
inline

Definition at line 42 of file ContextGLUT.hh.

void RenderContextBase::SetGLProjectionParametersInterface ( GLProjectionParametersInterface newCamera)
inherited

set the camera parameters

Parameters
newCamera[in],:the new camera projection parameters, can be of type GLProjection of any from GLProjectionParametersBase derived class.

Definition at line 488 of file RenderContextBase.cpp.

References BIAS::RenderContextBase::camera_, BIAS::RenderContextBase::ClearColor_, BIAS::RenderContextBase::control_, BIAS::RenderContextBase::scenes_, BIAS::GLProjectionParametersInterface::SetClearColor(), and BIAS::ControlInterface::SetGLProjectionParametersInterface().

virtual void BIAS::RenderContextBase::SetSelectionMode ( bool  selectionmode)
inlinevirtualinherited

Enable or disable selection mode.

In selection mode the interception point with a scene is calculated and SelectObjectAt() is called on the scene when double clicked.

Definition at line 257 of file RenderContextBase.hh.

void ContextGLUT::SetTimer ( unsigned int  interval)
virtual

activate timer with intervall in ms

Implements BIAS::RenderContextBase.

Definition at line 623 of file ContextGLUT.cpp.

bool RenderContextBase::SpecialKeyPressed ( int  key)
inherited
bool RenderContextBase::SpecialKeyUp ( int  key)
inherited
bool RenderContextBase::StandardKeyPressed ( unsigned char  key,
int  x,
int  y 
)
inherited
bool RenderContextBase::StandardKeyUp ( unsigned char  key,
int  x,
int  y 
)
inherited
bool RenderContextBase::TimerExpired ( )
inherited

Always informs both camera and scenes!

Definition at line 878 of file RenderContextBase.cpp.

References BIAS::RenderContextBase::additionalListeners_, BIAS::RenderContextBase::control_, and BIAS::ControlInterface::TimerExpired().

Referenced by BIAS::WhenIdle_().

bool RenderContextBase::WindowReshape ( int  width,
int  height 
)
inherited

Friends And Related Function Documentation

void MouseButtonFunc_ ( int  button,
int  state,
int  x,
int  y 
)
friend

Referenced by RegisterCallbacks_().

void MouseMotionFunc_ ( int  x,
int  y 
)
friend

Referenced by RegisterCallbacks_().

void MousePassiveMotionFunc_ ( int  x,
int  y 
)
friend

Referenced by RegisterCallbacks_().

void Render_ ( )
friend

Referenced by RegisterCallbacks_().

void Reshape_ ( int  width,
int  height 
)
friend

Referenced by RegisterCallbacks_().

void SpecialKeyFunc_ ( int  key,
int  x,
int  y 
)
friend

Referenced by RegisterCallbacks_().

void SpecialKeyUpFunc_ ( int  key,
int  x,
int  y 
)
friend

Referenced by RegisterCallbacks_().

void StandardKeyFunc_ ( unsigned char  key,
int  x,
int  y 
)
friend

Referenced by RegisterCallbacks_().

void StandardKeyUpFunc_ ( unsigned char  key,
int  x,
int  y 
)
friend

Referenced by RegisterCallbacks_().

void WhenIdle_ ( )
friend

Referenced by RegisterCallbacks_().

Member Data Documentation

std::vector<ControlInterface*> BIAS::RenderContextBase::additionalListeners_
protectedinherited
bool BIAS::RenderContextBase::AutoClipping_
protectedinherited
double BIAS::RenderContextBase::AutoMinZNear_
protectedinherited
SceneBGImage* BIAS::RenderContextBase::backgroundImageScene_
protectedinherited
bool BIAS::RenderContextBase::blendingAllowed_
protectedinherited
bool BIAS::RenderContextBase::bSelectionMode_
protectedinherited
GLProjectionParametersInterface* BIAS::RenderContextBase::camera_
protectedinherited
bool BIAS::RenderContextBase::centerViewport_
protectedinherited
BIAS::Vector4<float> BIAS::RenderContextBase::ClearColor_
protectedinherited
ControlInterface* BIAS::RenderContextBase::control_
protectedinherited
bool BIAS::RenderContextBase::culling_
protectedinherited
unsigned int BIAS::ContextGLUT::doubleClickInterval_
protected

Definition at line 111 of file ContextGLUT.hh.

Referenced by ContextGLUT(), and BIAS::MouseButtonFunc_().

bool BIAS::ContextGLUT::gameMode_
protected

Definition at line 117 of file ContextGLUT.hh.

Referenced by CreateWindow_(), DestroyWindow_(), EnterGameMode_(), and Redisplay().

bool BIAS::RenderContextBase::initialized_
protectedinherited
std::vector<ContextGLUT*>::iterator BIAS::ContextGLUT::registrationIterator_
protected

Definition at line 114 of file ContextGLUT.hh.

Referenced by ContextGLUT(), and DestroyWindow_().

std::vector<SceneBase*> BIAS::RenderContextBase::scenes_
protectedinherited
unsigned int BIAS::RenderContextBase::TimerInterval_
protectedinherited

Definition at line 276 of file RenderContextBase.hh.

Referenced by BIAS::ContextWX::SetTimer().

bool BIAS::RenderContextBase::UseStencil_
protectedinherited
int BIAS::ContextGLUT::windowID_
protected

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