k3d::gl::irender_viewport Class Reference

Abstract interface for objects that can render using OpenGL. More...

#include <irender_viewport_gl.h>

Inheritance diagram for k3d::gl::irender_viewport:
Inheritance graph
[legend]

List of all members.

Public Types

enum  redraw_type_t { SYNCHRONOUS, ASYNCHRONOUS }
 

Enumerates redraw request types.

More...
typedef sigc::signal< void,
redraw_type_t
redraw_request_signal_t
 Used to signal any connected user interface components that a redraw is requested.

Public Member Functions

virtual bool get_ndc (icamera &Camera, const unsigned long PixelWidth, const unsigned long PixelHeight, rectangle &CameraRect, rectangle &WindowRect)=0
 Returns the normalized device coordinates for the viewport, allowing for mismatches between the aspect ratio of the window and the camera.
virtual void render_viewport (icamera &Camera, const unsigned long PixelWidth, const unsigned long PixelHeight, GLdouble ViewMatrix[16], GLdouble ProjectionMatrix[16], GLint Viewport[4])=0
 Redraws the document.
virtual void render_viewport_selection (const selection_state &SelectionState, icamera &Camera, const unsigned long PixelWidth, const unsigned long PixelHeight, const rectangle &Rectangle, GLdouble ViewMatrix[16], GLdouble ProjectionMatrix[16], GLint Viewport[4])=0
 Draws the document in OpenGL selection mode, so selection "hits" can be extracted.
virtual redraw_request_signal_tredraw_request_signal ()=0

Protected Member Functions

 irender_viewport ()
 irender_viewport (const irender_viewport &Other)
irender_viewportoperator= (const irender_viewport &)
virtual ~irender_viewport ()

Detailed Description

Abstract interface for objects that can render using OpenGL.


Member Typedef Documentation

Used to signal any connected user interface components that a redraw is requested.


Member Enumeration Documentation

Enumerates redraw request types.

Enumerator:
SYNCHRONOUS 
ASYNCHRONOUS 

Constructor & Destructor Documentation

k3d::gl::irender_viewport::irender_viewport (  )  [inline, protected]
k3d::gl::irender_viewport::irender_viewport ( const irender_viewport Other  )  [inline, protected]
virtual k3d::gl::irender_viewport::~irender_viewport (  )  [inline, protected, virtual]

Member Function Documentation

virtual bool k3d::gl::irender_viewport::get_ndc ( icamera Camera,
const unsigned long  PixelWidth,
const unsigned long  PixelHeight,
rectangle CameraRect,
rectangle WindowRect 
) [pure virtual]

Returns the normalized device coordinates for the viewport, allowing for mismatches between the aspect ratio of the window and the camera.

Implemented in module::opengl::render_engine.

irender_viewport& k3d::gl::irender_viewport::operator= ( const irender_viewport  )  [inline, protected]
virtual redraw_request_signal_t& k3d::gl::irender_viewport::redraw_request_signal (  )  [pure virtual]
virtual void k3d::gl::irender_viewport::render_viewport ( icamera Camera,
const unsigned long  PixelWidth,
const unsigned long  PixelHeight,
GLdouble  ViewMatrix[16],
GLdouble  ProjectionMatrix[16],
GLint  Viewport[4] 
) [pure virtual]

Redraws the document.

Note:
The caller must setup an OpenGL render context before calling this method, and must call glFlush() after it returns

Implemented in module::opengl::render_engine.

Referenced by module::wgl::camera_to_bitmap::on_assign_pixels().

virtual void k3d::gl::irender_viewport::render_viewport_selection ( const selection_state SelectionState,
icamera Camera,
const unsigned long  PixelWidth,
const unsigned long  PixelHeight,
const rectangle Rectangle,
GLdouble  ViewMatrix[16],
GLdouble  ProjectionMatrix[16],
GLint  Viewport[4] 
) [pure virtual]

Draws the document in OpenGL selection mode, so selection "hits" can be extracted.

Parameters:
SelectionState The geometry components to be drawn
PixelWidth The width of the viewport in pixels
PixelHeight The width of the viewport in pixels
FontListBase 
Rectangle Defines the selection region as a rectangle in screen (pixel coordinates)
ViewMatrix Returns the OpenGL view matrix used for drawing (the camera-to-world matrix)
ProjectionMatrix Returns the OpenGL projection matrix used for drawing
Viewport Returns the OpenGL viewport used for drawing
Note:
The caller must setup the OpenGL render context, allocate the selection buffer, put OpenGL in selection mode, and call glFlush() when done

Implemented in module::opengl::render_engine.


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

Generated on Mon Mar 21 07:42:25 2011 for K-3D by doxygen 1.6.3