OpenCLTemplate.CLGLInterop.GLRender Class Reference

OpenGL render control. More...

List of all members.

Classes

class  GLFont
 OpenGL 3D font creator. More...
class  GLVBOModel
 OpenGL Model created from vertex buffer objects. More...
class  OpenCLDispSrc

Public Types

enum  MouseMoveMode {
  RotateModel, TranslateModel, Mouse3D, None,
  RotateModel, TranslateModel, Mouse3D, None
}
 

Mouse action when used to move the 3D Model.

More...
enum  MouseMoveMode {
  RotateModel, TranslateModel, Mouse3D, None,
  RotateModel, TranslateModel, Mouse3D, None
}
 

Mouse action when used to move the 3D Model.

More...

Public Member Functions

 GLRender (System.Windows.Forms.Form ParentForm, bool CreateCLGLCtx, int DeviceNumber)
 Constructor. Adds a OpenGL Control to desired form.
delegate void Mouse3DEvent (object sender, MouseEventArgs e, Vector Mouse3DPos, float Mouse3DRadius)
 Mouse 3D event.
void Fly (Vector Distance)
 Function to advance view and allow "fly" simulations.
void Create3DMouseModel (float[] Color)
 Creates a 3D Model for the mouse.
void Reset3DMousePos ()
 Resets 3D mouse position to center of view.
void Translate3DMouseXY (float x, float y, float dz)
 Translates 3D mouse to a given Left - Top.
void Increment3DMousePos (float dx, float dy, float dz)
 Increments current mouse position.
void ShowAllElements ()
 Undoes all hide operations and shows all elements.
void ReDraw ()
 Forces the control to redraw its contents.
delegate void VoidFunc ()
 Void function delegate.
void SetCenter (Vector NewCenter)
 Sets center of camera and recalculates appropriate vectors.
void SetDistance (double Distance)
 Sets the camera distance from the center of where it's looking.
Vector GetCenter ()
 Gets camera center (the center of where the camera is looking at).
double GetDistance ()
 Gets camera distance from the center.
 GLRender (System.Windows.Forms.Form ParentForm, bool CreateCLGLCtx, int DeviceNumber)
 Constructor. Adds a OpenGL Control to desired form.
void Fly (Vector Distance)
 Function to advance view and allow "fly" simulations.
void Create3DMouseModel (float[] Color)
 Creates a 3D Model for the mouse.
void Reset3DMousePos ()
 Resets 3D mouse position to center of view.
void Translate3DMouseXY (float x, float y, float dz)
 Translates 3D mouse to a given Left - Top.
void Increment3DMousePos (float dx, float dy, float dz)
 Increments current mouse position.
void ShowAllElements ()
 Undoes all hide operations and shows all elements.
void ReDraw ()
 Forces the control to redraw its contents.
delegate void VoidFunc ()
 Void function delegate.
void SetCenter (Vector NewCenter)
 Sets center of camera and recalculates appropriate vectors.
void SetDistance (double Distance)
 Sets the camera distance from the center of where it's looking.
Vector GetCenter ()
 Gets camera center (the center of where the camera is looking at).
double GetDistance ()
 Gets camera distance from the center.

Static Public Member Functions

static void ApplyTexture (Bitmap TextureBitmap, ref int ind)
 Copies bitmap data to a OpenGL texture.

Public Attributes

GLControl GLCtrl
 OpenGL control.
MouseMoveMode MouseMode = MouseMoveMode.RotateModel
 Mouse rotation mode.
float zFar = 1000.0f
 Far distance to clip at.
float zNear = 1.0f
 Near distance to clip at.
GLVBOModel Mouse3D
 Mouse 3D model.
ToolStripStatusLabel lblMouseToCenterDist
 Show mouse to center distance in this label if not null.
List< GLVBOModelModels = new List<GLVBOModel>()
 List of OpenGL VBOs to draw.
bool StereoscopicDraw = false
 Draw in stereographic projection?
float StereoDistance = 0.005f
 Stereographic distance.
float[] ClearColor = new float[3] { 0.0f, 0.0f, 0.0f }
 Background color.
VoidFunc PreDrawFunc
 Function to be invoked prior to every drawing.
bool DrawAxes = true
 Draw axes at center?

