In file graphics3D/Togl.h:

class Togl : public TclCamera3D

a TCL OpenGL camera object

Inheritance:


Public Methods

static int Init (TclModule *m)
Called upon system startup to create Togl command.
static void SetDefaultClientData (ClientData clientData)
Changes the default Client Data
CameraOGL* getClient (void) const
returns Togl client
void setSelectedClippingPlane (TclClippingPlane *cp)
selects a clipping plane: enable MOVE_CAMERA_OBJECT motion mode and set clipping plane menu
void unsetSelectedClippingPlane (void)
unselects a clipping plane: disableMOVE_CAMERA_OBJECT motion mode and dismiss clipping plane menu
void setSelectedLight (TclLight *cl)
selects a light: enable MOVE_CAMERA_OBJECT motion mode and set light menu
void unsetSelectedLight (void)
unselects a light: disableMOVE_CAMERA_OBJECT motion mode and dismiss light menu
void setSelectedObject (Data3D *data)
selects a scene object
virtual TclClippingPlane* newClippingPlane (void)
creates a new clipping plane in this camera centered on the scene and orthogonal to (0, 0, 1)
virtual TclClippingPlane* newClippingPlane (GLdouble *eqn)
creates a new clipping plane in this camera with equation equation[0] x + equation[1] y + equation[2] z + equation[3] = 0
virtual TclClippingPlane* newClippingPlane (const Vec3& P, const Vec3& n)
creates a new clipping plane in this camera passing through P and orthogonal to n
virtual Light* newLight (void)
creates a new white directional light in this camera
virtual void bindMouseMotion (bool on)
set the action to perform each time the mouse is moved
virtual void grab (const TclString& filename)
dump camera window content in an xwd file
virtual int destroyCmd (int argc, char **argv)
-destroy TCL option
int redrawCmd (int argc, char **argv)
-redraw TCL option
int projectionMatrixCmd (int argc, char **argv)
-projectionMatrix TCL option
int centerCmd (int argc, char **argv)
-center TCL option
int refCenterCmd (int argc, char **argv)
-refCenter TCL option
int scaleFactorCmd (int argc, char **argv)
-scaleFactor TCL option
int focusCmd (int argc, char **argv)
-focus TCL option
int focusOnRegionCmd (int argc, char **argv)
-focusOnRegion TCL option
int autofocusCmd (int argc, char **argv)
-autofocus TCL option
int widgetCmd (int argc, char **argv)
-widget TCL option
int menuCmd (int argc, char **argv)
-menu TCL option
int objectsCmd (int argc, char **argv)
-objects TCL option
int selectCmd (int argc, char **argv)
-select TCL option
int clippingPlanesCmd (int argc, char **argv)
-clippingPlanes TCL option
int useTwoSidesCmd (int argc, char **argv)
-useTwoSides TCL option
int lightsCmd (int argc, char **argv)
-lights TCL option
int boundingBoxColorCmd (int argc, char **argv)
-boundingBoxColor TCL option
int boundingBoxWidthCmd (int argc, char **argv)
-boundingBoxWidth TCL option
int boundingBoxDisplayCmd (int argc, char **argv)
-boundingBoxDisplay TCL option
int bgColorCmd (int argc, char **argv)
-bgColor TCL option
int sceneCmd (int argc, char **argv)
-scene TCL option
int widthCmd (int argc, char **argv)
-width TCL option
int heightCmd (int argc, char **argv)
-height TCL option
int eyeOffsetCmd (int argc, char **argv)
-eyeOffset TCL option
int fieldOfViewCmd (int argc, char **argv)
-fieldOfView TCL option
int fogCmd (int argc, char **argv)
-fog TCL option
int fogRangeCmd (int argc, char **argv)
-fogRange TCL option
int stencilBufferCmd (int argc, char **argv)
-stencilBuffer TCL option
int specularityCmd (int argc, char **argv)
-specularity TCL option
int renderFrontAndBackCmd (int argc, char **argv)
-frontAndBack TCL option
int bindMotionCmd (int argc, char **argv)
-bindMotion TCL option
int motionModeCmd (int argc, char **argv)
-motionMode TCL option
int mouseMotionCmd (int argc, char **argv)
-mouseMotion TCL option
int keyPlusCmd (int argc, char **argv)
-keyPlus TCL option
int keyMinusCmd (int argc, char **argv)
-keyMinus TCL option
int keyDownCmd (int argc, char **argv)
-keyDown TCL option
int keyUpCmd (int argc, char **argv)
-keyUp TCL option
int keyRightCmd (int argc, char **argv)
-keyRight TCL option
int keyLeftCmd (int argc, char **argv)
-keyLeft TCL option
int keyCmd (int argc, char **argv)
-key TCL option
int button1ReleasedCmd (int argc, char **argv)
-button1Released TCL option
int button2ReleasedCmd (int argc, char **argv)
-button2Released TCL option
int button3ReleasedCmd (int argc, char **argv)
-button3Released TCL option
int button1PressedCmd (int argc, char **argv)
-button1Pressed TCL option
int button2PressedCmd (int argc, char **argv)
-button2Pressed TCL option
int button3PressedCmd (int argc, char **argv)
-button3Pressed TCL option
int shiftButton1PressedCmd (int argc, char **argv)
-shiftButton1Pressed TCL option
int shiftButton2PressedCmd (int argc, char **argv)
-shiftButton2Pressed TCL option
int shiftButton3PressedCmd (int argc, char **argv)
-shiftButton3Pressed TCL option
int ctrlButton1PressedCmd (int argc, char **argv)
-ctrlButton1Pressed TCL option
int ctrlButton2PressedCmd (int argc, char **argv)
-ctrlButton2Pressed TCL option
int ctrlButton3PressedCmd (int argc, char **argv)
-ctrlButton3Pressed TCL option
int recordCmd (int argc, char **argv)
-record TCL command option
int mouselineCmd (int argc, char **argv)
-mouseline TCL command option
static int create (TclModule *m, int argc, char **argv)
creates a new 3D camera
static int list (TclModule *m, int argc, char **argv)
build a list of all available cameras
void redraw (void)
redraw scene when idle
void resize (void)
sets the viewport to (width,height) and updates camera parameters
void resize (unsigned int w, unsigned int h)
sets the viewport to (w,h) and updates camera parameters
virtual void startComputation ()
The action performed when the deformation loop of the scene is activated
virtual void stopComputation ()
The action performed when the deformation loop of the scene is de-activated
void applyObjectSelection (Data3D *obj)
Eventually install the Tcl menus associated with a 3D object
void applyObjectUnselection (Data3D *obj)
Eventually Uninstall the Tcl menus associated with a 3D object
void MakeCurrent (void) const
Bind the OpenGL rendering context to the specified Togl widget
void SwapBuffers (void) const
Call the glXSwapBuffers() to swap the buffer when using double buffering
virtual void timer_routine (void)
dummy routine that is called by Tk_CreateTimerHandler
char* GetIdent (void) const
returns the user's identification string
Tcl_Interp* GetInterp (void) const
returns the associated TCL interpretor
const TclString& getParent (void) const
returns the name of the parent widget
unsigned long AllocColor (float red, float green, float blue) const
When using color index mode, try to get a color cell as close as possible to a given (red,green,blue) color
void FreeColor (unsigned long index) const
When using color index mode, remove a color cell previously allocated by AllocColor
void SetColor (unsigned long index, float red, float green, float blue) const
When using color index mode, allocate a color cell as close as possible to a given (red,green,blue) color
GLuint LoadBitmapFont (const char *fontname) const
Load the named bitmap font as a sequence of bitmaps in a display list
void UnloadBitmapFont (GLuint fontbase) const
Release the display lists which were generated by LoadBitmapFont()
virtual void redraw_overlay (void) const
redraw as overlay the scene
void UseLayer (int layer)
defines the layer where to draw the overlay
void ShowOverlay (void)
map the overlay window
void HideOverlay (void)
unmap the overlay window
void PostOverlayRedisplay (void)
query a redisplay of the overlay window
int ExistsOverlay (void) const
whether there is an overlay window
int GetOverlayTransparentValue () const
returns the transparent pixel value
int IsMappedOverlay (void) const
returns if the overlay has been mapped
unsigned long AllocColorOverlay (float red, float green, float blue) const
When using color index mode for overlay, try to get a color cell as close as possible to a given (red,green,blue) color
void FreeColorOverlay (unsigned long index) const
When using color index mode for overlay, remove a color cell previously allocated by AllocColorOverlay
ClientData GetClientData (void) const
returns the current client_data
void SetClientData (ClientData clientData)
sets the client data
Display* GetDisplay (void) const
return the X11 Display associated with the widget
Screen* GetScreen (void) const
return the X11 Screen associated with the widget
int GetScreenNumber (void) const
return the X11 Screen number associated with the widget
Colormap GetColormap (void) const
return the X11 colormap associated with the widget
int DumpToEpsFile (const char *filename, int inColor, void (*user_redraw)(const Togl *)) const
save an OpenGL scene in a encapsulated postcript file
unsigned int getRef (void) const
returns the index of the Togl object
Togl* getHead (void) const
returns the first existing Togl object
Togl* following (void) const
returns the next Togl object in the list

