Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

PajaSystem::OpenGLInterfaceC Class Reference

Device interface for OpenGL. More...

#include <OpenGLInterfaceC.h>

Inheritance diagram for PajaSystem::OpenGLInterfaceC:

PajaSystem::DeviceInterfaceI List of all members.

Public Methods


Detailed Description

Device interface for OpenGL.

The purpose of the device interface for OpenGL is to setup the area where an effect can draw and to convert coordinates from screen (pixel) coordinates to the layout.


Constructor & Destructor Documentation

OpenGLInterfaceC ( PajaTypes::int32 i32PosX,
PajaTypes::int32 i32PosY,
PajaTypes::int32 i32Width,
PajaTypes::int32 i32Height,
const PajaTypes::BBox2C & rViewport,
const PajaTypes::BBox2C & rLayout )
 

Defautl constructor (used internally).

~OpenGLInterfaceC ( ) [virtual]
 

Default destructor.


Member Function Documentation

PajaTypes::Vector2C client_to_layout ( const PajaTypes::Vector2C & rVec ) [virtual]
 

Converts positions in screen pixels to the layout coordinate system.

PajaTypes::Vector2C delta_client_to_layout ( const PajaTypes::Vector2C & rVec ) [virtual]
 

Converts delta values of screen pixels to the layout coordinate system.

PajaTypes::Vector2C delta_layout_to_client ( const PajaTypes::Vector2C & rVec ) [virtual]
 

Converts delta values layout coordinate system uints to the screen pixels.

PajaTypes::int32 get_height ( ) [virtual]
 

Returns the height of the screen in pixels.

PajaTypes::uint32 get_type ( ) const [virtual]
 

Returns the type of the interface (INTERFACE_OPENGL).

Reimplemented from PajaSystem::DeviceInterfaceI.

PajaTypes::BBox2C get_viewport ( ) [virtual]
 

Returns the viewport (visible are of the demo).

PajaTypes::int32 get_width ( ) [virtual]
 

Returns the width of the screen in pixels.

PajaTypes::Vector2C layout_to_client ( const PajaTypes::Vector2C & rVec ) [virtual]
 

Converts positions in layout coordinate system uints to the screen pixels.

void set_ortho ( const PajaTypes::BBox2C & rBBox,
PajaTypes::float32 f32Left,
PajaTypes::float32 f32Right,
PajaTypes::float32 f32Top,
PajaTypes::float32 f32Bottom,
PajaTypes::float32 f32ZNear = -1,
PajaTypes::float32 f32ZFar = 1 ) [virtual]
 

Sets orthographic viewport and projection matrix.

Parameters:
rBBox   the bounding box of the effect.
f32Width   Width of the viewport.
f32Height   Height of the viewport.
f32ZNear   Near clipping plane.
f32ZFar   Far clipping plane.

This method is a replacement for glOrtho. Scrissor testing is enabled and the bounding box is used to define the scissor box.

void set_perspective ( const PajaTypes::BBox2C & rBBox,
PajaTypes::float32 f32FOV,
PajaTypes::float32 f32Aspect,
PajaTypes::float32 f32ZNear,
PajaTypes::float32 f32ZFar ) [virtual]
 

Sets perspective viewport and projection matrix.

Parameters:
rBBox   the bounding box of the effect.
f32FOV   FOV on x-axis.
f32Aspect   Aspect ration of the viewport.
f32ZNear   Near clipping plane.
f32ZFar   Far clipping plane.

This method is a replacement for gluPerspective. Note that the FOV is different. Scrissor testing is enabled and the bounding box is used to define the scissor box.


The documentation for this class was generated from the following file:
Moppi Demopaja SDK Documentation -- Copyright © 2000 Moppi Productions