Main Page | Packages | Class Hierarchy | Class List | Directories | Class Members

IDVR.OpenGLCanvas Class Reference

#include <OpenGLCanvas.h>

Inheritance diagram for IDVR.OpenGLCanvas:

IDVR.Interfaces.IOpenGLCanvas List of all members.

Detailed Description

Class for the openGL canvas.

namespace: IDVR

Baseclass: System::Windows::Forms::Form, IDVR.Interfaces.IOpenGLCanvas

This is the class, where the rendered image is drawn to. It also provides methos to draw a proxy object and to visualize the light direction.

Author:
Christopher Thurnher
Version:
1.0
Date:
02-20-2005


Public Member Functions

 OpenGLCanvas (int n_LoactionX, int n_LocationY, int n_Width, int n_Heigth, int n_CanvasWidth, int n_CanvasHeight, Color n_CanvasBackColor)
 Constructor.
__property void set_Size (int n_Width, int n_Height)
 Sets the size of the openGL canvas.
__property void set_OpenGLCanvasSize (int n_Width, int n_Height)
 Sets the size of the openGL panel.
__property void set_ImagePlaneModel (ImagePlane *n_ImagePlane)
 Sets the image plane.
__property void set_DrawModel (DrawModelGLSW *n_DrawModelGLSW)
 Sets the draw model.
__property void set_LightModel (Light *n_LightModel)
 Sets the light model.
__property void set_ProxyObject (ProxyObjectGL *n_ProxyObject)
 Sets the proxy object.
__property void set_SystemStatus (unsigned char n_Status)
 Sets the status.
__property void set_CanvasBackColor (Color n_CanvasBackColor)
 Sets the background color of the openGL canvas.
__property ImagePlane * get_ImagePlaneModel (void)
 Returns the image plane.
__property DrawModelGLSW * get_DrawModel (void)
 Returns the draw model.
__property ProxyObjectGL * get_ProxyObject (void)
 Returns the proxy object.
void setLightDirectionPanel (StatusBarPanel *n_LightDirectionPanel)
 Sets the light direction panel.
void setViewDirectionPanel (StatusBarPanel *n_ViewDirectionPanel)
 Sets the view direction panel.
void setProxyObjectTransMatrix (Matrix4 *n_TransMatrix)
 Sets the transform matrix of the proxy object.
void setLightViewMode (unsigned char n_LightViewMode)
 Sets the light view mode.
OpenGLPanel::OpenGLPanel * getCanvas (void)
 Returns the openGL canvas.
void createProxyObjectGL (int n_CanvasLength, float n_RelLength __gc[], Matrix4 *n_TransMatrix)
 Creates the proxy object.
void createProxyObjectGL (int n_CanvasLength, float n_RelLength __gc[])
 Creates the proxy object.
void createDrawModelGLSW (int n_Width, int n_Height, short n_Resolution)
 Creates the draw object.
void createLightObjectGL (int n_CanvasLength, Light *n_LightModel)
 Creates the light object.
void createLightObjectGL (int n_CanvasLength, Light *n_LightModel, Matrix4 *n_TransMatrix)
 Creates the light object.
void modifyProxyObjectTransMatrix (Matrix4 *n_TransMatrix)
 Modifies the transform matrix of the proxy object.
void modifyLightObjectGLOffsetRotation (Matrix4 *n_OffsetRotation)
 Modifies the offset rotation matrix of the light object.
void modifyLightObjectGLBaseRotation (Matrix4 *n_BaseRotation)
 Modifies the base rotation matrix of the light object.
virtual void drawImage (unsigned char n_FrameBuffer __gc[])
 Draws the framebuffer to the openGL canvas.
void drawProxy (void)
 Draws the proxy object.
void clearCanvas (void)
 Clears the openGL canvas.
void drawLightArrow (void)
 Draws the light arrow.
void resetViewPointPosition (void)
 Resets the view parameters to default values.
void resetLightDirection (void)
 Resets the light direction to default values.

Private Member Functions

void InitializeComponent (void)
 Initializes the GUI components.
System::Void sizeChanged (System::Object *sender, System::EventArgs *e)
 Eventhandler for size changed events.
System::Void sizeChanged_OpenGLCanvas (System::Object *sender, System::EventArgs *e)
 Eventhandler for size changed events.
System::Void mouseDown_OpenGLCanvas (System::Object *sender, System::Windows::Forms::MouseEventArgs *e)
 Eventhandler for mouse down events.
System::Void mouseUp_OpenGLCanvas (System::Object *sender, System::Windows::Forms::MouseEventArgs *e)
 Eventhandler for mouse up events.
System::Void mouseMove_OpenGLCanvas (System::Object *sender, System::Windows::Forms::MouseEventArgs *e)
 Eventhandler for mouse move events.
System::Void mouseWheel_OpenGLCanvas (System::Object *sender, System::Windows::Forms::MouseEventArgs *e)
 Eventhandler for mouse wheel events.
System::Void m_OpenGLPanel_DoubleClick (System::Object *sender, System::EventArgs *e)
 Eventhandler for double click events.

Private Attributes

OpenGLPanel::OpenGLPanel * m_OpenGLPanel
 The openGL panel.
ImagePlanem_ImagePlane
 The image plane.
Lightm_MainLight
 The main light.
Lightm_ProxyLight
 The light object for the proxy objet.
DrawModelGLSWm_DrawModel
 The draw model.
ProxyObjectGLm_ProxyObject
 The proxy object.
LightObjectGLm_LightObject
 The light object.
ClearCanvasGLm_ClearCanvasGL
 Object to clear the canvas.
Color m_CanvasBackColor
 Background color of the canvas.
StatusBarPanel * m_LightDirectionPanel
 Panel for the light direction.
StatusBarPanel * m_ViewDirectionPanel
 Panel for the view direction.
bool m_IsProxyObjectDrawn
 flag for the proxy object
bool m_IsResultDrawn
 flag for the result
bool m_IsLightObjectDrawn
 flag for the light object
bool m_IsLeftMouseButton
 flag for the left mouse button
bool m_IsRightMouseButton
 flag for the right mouse button
unsigned char m_Status
 Status.
unsigned char m_LightViewMode
 Light view mode.
ArcBallm_ArcBallProxy
 Arcball for the proxy object.
ArcBallm_ArcBallWorld
 Arcball for the world.
Matrix4m_ThisRotProxy
 New rotation matrix of the proxy object.
Matrix4m_LastRotProxy
 Last rotation matrix of the proxy object.
Matrix4m_TransformMatrixProxy
 Transform matrix of the proxy object.
Matrix4m_ThisRotWorld
 New rotation matrix of the world.
Matrix4m_LastRotWorld
 Last rotation matrix of the world.
Matrix4m_TransformMatrixWorld
 Transform matrix of the world.
Matrix4m_CurrentTransformWorld
 The current transform matrix.
PointF m_BeginPointLightRotation
 Point, that marks the begin of the light rotation.
PointF m_EndPointLightRotation
 Point, that marks the end of the light rotation.

Static Private Attributes

static const char NODATALOADED = 0
 No data loaded.
static const char READY = 1
 Ready.
static const char RENDERING = 2
 Rendering.


Constructor & Destructor Documentation

IDVR.OpenGLCanvas.OpenGLCanvas int  n_LoactionX,
int  n_LocationY,
int  n_Width,
int  n_Heigth,
int  n_CanvasWidth,
int  n_CanvasHeight,
Color  n_CanvasBackColor
 

Constructor.

Parameters:
n_LoactionX The x-location of the canvas.
n_LocationY The Y-location of the canvas.
n_Width The width of the openGL canvas.
n_Heigth The height of the openGL canvas.
n_CanvasWidth The width of the openGL panel.
n_CanvasHeight The height of the openGL panel.
n_CanvasBackColor The background color of the canvas.


