# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NL3D::CViewport Class Reference

CViewport is the description of the viewport used to render with a driver. More...

#include <viewport.h>

List of all members.

Public Methods

 CViewport ()
 Default constructor. Setup a fullscreen viewport. More...

void init (float x, float y, float width, float height)
 Constructor. More...

void initFullScreen ()
 Setup a fullscreen viewport. More...

void init16_9 ()
 Setup a 16/9 viewport. More...

void getRayWithPoint (float x, float y, CVector& pos, CVector& dir, const CMatrix& camMatrix, const CFrustum& camFrust) const
 Get a 3d ray with a 2d point. More...

void getValues (float& x, float& y, float& width, float& height) const
 Get the viewport values. More...


Private Attributes

float _X
float _Y
float _Width
float _Height


Detailed Description

CViewport is the description of the viewport used to render with a driver.

Definition at line 51 of file viewport.h.


Constructor & Destructor Documentation

NL3D::CViewport::CViewport ( )
 

Default constructor. Setup a fullscreen viewport.

Definition at line 35 of file viewport.cpp.


Member Function Documentation

void NL3D::CViewport::getRayWithPoint ( float x,
float y,
CVector & pos,
CVector & dir,
const CMatrix & camMatrix,
const CFrustum & camFrust ) const
 

Get a 3d ray with a 2d point.

Parameters:
x   is the x coordinate in the window coordinate system of the 2d point.
y   is the y coordinate in the window coordinate system of the 2d point.
pos   gets the position of a 3d point on the ray. It is also the position of the camera
dir   gets the direction of the ray. The direction is the same than the camera one. It is NOT normalized.
camMatrix   is the matrix of the camera in use in this viewport.
camFrust   is the frustum of the camera in use in this viewport.

Definition at line 75 of file viewport.cpp.

void NL3D::CViewport::getValues ( float & x,
float & y,
float & width,
float & height ) const [inline]
 

Get the viewport values.

Parameters:
x   get the x coordinate of the left edge of the viewport in the window coordinate system . Must be between 0.f and 1.f.
y   get the y coordinate of the bottom edge of the viewport in the window coordinate system . Must be between 0.f and 1.f.
width   get the width of the view port. Must be between 0.f and 1.f-x.
height   get the height of the view port. Must be between 0.f and 1.f-y.

Definition at line 92 of file viewport.h.

void NL3D::CViewport::init ( float x,
float y,
float width,
float height )
 

Constructor.

Parameters:
x   coordinate of the left edge of the viewport in the window coordinate system . Must be between 0.f and 1.f.
y   coordinate of the bottom edge of the viewport in the window coordinate system . Must be between 0.f and 1.f.
width   of the view port. Must be between 0.f and 1.f-x.
height   of the view port. Must be between 0.f and 1.f-y.

Definition at line 41 of file viewport.cpp.

void NL3D::CViewport::init16_9 ( )
 

Setup a 16/9 viewport.

Definition at line 65 of file viewport.cpp.

void NL3D::CViewport::initFullScreen ( )
 

Setup a fullscreen viewport.

Definition at line 55 of file viewport.cpp.


Member Data Documentation

float NL3D::CViewport::_Height [private]
 

Definition at line 104 of file viewport.h.

float NL3D::CViewport::_Width [private]
 

Definition at line 103 of file viewport.h.

float NL3D::CViewport::_X [private]
 

Definition at line 101 of file viewport.h.

float NL3D::CViewport::_Y [private]
 

Definition at line 102 of file viewport.h.


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