class grRender

Window system intarface

Public Methods

[more] grRender()
Default constructor
[more]void SetInitScene( grNode * n )
One-shot scene setting
[more]void SetRunScene( grNode * n )
Rendering scene setting
[more]void Render()
Run-time rendering
[more]void Init()
Setup rendering
[more]void PortSize( int & w, int & h )
Current window size
[more]void ReadPixel( GLenum format, GLenum type, GLvoid * mem )
Read the frame-buffer
[more]void PickNodes( int x, int y, double wx, double wy, grPickResult & pr )
Selection function
[more]int PickInNode( int x, int y, double wx, double wy, grNode * node )
Selection function
[more]bool Pick( int x, int y, double wx, double wy, grNode * & node, int & prim )
Selection function
[more]void grViewAll( const grVertex3f & vert)
Camera set tool
[more]void grViewAll( const Boxd & boundbox )
Camera set tool
[more]void grViewAll( const Boxf & boundbox )
Camera set tool
[more]BOOL OnCreate( void * hwnd )
create callback
[more]void OnDestroy( void * hwnd )
destroy callback
[more]void OnSize( void * hwnd, int w, int h )
resize callback


Documentation

Window system intarface. This class implements the main window system interface. The system framework must use a grRender object for scene rendering and user interaction.
o grRender()
Default constructor.

ovoid SetInitScene( grNode * n )
One-shot scene setting. The user MAY use this function to setup the one-shot scene. The one-shot scene is renderend once during startup and contain all the general static settings.

ovoid SetRunScene( grNode * n )
Rendering scene setting. The user MUST use this function to setup the rendering scene. The rendering scene is rendered multiple time for visualization porpouse.

ovoid Render()
Run-time rendering. This callback must be used by the system framework to rendering the scene (i.e. by the OnDraw callback).

ovoid Init()
Setup rendering. This callback must be used by the system framework to rendering the inizialization scene, after the SetInitScene function. (i.e. on InitialUpdate callback).

ovoid PortSize( int & w, int & h )
Current window size. This function read the current window size.
Parameters:
w - width of the window.
h - height of the window

ovoid ReadPixel( GLenum format, GLenum type, GLvoid * mem )
Read the frame-buffer. This function read the frame-buffer picture.
Parameters:
format - see opengl:glReadPixels for the list of formats
type - see opengl:glReadPixels for the list of types
mem - pointer of image memory (allocated by user!)

ovoid PickNodes( int x, int y, double wx, double wy, grPickResult & pr )
Selection function. The user may use this function to implement the selection of a set of nodes.
Parameters:
x - horizontal mouse position
y - vertical size position
wx - x selection range (in pixel)
wy - y selection range (in pixel)
pr - set of nodes selected
See Also:
grPickResult

oint PickInNode( int x, int y, double wx, double wy, grNode * node )
Selection function. The user may use this function to implement the selection of a particular primitive of the spefied node.
Returns:
the index of the selected node primive, -1 if none.
Parameters:
x - horizontal mouse position
y - vertical size position
wx - x selection range (in pixel)
wy - y selection range (in pixel)
pr - pointer of a selected node

obool Pick( int x, int y, double wx, double wy, grNode * & node, int & prim )
Selection function. The user may use this function to implement the selection of a single node.
Returns:
true if a node is selected, false otherwise
Parameters:
x - horizontal mouse position
y - vertical size position
wx - x selection range (in pixel)
wy - y selection range (in pixel)
node - the node selected
prim - index of the picked node primitive

ovoid grViewAll( const grVertex3f & vert)
Camera set tool. This function set the current camera position for best viewing of the specified set of vertices.

ovoid grViewAll( const Boxd & boundbox )
Camera set tool. This function set the current camera position for best viewing of the specified bonding box.

ovoid grViewAll( const Boxf & boundbox )
Camera set tool. This function set the current camera position for best viewing of the specified bonding box.

oBOOL OnCreate( void * hwnd )
create callback. This function must be called by the system framework after the window creation (i.e. on OnCreate callback )
Parameters:
hwnd - the current window handle

ovoid OnDestroy( void * hwnd )
destroy callback. This function must be called by the system framework on the window destruction (i.e. on OnDestroy callback )
Parameters:
hwnd - the current window handle

ovoid OnSize( void * hwnd, int w, int h )
resize callback. This function must be called by the system framework on window size or resize (i.e. on OnSize callback ).
Parameters:
hwnd - the current window handle
w - new window width
h - new window height


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java


GCR, Graphics Library, VCG, IEI-CNR.