Member Function Documentation

void OpenGLCanvas::clearCanvas void   ) 
 

Clears the openGL canvas.

void OpenGLCanvas::createDrawModelGLSW int  n_Width,
int  n_Height,
short  n_Resolution
 

Creates the draw object.

Parameters:
n_Width the width of the openGL canvas.
n_Height the height of the openGL canvas.
n_Resolution the resolution of the openGL canvas.

void OpenGLCanvas::createLightObjectGL int  n_CanvasLength,
Light *  n_LightModel,
Matrix4 *  n_TransMatrix
 

Creates the light object.

Parameters:
n_CanvasLength the canvas lenght.
n_LightModel the light model.
n_TransMatrix the transform matrix.

void OpenGLCanvas::createLightObjectGL int  n_CanvasLength,
Light *  n_LightModel
 

Creates the light object.

Parameters:
n_CanvasLength the canvas lenght.
n_LightModel the light model.

void OpenGLCanvas::createProxyObjectGL int  n_CanvasLength,
float n_RelLength  __gc[]
 

Creates the proxy object.

Parameters:
n_CanvasLength the canvas lenght.
n_RelLength the realtive lenght of the proxy object.

void OpenGLCanvas::createProxyObjectGL int  n_CanvasLength,
float n_RelLength  __gc[],
Matrix4 *  n_TransMatrix
 

Creates the proxy object.

Parameters:
n_CanvasLength the canvas lenght.
n_RelLength the realtive lenght of the proxy object.
n_TransMatrix the transform matrix.

void OpenGLCanvas::drawImage unsigned char n_FrameBuffer  __gc[]  )  [virtual]
 

Draws the framebuffer to the openGL canvas.

Parameters:
n_FrameBuffer the framebuffer.

void OpenGLCanvas::drawLightArrow void   ) 
 

Draws the light arrow.

void OpenGLCanvas::drawProxy void   ) 
 

Draws the proxy object.

DrawModelGLSW * OpenGLCanvas::get_DrawModel void   ) 
 

Returns the draw model.

Returns:
The draw model.

ImagePlane * OpenGLCanvas::get_ImagePlaneModel void   ) 
 

Returns the image plane.

Returns:
The image plane.

ProxyObjectGL * OpenGLCanvas::get_ProxyObject void   ) 
 

Returns the proxy object.

Returns:
The proxy object.

OpenGLPanel::OpenGLPanel * OpenGLCanvas::getCanvas void   ) 
 

Returns the openGL canvas.

Returns:
The openGL canvas.

System::Void IDVR.OpenGLCanvas.m_OpenGLPanel_DoubleClick System::Object *  sender,
System::EventArgs *  e
[private]
 

Eventhandler for double click events.

Parameters:
sender the sender.
e the event.

void OpenGLCanvas::modifyLightObjectGLBaseRotation Matrix4 *  n_BaseRotation  ) 
 

Modifies the base rotation matrix of the light object.

Parameters:
n_BaseRotation the base rotation matrix.

void OpenGLCanvas::modifyLightObjectGLOffsetRotation Matrix4 *  n_OffsetRotation  ) 
 

Modifies the offset rotation matrix of the light object.

Parameters:
n_OffsetRotation the offset rotation matrix.

void OpenGLCanvas::modifyProxyObjectTransMatrix Matrix4 *  n_TransMatrix  ) 
 

Modifies the transform matrix of the proxy object.

Parameters:
n_TransMatrix the transform matrix.

System::Void IDVR.OpenGLCanvas.mouseDown_OpenGLCanvas System::Object *  sender,
System::Windows::Forms::MouseEventArgs *  e
[private]
 

Eventhandler for mouse down events.

Parameters:
sender the sender.
e the event.

System::Void IDVR.OpenGLCanvas.mouseMove_OpenGLCanvas System::Object *  sender,
System::Windows::Forms::MouseEventArgs *  e
[private]
 