Events

Mouse3DEvent Mouse3DDown
 Raised when user clicks mouse button in environment using Mouse3D mode.
Mouse3DEvent Mouse3DUp
 Raised when user releases mouse button in environment using Mouse3D mode.
Mouse3DEvent Mouse3DMove
 Raised when user moves 3D mouse in environment using Mouse3D mode.

Detailed Description

OpenGL render control.


Member Enumeration Documentation

Mouse action when used to move the 3D Model.

Enumerator:
RotateModel 

Mouse rotation mode index.

TranslateModel 

Mouse translation mode index.

Mouse3D 

Enter 3D mousing mode.

None 

No mouse movement.

RotateModel 

Mouse rotation mode index.

TranslateModel 

Mouse translation mode index.

Mouse3D 

Enter 3D mousing mode.

None 

No mouse movement.

Mouse action when used to move the 3D Model.

Enumerator:
RotateModel 

Mouse rotation mode index.

TranslateModel 

Mouse translation mode index.

Mouse3D 

Enter 3D mousing mode.

None 

No mouse movement.

RotateModel 

Mouse rotation mode index.

TranslateModel 

Mouse translation mode index.

Mouse3D 

Enter 3D mousing mode.

None 

No mouse movement.


Constructor & Destructor Documentation

OpenCLTemplate.CLGLInterop.GLRender.GLRender ( System.Windows.Forms.Form  ParentForm,
bool  CreateCLGLCtx,
int  DeviceNumber 
)

Constructor. Adds a OpenGL Control to desired form.

Parameters:
ParentForm OpenGL control parent form
CreateCLGLCtx Create OpenGL/OpenCL shared context?
DeviceNumber Index of device to use from ComputePlatform.Platforms[0].Devices. Use -1 for default
OpenCLTemplate.CLGLInterop.GLRender.GLRender ( System.Windows.Forms.Form  ParentForm,
bool  CreateCLGLCtx,
int  DeviceNumber 
)

Constructor. Adds a OpenGL Control to desired form.

Parameters:
ParentForm OpenGL control parent form
CreateCLGLCtx Create OpenGL/OpenCL shared context?
DeviceNumber Index of device to use from ComputePlatform.Platforms[0].Devices. Use -1 for default

Member Function Documentation

static void OpenCLTemplate.CLGLInterop.GLRender.ApplyTexture ( Bitmap  TextureBitmap,
ref int  ind 
) [static]

Copies bitmap data to a OpenGL texture.

Parameters:
TextureBitmap Bitmap to be copied to OpenGL memory
ind A valid OpenGL texture generated with GLGenTexture. If less than zero a new OpenGL texture is created and stored in ind
void OpenCLTemplate.CLGLInterop.GLRender.Create3DMouseModel ( float[]  Color  ) 

Creates a 3D Model for the mouse.

Parameters:
Color Desired color
void OpenCLTemplate.CLGLInterop.GLRender.Create3DMouseModel ( float[]  Color  ) 

Creates a 3D Model for the mouse.

Parameters:
Color Desired color
void OpenCLTemplate.CLGLInterop.GLRender.Fly ( Vector  Distance  ) 

Function to advance view and allow "fly" simulations.

Parameters:
Distance Distance to fly
void OpenCLTemplate.CLGLInterop.GLRender.Fly ( Vector  Distance  ) 

Function to advance view and allow "fly" simulations.

Parameters:
Distance Distance to fly
Vector OpenCLTemplate.CLGLInterop.GLRender.GetCenter (  ) 

Gets camera center (the center of where the camera is looking at).

Vector OpenCLTemplate.CLGLInterop.GLRender.GetCenter (  ) 

Gets camera center (the center of where the camera is looking at).

double OpenCLTemplate.CLGLInterop.GLRender.GetDistance (  ) 

Gets camera distance from the center.

double OpenCLTemplate.CLGLInterop.GLRender.GetDistance (  ) 

Gets camera distance from the center.

void OpenCLTemplate.CLGLInterop.GLRender.Increment3DMousePos ( float  dx,
float  dy,
float  dz 
)

Increments current mouse position.

