Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Public Attributes | List of all members
BIAS::CameraViewFrustum Class Reference

describes internal parameter Frustum of an (OpenGL) camera view More...

#include <Gui/CameraViewFrustum.hh>

Public Member Functions

void AdaptWidth (const double &vpAspectRatioDesired)
 adapt left and right to match an aspect ratio useful to adapth frustum to viewport bound to windows size reshape More...
 
 CameraViewFrustum ()
 destructor More...
 
 CameraViewFrustum (const double czNear, const double czFar, const double cleft, const double cright, const double cbottom, const double ctop, const bool cisFixed=FRUSTUM_IS_FIXED_DEFAULT)
 
void DisplayGL () const
 
double GetAspect () const
 
double GetFovX () const
 
double GetFovY () const
 
void InitMembers ()
 
std::ostream & Print (std::ostream &os=std::cout) const
 
void SetPerspective (const double &fovYdeg, const double &fovAspect, const double &zNear=1., const double &zFar=1000.)
 sets a symmetric, centered frustum like gluPerspective does fovYdeg is the y field of view in degree. More...
 
virtual ~CameraViewFrustum ()
 

Public Attributes

double bottom
 
bool isFixed
 Should reshape adapt aspect ? or keep aspect, thus window aspect and frustum aspect may be different. More...
 
double left
 
double right
 
double top
 
double zFar
 
double zNear
 

Detailed Description

describes internal parameter Frustum of an (OpenGL) camera view

Author
Jan Woetzel 09/2003

Definition at line 15 of file CameraViewFrustum.hh.

Constructor & Destructor Documentation

virtual BIAS::CameraViewFrustum::~CameraViewFrustum ( )
inlinevirtual

Definition at line 17 of file CameraViewFrustum.hh.

BIAS::CameraViewFrustum::CameraViewFrustum ( )

destructor

ctors

Definition at line 18 of file CameraViewFrustum.cpp.

BIAS::CameraViewFrustum::CameraViewFrustum ( const double  czNear,
const double  czFar,
const double  cleft,
const double  cright,
const double  cbottom,
const double  ctop,
const bool  cisFixed = FRUSTUM_IS_FIXED_DEFAULT 
)
inline

Definition at line 22 of file CameraViewFrustum.hh.

Member Function Documentation

void BIAS::CameraViewFrustum::AdaptWidth ( const double &  vpAspectRatioDesired)

adapt left and right to match an aspect ratio useful to adapth frustum to viewport bound to windows size reshape

Definition at line 74 of file CameraViewFrustum.cpp.

Referenced by BIAS::OpenGLCanvas::Reshape().

void BIAS::CameraViewFrustum::DisplayGL ( ) const

Definition at line 99 of file CameraViewFrustum.cpp.

double BIAS::CameraViewFrustum::GetAspect ( ) const
Returns
aspect ratio x/y of field of image size (NOT field of view)

Definition at line 40 of file CameraViewFrustum.cpp.

double BIAS::CameraViewFrustum::GetFovX ( ) const

Definition at line 33 of file CameraViewFrustum.cpp.

double BIAS::CameraViewFrustum::GetFovY ( ) const
Returns
the approximate field of view in degree

Definition at line 24 of file CameraViewFrustum.cpp.

void BIAS::CameraViewFrustum::InitMembers ( )
inline

Definition at line 61 of file CameraViewFrustum.hh.

std::ostream & BIAS::CameraViewFrustum::Print ( std::ostream &  os = std::cout) const

Definition at line 61 of file CameraViewFrustum.cpp.

void BIAS::CameraViewFrustum::SetPerspective ( const double &  fovYdeg,
const double &  fovAspect,
const double &  zNear = 1.,
const double &  zFar = 1000. 
)

sets a symmetric, centered frustum like gluPerspective does fovYdeg is the y field of view in degree.

Definition at line 47 of file CameraViewFrustum.cpp.

Member Data Documentation

double BIAS::CameraViewFrustum::bottom

Definition at line 80 of file CameraViewFrustum.hh.

bool BIAS::CameraViewFrustum::isFixed

Should reshape adapt aspect ? or keep aspect, thus window aspect and frustum aspect may be different.

Definition at line 85 of file CameraViewFrustum.hh.

double BIAS::CameraViewFrustum::left

Definition at line 78 of file CameraViewFrustum.hh.

double BIAS::CameraViewFrustum::right

Definition at line 79 of file CameraViewFrustum.hh.

double BIAS::CameraViewFrustum::top

Definition at line 81 of file CameraViewFrustum.hh.

double BIAS::CameraViewFrustum::zFar

Definition at line 76 of file CameraViewFrustum.hh.

double BIAS::CameraViewFrustum::zNear

Definition at line 75 of file CameraViewFrustum.hh.


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