SCIRun  5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
SRCamera Class Reference

Basic camera class for spire, mimicking SCIRun v4. More...

#include <SRCamera.h>

Public Member Functions

 SRCamera (SRInterface &iface, std::shared_ptr< spire::Interface > spire)
 
virtual ~SRCamera ()
 
const spire::M44 & getWorldToProjection () const
 
const spire::M44 & getWorldToView () const
 
const spire::M44 & getViewToWorld () const
 
const spire::M44 & getViewToProjection () const
 
void setAsPerspective ()
 Sets this camera to use a perspective projection transformation. More...
 
void setAsOrthographic (float halfWidth, float halfHeight)
 Sets this camera to use an orthographic projection transformation. More...
 
void applyTransform ()
 
void mouseDownEvent (const glm::ivec2 &pos, SRInterface::MouseButton btn)
 Handle mouse down. More...
 
void mouseMoveEvent (const glm::ivec2 &pos, SRInterface::MouseButton btn)
 Handle mouse movement. More...
 
void mouseWheelEvent (int32_t delta)
 Handle mouse wheel event. More...
 
void doAutoView (const Core::Geometry::BBox &bbox)
 Perform autoview. More...
 

Static Public Member Functions

static float getDefaultFOVY ()
 
static float getDefaultZNear ()
 
static float getDefaultZFar ()
 

Detailed Description

Basic camera class for spire, mimicking SCIRun v4.

Constructor & Destructor Documentation

SRCamera ( SRInterface iface,
std::shared_ptr< spire::Interface >  spire 
)
~SRCamera ( )
virtual

Member Function Documentation

void applyTransform ( )

Sets the current view transform (view to world space). This should be removed.

void doAutoView ( const Core::Geometry::BBox bbox)

Perform autoview.

Todo:
Use real FOV-Y when we allow the user to change the FOV.
static float getDefaultFOVY ( )
inlinestatic

Default camera settings

static float getDefaultZFar ( )
inlinestatic
static float getDefaultZNear ( )
inlinestatic
const spire::M44& getViewToProjection ( ) const
inline
const spire::M44& getViewToWorld ( ) const
inline
const spire::M44& getWorldToProjection ( ) const
inline
const spire::M44& getWorldToView ( ) const
inline
void mouseDownEvent ( const glm::ivec2 &  pos,
SRInterface::MouseButton  btn 
)

Handle mouse down.

void mouseMoveEvent ( const glm::ivec2 &  pos,
SRInterface::MouseButton  btn 
)

Handle mouse movement.

void mouseWheelEvent ( int32_t  delta)

Handle mouse wheel event.

void setAsOrthographic ( float  halfWidth,
float  halfHeight 
)

Sets this camera to use an orthographic projection transformation.

void setAsPerspective ( )

Sets this camera to use a perspective projection transformation.


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