Public

exception
class InvalidCommandLine : public Exception
invalid command line
class CannotMakeWindowExist : public Exception
cannot create OpenGl Window
constructor
Togl (TclModule *m, const TclString& parent, TclScene3D *scene, bool stereo = false, const std::type_info& type = typeid(Togl), CameraOGL *cam = 0) throw(InvalidCommandLine, CannotMakeWindowExist)
builds a new 3D OpenGL/TCL camera
destructor
virtual ~Togl ()
destroys a Togl

Protected

Togl Widget variables
HDC tglGLHdc
Device context of device that OpenGL calls will be drawn on
HGLRC tglGLHglrc
OpenGL rendering context to be made current
int CiColormapSize
(Maximum) size of colormap in color index mode
GLXContext GlCtx
Normal planes GLX context
Tk_Window TkWin
Tk window structure
Tcl_Interp* Interp
Tcl interpreter
Tk_Cursor Cursor
The widget's cursor
int Time
Time value for timer
int RgbaFlag
Rgba flag
int RgbaRed
Rgba flag
int RgbaGreen
Rgba green flag
int RgbaBlue
Rgba blue flag
int DoubleFlag
double buffer flag
int DepthFlag
depth flag
int DepthSize
Z-buffer depth value
int AccumFlag
Accumulation buffer flag
int AccumRed
Accumulation buffer red-component size
int AccumGreen
Accumulation buffer green-component size
int AccumBlue
Accumulation buffer blue-component size
int AccumAlpha
Accumulation buffer alpha-component size
int AlphaFlag
Alpha flag
int AlphaSize
Alpha bit size
int StencilFlag
Stencil buffer flag
int StencilSize
Stencil buffer depth size
int PrivateCmapFlag
Private Colormap flag
int OverlayFlag
Overlay flag
int AuxNumber
Auxiliairy number
char* Ident
User's identification string
ClientData Client_Data
Pointer to user data
GLboolean updatePending
should the camera be redrawn at next idle moment
GLboolean resizePending
should the camera be resized at next idle moment
GLboolean exposePending
should the camera be redrawn at next idle moment
GLXContext OverlayCtx
Overlay planes OpenGL context
HGLRC tglGLOverlayHglrc
Overlay planes OpenGL context
Window OverlayWindow
The overlay window, or 0
GLboolean OverlayUpdatePending
Should overlay be redrawn?
Colormap OverlayCmap
colormap for overlay is created
int OverlayTransparentPixel
transparent pixel
int OverlayIsMapped
whether the overlay is mapped
XVisualInfo* EpsVisual
Visual info of the current