Eventhandler for mouse move events.

Parameters:
sender the sender.
e the event.

System::Void IDVR.OpenGLCanvas.mouseUp_OpenGLCanvas System::Object *  sender,
System::Windows::Forms::MouseEventArgs *  e
[private]
 

Eventhandler for mouse up events.

Parameters:
sender the sender.
e the event.

System::Void IDVR.OpenGLCanvas.mouseWheel_OpenGLCanvas System::Object *  sender,
System::Windows::Forms::MouseEventArgs *  e
[private]
 

Eventhandler for mouse wheel events.

Parameters:
sender the sender.
e the event.

void OpenGLCanvas::resetLightDirection void   ) 
 

Resets the light direction to default values.

void OpenGLCanvas::resetViewPointPosition void   ) 
 

Resets the view parameters to default values.

void OpenGLCanvas::set_CanvasBackColor Color  n_CanvasBackColor  ) 
 

Sets the background color of the openGL canvas.

Parameters:
n_CanvasBackColor the background color of the openGL canvas.

void OpenGLCanvas::set_DrawModel DrawModelGLSW *  n_DrawModelGLSW  ) 
 

Sets the draw model.

Parameters:
n_DrawModelGLSW the draw model.

void OpenGLCanvas::set_ImagePlaneModel ImagePlane *  n_ImagePlane  ) 
 

Sets the image plane.

Parameters:
n_ImagePlane the image plane.

void OpenGLCanvas::set_LightModel Light *  n_LightModel  ) 
 

Sets the light model.

Parameters:
n_LightModel the light model.

void OpenGLCanvas::set_OpenGLCanvasSize int  n_Width,
int  n_Height
 

Sets the size of the openGL panel.

Parameters:
n_Width the width of the openGL panel.
n_Height the height of the openGL panel.

void OpenGLCanvas::set_ProxyObject ProxyObjectGL *  n_ProxyObject  ) 
 

Sets the proxy object.

Parameters:
n_ProxyObject the proxy object.

void OpenGLCanvas::set_Size int  n_Width,
int  n_Height
 

Sets the size of the openGL canvas.

Parameters:
n_Width the width of the openGL canvas.
n_Height the height of the openGL canvas.

void OpenGLCanvas::set_SystemStatus unsigned char  n_Status  ) 
 

Sets the status.

Parameters:
n_Status the status.

void OpenGLCanvas::setLightDirectionPanel StatusBarPanel *  n_LightDirectionPanel  ) 
 

Sets the light direction panel.

Parameters:
n_LightDirectionPanel the light direction panel.

void OpenGLCanvas::setLightViewMode unsigned char  n_LightViewMode  ) 
 

Sets the light view mode.

Parameters:
n_LightViewMode the light view mode.

void OpenGLCanvas::setProxyObjectTransMatrix Matrix4 *  n_TransMatrix  ) 
 

Sets the transform matrix of the proxy object.

Parameters:
n_TransMatrix the transform matrix of the proxy object.

void OpenGLCanvas::setViewDirectionPanel StatusBarPanel *  n_ViewDirectionPanel  ) 
 

Sets the view direction panel.

Parameters:
n_ViewDirectionPanel view direction panel.

System::Void IDVR.OpenGLCanvas.sizeChanged System::Object *  sender,
System::EventArgs *  e
[private]
 

Eventhandler for size changed events.

Parameters:
sender the sender.
e the event.

System::Void IDVR.OpenGLCanvas.sizeChanged_OpenGLCanvas System::Object *  sender,
System::EventArgs *  e
[private]
 

Eventhandler for size changed events.

Parameters:
sender the sender.
e the event.


The documentation for this class was generated from the following files:
Generated on Sat Apr 9 11:50:59 2005 for RayCaster wiht Importance Driven Volume Rendering (IDVR) by  doxygen 1.4.1