Parameters:
dx Left relative value
dy Up relative value
dz Z (depth) relative value
void OpenCLTemplate.CLGLInterop.GLRender.Increment3DMousePos ( float  dx,
float  dy,
float  dz 
)

Increments current mouse position.

Parameters:
dx Left relative value
dy Up relative value
dz Z (depth) relative value
delegate void OpenCLTemplate.CLGLInterop.GLRender.Mouse3DEvent ( object  sender,
MouseEventArgs  e,
Vector  Mouse3DPos,
float  Mouse3DRadius 
)

Mouse 3D event.

Parameters:
sender Sender
e 2D events raised in this instance (picture X, Y and buttons)
Mouse3DPos Mouse 3D position
Mouse3DRadius Mouse 3D radius
void OpenCLTemplate.CLGLInterop.GLRender.ReDraw (  ) 

Forces the control to redraw its contents.

void OpenCLTemplate.CLGLInterop.GLRender.ReDraw (  ) 

Forces the control to redraw its contents.

void OpenCLTemplate.CLGLInterop.GLRender.Reset3DMousePos (  ) 

Resets 3D mouse position to center of view.

void OpenCLTemplate.CLGLInterop.GLRender.Reset3DMousePos (  ) 

Resets 3D mouse position to center of view.

void OpenCLTemplate.CLGLInterop.GLRender.SetCenter ( Vector  NewCenter  ) 

Sets center of camera and recalculates appropriate vectors.

Parameters:
NewCenter Desired center
void OpenCLTemplate.CLGLInterop.GLRender.SetCenter ( Vector  NewCenter  ) 

Sets center of camera and recalculates appropriate vectors.

Parameters:
NewCenter Desired center
void OpenCLTemplate.CLGLInterop.GLRender.SetDistance ( double  Distance  ) 

Sets the camera distance from the center of where it's looking.

Parameters:
Distance New distance
void OpenCLTemplate.CLGLInterop.GLRender.SetDistance ( double  Distance  ) 

Sets the camera distance from the center of where it's looking.

Parameters:
Distance New distance
void OpenCLTemplate.CLGLInterop.GLRender.ShowAllElements (  ) 

Undoes all hide operations and shows all elements.

void OpenCLTemplate.CLGLInterop.GLRender.ShowAllElements (  ) 

Undoes all hide operations and shows all elements.

void OpenCLTemplate.CLGLInterop.GLRender.Translate3DMouseXY ( float  x,
float  y,
float  dz 
)

Translates 3D mouse to a given Left - Top.

Parameters:
x Left relative value, 0 to 1
y Up relative value, 0 to 1
dz Z (depth) relative value
void OpenCLTemplate.CLGLInterop.GLRender.Translate3DMouseXY ( float  x,
float  y,
float  dz 
)

Translates 3D mouse to a given Left - Top.

Parameters:
x Left relative value, 0 to 1
y Up relative value, 0 to 1
dz Z (depth) relative value
delegate void OpenCLTemplate.CLGLInterop.GLRender.VoidFunc (  ) 

Void function delegate.

delegate void OpenCLTemplate.CLGLInterop.GLRender.VoidFunc (  ) 

Void function delegate.


Member Data Documentation

float [] OpenCLTemplate.CLGLInterop.GLRender.ClearColor = new float[3] { 0.0f, 0.0f, 0.0f }

Background color.

Draw axes at center?

OpenGL control.

Show mouse to center distance in this label if not null.

List of OpenGL VBOs to draw.

Mouse 3D model.

Mouse rotation mode.

Function to be invoked prior to every drawing.

Stereographic distance.

Draw in stereographic projection?

Far distance to clip at.

Near distance to clip at.


Event Documentation

Mouse3DEvent OpenCLTemplate.CLGLInterop.GLRender.Mouse3DDown

Raised when user clicks mouse button in environment using Mouse3D mode.

Mouse3DEvent OpenCLTemplate.CLGLInterop.GLRender.Mouse3DMove

Raised when user moves 3D mouse in environment using Mouse3D mode.

Mouse3DEvent OpenCLTemplate.CLGLInterop.GLRender.Mouse3DUp

Raised when user releases mouse button in environment using Mouse3D mode.

Generated on Sun Dec 4 17:27:03 2011 for OpenCLTemplate by  doxygen 1.6.3