Index2RGB Maps for Color index modes
GLfloat* EpsRedMap
Index2RGB red Map for Color index modes
GLfloat* EpsGreenMap
Index2RGB green Map for Color index modes
GLfloat* EpsBlueMap
Index2RGB blue Map for Color index modes
GLint EpsMapSize
Number of indices in our Togl
TclString parentFrame
parent window name
TclString cameraFrame
OpenGL buffer window name
TclString menuFrame
menu window name
TclString submenuFrame
submenu window name
TclString buttonFrame
buttons window name

Private Fields

static GLXContext MasterCtxt
the General OpenGL context of the camera
static HGLRC MasterCtxt
the General OpenGL context of the camera
static ClientData DefaultClientData
the default client data transmitted at the initialization of the widget
static Tcl_HashTable CommandTable
the hash table associated with the togl TCL command
static unsigned long* ToglMesaUsedPixelCells
array where is stored the used color cells when using MESAGL
static int ToglMesaUsedFreeCells
the number of used color cells when using MESAGL
static Tk_ConfigSpec configSpecs []
the array describing the syntax of the original "togl" TCL command

Private Methods

void initialize (Tk_Window tkwin)
initialize all internal flags before reading the TCL command line
int configure (int argc, char *argv[], int flags)
parse the TCL command line and eventually recreate the window and GLX context
int MakeWindowExist (void)
Modified version of Tk_MakeWindowExist
int SetupOverlay (void)
Do all the setup for overlay planes
Colormap Win32CreateCiColormap (void)
creates a colormap for Windows
static void redrawWhenIdle (ClientData clientData)
render the scene by calling CameraOGL::redraw()
static void renderOverlayWhenIdle (ClientData clientData)
render in the overlay planes by calling redraw_overlay()
static void resizeWhenIdle (ClientData clientData)
resize camera
static void Destroy (char *clientData)
destroy the widget
static void EventProc (ClientData clientData, XEvent *eventPtr)
This gets called to handle Togl window configuration events
static void Timer (ClientData)
Gets called from Tk_CreateTimerHandler
static int Widget (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
Parse the options of the Togl command
static int Cmd (ClientData clientData, Tcl_Interp *interp, int argc, char **argv) throw(InvalidCommandLine)
Called when Togl is executed - creation of a Togl widget : Creates a new window Creates an 'Togl' data structure Creates an event handler for this window Creates a command that handles this object Configures this Togl for the given arguments

Inherited from TclCamera3D:

Public Methods

TclScene3D* getScene(void) const

Public

Constructor

TclCamera3D(TclModule* m, TclScene3D *scn, const std::type_info& type = typeid(TclCamera3D), Camera3D *cam = 0)
builds and display a new camera

Desstructor

virtual ~TclCamera3D()
Destroy TclCamera2D object and associated TCL canvas

Documentation

a TCL OpenGL camera object
exception

class InvalidCommandLine: public Exception
invalid command line

class CannotMakeWindowExist: public Exception
cannot create OpenGl Window

Togl Widget variables

HDC tglGLHdc
Device context of device that OpenGL calls will be drawn on

HGLRC tglGLHglrc
OpenGL rendering context to be made current

int CiColormapSize
(Maximum) size of colormap in color index mode

GLXContext GlCtx
Normal planes GLX context

Tk_Window TkWin
Tk window structure

Tcl_Interp* Interp
Tcl interpreter

Tk_Cursor Cursor
The widget's cursor

int Time
Time value for timer

int RgbaFlag
Rgba flag

int RgbaRed
Rgba flag

int RgbaGreen
Rgba green flag

int RgbaBlue
Rgba blue flag

int DoubleFlag
double buffer flag

int DepthFlag
depth flag

int DepthSize
Z-buffer depth value

int AccumFlag
Accumulation buffer flag

int AccumRed
Accumulation buffer red-component size

int AccumGreen
Accumulation buffer green-component size

int AccumBlue
Accumulation buffer blue-component size

int AccumAlpha
Accumulation buffer alpha-component size

int AlphaFlag
Alpha flag

int AlphaSize
Alpha bit size

int StencilFlag
Stencil buffer flag

int StencilSize
Stencil buffer depth size

int PrivateCmapFlag
Private Colormap flag

int OverlayFlag
Overlay flag

int AuxNumber
Auxiliairy number

char* Ident
User's identification string

ClientData Client_Data
Pointer to user data

GLboolean updatePending
should the camera be redrawn at next idle moment

GLboolean resizePending
should the camera be resized at next idle moment

GLboolean exposePending
should the camera be redrawn at next idle moment

GLXContext OverlayCtx
Overlay planes OpenGL context

HGLRC tglGLOverlayHglrc
Overlay planes OpenGL context

Window OverlayWindow
The overlay window, or 0

GLboolean OverlayUpdatePending
Should overlay be redrawn?

Colormap OverlayCmap
colormap for overlay is created

int OverlayTransparentPixel
transparent pixel

int OverlayIsMapped
whether the overlay is mapped

XVisualInfo* EpsVisual
Visual info of the current

Index2RGB Maps for Color index modes

GLfloat* EpsRedMap
Index2RGB red Map for Color index modes

GLfloat* EpsGreenMap
Index2RGB green Map for Color index modes

GLfloat* EpsBlueMap
Index2RGB blue Map for Color index modes

GLint EpsMapSize
Number of indices in our Togl

TclString parentFrame
parent window name

TclString cameraFrame
OpenGL buffer window name

TclString menuFrame
menu window name

TclString submenuFrame
submenu window name

TclString buttonFrame
buttons window name

static GLXContext MasterCtxt
the General OpenGL context of the camera

static HGLRC MasterCtxt
the General OpenGL context of the camera

static ClientData DefaultClientData
the default client data transmitted at the initialization of the widget

static Tcl_HashTable CommandTable
the hash table associated with the togl TCL command

static unsigned long* ToglMesaUsedPixelCells
array where is stored the used color cells when using MESAGL

static int ToglMesaUsedFreeCells
the number of used color cells when using MESAGL

static Tk_ConfigSpec configSpecs[]
the array describing the syntax of the original "togl" TCL command

static int Init(TclModule *m)
Called upon system startup to create Togl command.

static void SetDefaultClientData(ClientData clientData)
Changes the default Client Data

void initialize(Tk_Window tkwin)
initialize all internal flags before reading the TCL command line

int configure(int argc, char *argv[], int flags)
parse the TCL command line and eventually recreate the window and GLX context

constructor

Togl(TclModule *m, const TclString& parent, TclScene3D *scene, bool stereo = false, const std::type_info& type = typeid(Togl), CameraOGL *cam = 0) throw(InvalidCommandLine, CannotMakeWindowExist)
builds a new 3D OpenGL/TCL camera
Throws:
InvalidCommandLine invalid command line argument transmitted to Togl command
CannotMakeWindowExist unable to create TCL window
Parameters:
m - module to build camera in
parent - parent window to create camera in (if EMPTY_STRING, camera is created in a new toplevel window)
scene - visualized scene interface
stereo - if true, allocates a new stereo buffer
type - dynamic object type
cam - client (if already created)

destructor

virtual ~Togl()
destroys a Togl

CameraOGL* getClient(void) const
returns Togl client

void setSelectedClippingPlane(TclClippingPlane *cp)
selects a clipping plane: enable MOVE_CAMERA_OBJECT motion mode and set clipping plane menu
Parameters:
cp - clipping plane to select

void unsetSelectedClippingPlane(void)
unselects a clipping plane: disableMOVE_CAMERA_OBJECT motion mode and dismiss clipping plane menu

void setSelectedLight(TclLight *cl)
selects a light: enable MOVE_CAMERA_OBJECT motion mode and set light menu
Parameters:
cl - light to select

void unsetSelectedLight(void)
unselects a light: disableMOVE_CAMERA_OBJECT motion mode and dismiss light menu

void setSelectedObject(Data3D *data)
selects a scene object
Parameters:
data - object to select

virtual TclClippingPlane* newClippingPlane(void)
creates a new clipping plane in this camera centered on the scene and orthogonal to (0, 0, 1)

virtual TclClippingPlane* newClippingPlane(GLdouble *eqn)
creates a new clipping plane in this camera with equation equation[0] x + equation[1] y + equation[2] z + equation[3] = 0

virtual TclClippingPlane* newClippingPlane(const Vec3& P, const Vec3& n)
creates a new clipping plane in this camera passing through P and orthogonal to n

virtual Light* newLight(void)
creates a new white directional light in this camera
Returns:
a TclLight object

virtual void bindMouseMotion(bool on)
set the action to perform each time the mouse is moved
Parameters:
on - if true then a specific action is performed each time the mouse is moved. If false then unbind the action

virtual void grab(const TclString& filename)
dump camera window content in an xwd file
Parameters:
filename - dump file name

virtual int destroyCmd(int argc, char **argv)
-destroy TCL option

int redrawCmd(int argc, char **argv)
-redraw TCL option

int projectionMatrixCmd(int argc, char **argv)
-projectionMatrix TCL option

int centerCmd(int argc, char **argv)
-center TCL option

int refCenterCmd(int argc, char **argv)
-refCenter TCL option

int scaleFactorCmd(int argc, char **argv)
-scaleFactor TCL option

int focusCmd(int argc, char **argv)
-focus TCL option

int focusOnRegionCmd(int argc, char **argv)
-focusOnRegion TCL option

int autofocusCmd(int argc, char **argv)
-autofocus TCL option

int widgetCmd(int argc, char **argv)
-widget TCL option

int menuCmd(int argc, char **argv)
-menu TCL option

int objectsCmd(int argc, char **argv)
-objects TCL option

int selectCmd(int argc, char **argv)
-select TCL option

int clippingPlanesCmd(int argc, char **argv)
-clippingPlanes TCL option

int useTwoSidesCmd(int argc, char **argv)
-useTwoSides TCL option

int lightsCmd(int argc, char **argv)
-lights TCL option

int boundingBoxColorCmd(int argc, char **argv)
-boundingBoxColor TCL option

int boundingBoxWidthCmd(int argc, char **argv)
-boundingBoxWidth TCL option

int boundingBoxDisplayCmd(int argc, char **argv)
-boundingBoxDisplay TCL option

int bgColorCmd(int argc, char **argv)
-bgColor TCL option

int sceneCmd(int argc, char **argv)
-scene TCL option

int widthCmd(int argc, char **argv)
-width TCL option

int heightCmd(int argc, char **argv)
-height TCL option

int eyeOffsetCmd(int argc, char **argv)
-eyeOffset TCL option

int fieldOfViewCmd(int argc, char **argv)
-fieldOfView TCL option

int fogCmd(int argc, char **argv)
-fog TCL option

int fogRangeCmd(int argc, char **argv)
-fogRange TCL option

int stencilBufferCmd(int argc, char **argv)
-stencilBuffer TCL option

int specularityCmd(int argc, char **argv)
-specularity TCL option

int renderFrontAndBackCmd(int argc, char **argv)
-frontAndBack TCL option

int bindMotionCmd(int argc, char **argv)
-bindMotion TCL option

int motionModeCmd(int argc, char **argv)
-motionMode TCL option

int mouseMotionCmd(int argc, char **argv)
-mouseMotion TCL option

int keyPlusCmd(int argc, char **argv)
-keyPlus TCL option

int keyMinusCmd(int argc, char **argv)
-keyMinus TCL option

int keyDownCmd(int argc, char **argv)
-keyDown TCL option

int keyUpCmd(int argc, char **argv)
-keyUp TCL option

int keyRightCmd(int argc, char **argv)
-keyRight TCL option

int keyLeftCmd(int argc, char **argv)
-keyLeft TCL option

int keyCmd(int argc, char **argv)
-key TCL option

int button1ReleasedCmd(int argc, char **argv)
-button1Released TCL option

int button2ReleasedCmd(int argc, char **argv)
-button2Released TCL option

int button3ReleasedCmd(int argc, char **argv)
-button3Released TCL option

int button1PressedCmd(int argc, char **argv)
-button1Pressed TCL option

int button2PressedCmd(int argc, char **argv)
-button2Pressed TCL option

int button3PressedCmd(int argc, char **argv)
-button3Pressed TCL option

int shiftButton1PressedCmd(int argc, char **argv)
-shiftButton1Pressed TCL option

int shiftButton2PressedCmd(int argc, char **argv)
-shiftButton2Pressed TCL option

int shiftButton3PressedCmd(int argc, char **argv)
-shiftButton3Pressed TCL option

int ctrlButton1PressedCmd(int argc, char **argv)
-ctrlButton1Pressed TCL option

int ctrlButton2PressedCmd(int argc, char **argv)
-ctrlButton2Pressed TCL option

int ctrlButton3PressedCmd(int argc, char **argv)
-ctrlButton3Pressed TCL option

int recordCmd(int argc, char **argv)
-record TCL command option

int mouselineCmd(int argc, char **argv)
-mouseline TCL command option

static int create(TclModule *m, int argc, char **argv)
creates a new 3D camera
Parameters:
m - module to create camera in
argc - command line number of arguments
argv - command line arguments

static int list(TclModule *m, int argc, char **argv)
build a list of all available cameras

void redraw(void)
redraw scene when idle

void resize(void)
sets the viewport to (width,height) and updates camera parameters

void resize(unsigned int w, unsigned int h)
sets the viewport to (w,h) and updates camera parameters

virtual void startComputation()
The action performed when the deformation loop of the scene is activated

virtual void stopComputation()
The action performed when the deformation loop of the scene is de-activated

void applyObjectSelection(Data3D *obj)
Eventually install the Tcl menus associated with a 3D object
Parameters:
obj - the selected object

void applyObjectUnselection(Data3D *obj)
Eventually Uninstall the Tcl menus associated with a 3D object
Parameters:
obj - the object to be unselected

void MakeCurrent(void) const
Bind the OpenGL rendering context to the specified Togl widget

void SwapBuffers(void) const
Call the glXSwapBuffers() to swap the buffer when using double buffering

virtual void timer_routine(void)
dummy routine that is called by Tk_CreateTimerHandler

char* GetIdent(void) const
returns the user's identification string

Tcl_Interp* GetInterp(void) const
returns the associated TCL interpretor

const TclString& getParent(void) const
returns the name of the parent widget

unsigned long AllocColor(float red, float green, float blue) const
When using color index mode, try to get a color cell as close as possible to a given (red,green,blue) color
Parameters:
red - the red component (between 0.0 and 1.0)
green - the green component (between 0.0 and 1.0)
blue - the blue component (between 0.0 and 1.0)

void FreeColor(unsigned long index) const
When using color index mode, remove a color cell previously allocated by AllocColor
Parameters:
index - the index of the color in the colormap

void SetColor(unsigned long index, float red, float green, float blue) const
When using color index mode, allocate a color cell as close as possible to a given (red,green,blue) color
Parameters:
red - the red component (between 0.0 and 1.0)
green - the green component (between 0.0 and 1.0)
blue - the blue component (between 0.0 and 1.0)

GLuint LoadBitmapFont(const char *fontname) const
Load the named bitmap font as a sequence of bitmaps in a display list. fontname may be one of the predefined fonts like TOGL_BITMAP_8_BY_13 or an X font name, or a Windows font name, etc.

void UnloadBitmapFont(GLuint fontbase) const
Release the display lists which were generated by LoadBitmapFont()

virtual void redraw_overlay(void) const
redraw as overlay the scene

void UseLayer(int layer)
defines the layer where to draw the overlay
Parameters:
layer - either TOGL_OVERLAY or TOGL_NORMAL

void ShowOverlay(void)
map the overlay window

void HideOverlay(void)
unmap the overlay window

void PostOverlayRedisplay(void)
query a redisplay of the overlay window

int ExistsOverlay(void) const
whether there is an overlay window
Returns:
boolean

int GetOverlayTransparentValue() const
returns the transparent pixel value
Returns:
the index in the colormap of the transparent pixel

int IsMappedOverlay(void) const
returns if the overlay has been mapped

unsigned long AllocColorOverlay(float red, float green, float blue) const
When using color index mode for overlay, try to get a color cell as close as possible to a given (red,green,blue) color
Parameters:
red - the red component (between 0.0 and 1.0)
green - the green component (between 0.0 and 1.0)
blue - the blue component (between 0.0 and 1.0)

void FreeColorOverlay(unsigned long index) const
When using color index mode for overlay, remove a color cell previously allocated by AllocColorOverlay
Parameters:
index - the index of the color in the colormap

ClientData GetClientData(void) const
returns the current client_data

void SetClientData(ClientData clientData)
sets the client data

Display* GetDisplay(void) const
return the X11 Display associated with the widget
Returns:
the X11 Display

Screen* GetScreen(void) const
return the X11 Screen associated with the widget
Returns:
the X11 Screen

int GetScreenNumber(void) const
return the X11 Screen number associated with the widget
Returns:
the X11 Screen number

Colormap GetColormap(void) const
return the X11 colormap associated with the widget
Returns:
the X11 colormap

int DumpToEpsFile(const char *filename, int inColor, void (*user_redraw)(const Togl *)) const
save an OpenGL scene in a encapsulated postcript file
Returns:
0 if no problems were encountered, 1 if there is a color allocation problem, 2 if there is a problem when opening the file
Parameters:
filename - the name of the file where to write the Postcript
inColor - boolean indicating if the image should be considered as a color or grey level image
user_redraw - a routine that should draw the scene by using OpenGL calls

unsigned int getRef(void) const
returns the index of the Togl object
Returns:
the index of the Togl in the list of Togl objects

Togl* getHead(void) const
returns the first existing Togl object
Returns:
the first existing Togl object

Togl* following(void) const
returns the next Togl object in the list
Returns:
the next Togl object in the list

int MakeWindowExist(void)
Modified version of Tk_MakeWindowExist.Creates an OpenGL window for the Togl widget.
Returns:
TCL_OK or TCL_ERROR

int SetupOverlay(void)
Do all the setup for overlay planes
Returns:
TCL_OK or TCL_ERROR

Colormap Win32CreateCiColormap(void)
creates a colormap for Windows
Returns:
colormap

static void redrawWhenIdle(ClientData clientData)
render the scene by calling CameraOGL::redraw()
Parameters:
clientData - pointer to a Togl casted as ClientData

static void renderOverlayWhenIdle(ClientData clientData)
render in the overlay planes by calling redraw_overlay()
Parameters:
clientData - pointer to a Togl casted as ClientData

static void resizeWhenIdle(ClientData clientData)
resize camera
Parameters:
clientData - pointer to a Togl casted as ClientData

static void Destroy(char *clientData)
destroy the widget
Parameters:
clientData - pointer to a Togl casted as ClientData

static void EventProc(ClientData clientData, XEvent *eventPtr)
This gets called to handle Togl window configuration events
Parameters:
clientData - pointer to a Togl casted as ClientData
eventPtr - the event to be handled by the procedure

static void Timer(ClientData)
Gets called from Tk_CreateTimerHandler
Parameters:
clientData - pointer to a Togl casted as ClientData

static int Widget(ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
Parse the options of the Togl command
Returns:
TCL_OK or TCL_ERROR
Parameters:
clientData - pointer to a Togl casted as ClientData
interp - the TCL interpretor
argc - the number of parameters
argv - the array of parameters (argv[0] is the name of the Togl Object)

static int Cmd(ClientData clientData, Tcl_Interp *interp, int argc, char **argv) throw(InvalidCommandLine)
Called when Togl is executed - creation of a Togl widget : Creates a new window Creates an 'Togl' data structure Creates an event handler for this window Creates a command that handles this object Configures this Togl for the given arguments
Throws:
InvalidCommandLine it is thrown when there are no parameters transmitted i.e. the number of parameters (argc) is equal to 1
Returns:
TCL_OK or TCL_ERROR
Parameters:
clientData - pointer to a Togl casted as ClientData
interp - the TCL interpretor
argc - the number of parameters
argv - the array of parameters (argv[0] is the name of the Togl Object)


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de