|
|
|
|
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 ReferenceCViewport 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 52 of file viewport.h.
Constructor & Destructor Documentation
NL3D::CViewport::CViewport |
( |
|
) |
|
|
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 81 of file viewport.cpp.
References _Height, _Width, _X, _Y, NL3D_MEM_VIEWPORT, x, and y.
Referenced by NL3D::CEvent3dMouseListener::operator(). |
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 93 of file viewport.h.
References _Height, _Width, _X, _Y, height, NL3D_MEM_VIEWPORT, width, x, and y. |
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 44 of file viewport.cpp.
References _Height, _Width, _X, _Y, NLMISC::clamp, height, NL3D_MEM_VIEWPORT, width, x, and y. |
void NL3D::CViewport::init16_9 |
( |
|
) |
|
|
void NL3D::CViewport::initFullScreen |
( |
|
) |
|
|
Member Data Documentation
float NL3D::CViewport::_Height [private]
|
|
float NL3D::CViewport::_Width [private]
|
|
float NL3D::CViewport::_X [private]
|
|
float NL3D::CViewport::_Y [private]
|
|
The documentation for this class was generated from the following files:
|
|