version 3.3

VRS::ViewInfo Class Reference

This class provides view-related operations: view-frustum culling, pixel size estimation, and distance to camera. More...

#include <vrs/viewinfo.h>

Inheritance diagram for VRS::ViewInfo:

VRS::SharedObj VRS::Visitable VRS::ModelviewProjectionViewInfo VRS::CameraViewInfo

List of all members.

Public Types

enum  CullingPos { Outside = -1, InAndOut = 0, Inside = 1 }

Public Member Functions

 ViewInfo (SO< const Engine > engine)
 ~ViewInfo ()
virtual int viewportWidth () const
virtual int viewportHeight () const
virtual const VectorcameraPosition () const =0
virtual const VectorcameraUp () const =0
virtual const VectorcameraRight () const =0
virtual const VectorcameraDirection () const =0
virtual double farPlaneDistance () const =0
virtual double nearPlaneDistance () const =0
virtual double distanceToCamera2 (const Vector &point) const =0
virtual double distanceToCamera2 (const Bounds &bbox) const =0
virtual double pixelSize2 (const Vector &center, double radius) const =0
virtual double pixelSize2 (const Vector &segmentBegin, const Vector &segmentEnd) const =0
 VRS_SERIALIZABLE_CLASS_ENUM (CullingPos)
virtual CullingPos culling (const Vector &point, double radius) const =0
 Returns if the given sphere is inside or outside the view frustum.
virtual CullingPos culling (const Vector &point) const =0
 Returns if the given point is inside or outside the view frustum.
virtual CullingPos culling (const Bounds &bbox) const =0
 Returns if the given box is inside or outside the view frustum.
 VRS_TYPEINFO (ViewInfo, SharedObj)

Protected Member Functions

 ViewInfo ()

Protected Attributes

int viewportWidth_
int viewportHeight_


Detailed Description

This class provides view-related operations: view-frustum culling, pixel size estimation, and distance to camera.

Get a valid ViewInfo via Engine::viewInfo(). It operates in the engine's current object space.

Do not trust the camera's frame of reference too much, as the camera might not have one (e.g. multiperspective views).

Subclass ViewInfo if you need to change the view, e.g. when using special projections within shaders or space deformation operators. In that case, use Engine::pushViewInfoFactory() to announce a new ViewInfoFactory.


Member Enumeration Documentation

Enumerator:
Outside 
InAndOut 
Inside 


Constructor & Destructor Documentation

VRS::ViewInfo::ViewInfo ( SO< const Engine engine  ) 

VRS::ViewInfo::~ViewInfo (  ) 

VRS::ViewInfo::ViewInfo (  )  [protected]


Member Function Documentation

virtual int VRS::ViewInfo::viewportWidth (  )  const [virtual]

virtual int VRS::ViewInfo::viewportHeight (  )  const [virtual]

virtual const Vector& VRS::ViewInfo::cameraPosition (  )  const [pure virtual]

virtual const Vector& VRS::ViewInfo::cameraUp (  )  const [pure virtual]

virtual const Vector& VRS::ViewInfo::cameraRight (  )  const [pure virtual]

virtual const Vector& VRS::ViewInfo::cameraDirection (  )  const [pure virtual]

virtual double VRS::ViewInfo::farPlaneDistance (  )  const [pure virtual]

virtual double VRS::ViewInfo::nearPlaneDistance (  )  const [pure virtual]

virtual double VRS::ViewInfo::distanceToCamera2 ( const Vector point  )  const [pure virtual]

virtual double VRS::ViewInfo::distanceToCamera2 ( const Bounds bbox  )  const [pure virtual]

virtual double VRS::ViewInfo::pixelSize2 ( const Vector center,
double  radius 
) const [pure virtual]

virtual double VRS::ViewInfo::pixelSize2 ( const Vector segmentBegin,
const Vector segmentEnd 
) const [pure virtual]

VRS::ViewInfo::VRS_SERIALIZABLE_CLASS_ENUM ( CullingPos   ) 

virtual CullingPos VRS::ViewInfo::culling ( const Vector point,
double  radius 
) const [pure virtual]

Returns if the given sphere is inside or outside the view frustum.

Implemented in VRS::CameraViewInfo, and VRS::ModelviewProjectionViewInfo.

virtual CullingPos VRS::ViewInfo::culling ( const Vector point  )  const [pure virtual]

Returns if the given point is inside or outside the view frustum.

Implemented in VRS::CameraViewInfo, and VRS::ModelviewProjectionViewInfo.

virtual CullingPos VRS::ViewInfo::culling ( const Bounds bbox  )  const [pure virtual]

Returns if the given box is inside or outside the view frustum.

Implemented in VRS::CameraViewInfo, and VRS::ModelviewProjectionViewInfo.

VRS::ViewInfo::VRS_TYPEINFO ( ViewInfo  ,
SharedObj   
)


Member Data Documentation


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

Generated on Wed May 23 06:00:31 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact