vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ht::Screen Class Reference

Defines position of screen in real world. More...

#include <htUtils.h>

Public Member Functions

 Screen ()
 
void SetScreen (osg::Vec3 corner, osg::Vec3 width, osg::Vec3 height)
 
const osg::Matrix & GetMatrix () const
 Returns screen matrix. More...
 
const osg::Matrix & GetMatrixInv () const
 
bool IsValid () const
 Returns true if screen is valid (width and height are not zero) More...
 

Detailed Description

Defines position of screen in real world.

Constructor & Destructor Documentation

ht::Screen::Screen ( )

Member Function Documentation

const osg::Matrix& ht::Screen::GetMatrix ( ) const
inline

Returns screen matrix.

Returns position of the screen in real world

Parameters
corner- position of bottom left corner of the screen in real world coordinate system
width- left-to-right direction of screen in real world coordinate system, size of this vector defines width of the screen
height- bottom-to-top direction of screen in real world coordinate system, size of this vector defines height of the screen
Returns
Returns true is the screen is valid, false if not (nothing may be returned)
const osg::Matrix& ht::Screen::GetMatrixInv ( ) const
inline

Returns inverse of the screen matrix Use preMult(Vec4) to get virtual coordinate from real world coordinate

bool ht::Screen::IsValid ( ) const
inline

Returns true if screen is valid (width and height are not zero)

void ht::Screen::SetScreen ( osg::Vec3  corner,
osg::Vec3  width,
osg::Vec3  height 
)

Sets position of the screen in real world Width and height should be perpendicular. Z axis is chosen so that z = cross(width, height) holds true

Parameters
corner- position of bottom left corner of the screen in real world coordinate system
width- left-to-right direction of screen in real world coordinate system, size of this vector defines width of the screen
height- bottom-to-top direction of screen in real world coordinate system, size of this vector defines height of the screen

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