OpenCOVER
Classes | Public Types | Public Member Functions | Friends | List of all members
opencover::MultiChannelDrawer Class Reference

#include <MultiChannelDrawer.h>

Inheritance diagram for opencover::MultiChannelDrawer:
Inheritance graph
[legend]
Collaboration diagram for opencover::MultiChannelDrawer:
Collaboration graph
[legend]

Public Types

enum  Mode {
  AsIs , Reproject , ReprojectAdaptive , ReprojectAdaptiveWithNeighbors ,
  ReprojectMesh , ReprojectMeshWithHoles
}
 reprojection mode More...
 
enum  ViewSelection { Same , MatchingEye , All }
 
typedef opencover::ChannelData ChannelData
 
typedef opencover::ViewData ViewData
 
typedef opencover::ViewEye ViewEye
 

Public Member Functions

 MultiChannelDrawer (bool flipped=false, bool useCuda=false)
 
 ~MultiChannelDrawer ()
 
int numViews () const
 
void update ()
 
const osg::Matrix & modelMatrix (int idx) const
 to be called each frame, updates current matrices More...
 
const osg::Matrix & viewMatrix (int idx) const
 
const osg::Matrix & projectionMatrix (int idx) const
 
Mode mode () const
 
void setMode (Mode mode)
 
ViewSelection viewsToRender () const
 whether all available views should be rendered More...
 
void setViewsToRender (ViewSelection views)
 return whether all available views should be rendered More...
 
void setNumViews (int nv=-1)
 set number of views to render, -1: one view/channel/stereo eye More...
 
void setViewEye (int view, ViewEye eye)
 configure for which eye this a view is intended More...
 
void swapFrame ()
 from now on, draw with current RGBA and depth data for all views More...
 
void updateMatrices (int idx, const osg::Matrix &model, const osg::Matrix &view, const osg::Matrix &proj)
 set matrices corresponding to RGBA and depth data for view idx More...
 
void resizeView (int idx, int w, int h, GLenum depthFormat=0, GLenum colorFormat=GL_UNSIGNED_BYTE)
 resize view idx More...
 
std::shared_ptr< ViewDatagetViewData (int idx)
 get a pointer that can be retained More...
 
unsigned char * rgba (int idx) const
 access RGBA data for view idx More...
 
unsigned char * depth (int idx) const
 access depth data for view idx More...
 
void clearColor (int idx)
 fill color array with all zeros More...
 
void clearDepth (int idx)
 fill depth array with all ones More...
 

Friends

struct SingleScreenCB
 

Member Typedef Documentation

◆ ChannelData

◆ ViewData

◆ ViewEye

Member Enumeration Documentation

◆ Mode

reprojection mode

Enumerator
AsIs 
Reproject 
ReprojectAdaptive 
ReprojectAdaptiveWithNeighbors 
ReprojectMesh 
ReprojectMeshWithHoles 

◆ ViewSelection

Enumerator
Same 
MatchingEye 
All 

Constructor & Destructor Documentation

◆ MultiChannelDrawer()

opencover::MultiChannelDrawer::MultiChannelDrawer ( bool  flipped = false,
bool  useCuda = false 
)

◆ ~MultiChannelDrawer()

opencover::MultiChannelDrawer::~MultiChannelDrawer ( )

Member Function Documentation

◆ clearColor()

void opencover::MultiChannelDrawer::clearColor ( int  idx)

fill color array with all zeros

◆ clearDepth()

void opencover::MultiChannelDrawer::clearDepth ( int  idx)

fill depth array with all ones

◆ depth()

unsigned char * opencover::MultiChannelDrawer::depth ( int  idx) const

access depth data for view idx

◆ getViewData()

std::shared_ptr< ViewData > opencover::MultiChannelDrawer::getViewData ( int  idx)

get a pointer that can be retained

◆ mode()

Mode opencover::MultiChannelDrawer::mode ( ) const

◆ modelMatrix()

const osg::Matrix & opencover::MultiChannelDrawer::modelMatrix ( int  idx) const

to be called each frame, updates current matrices

◆ numViews()

int opencover::MultiChannelDrawer::numViews ( ) const

◆ projectionMatrix()

const osg::Matrix & opencover::MultiChannelDrawer::projectionMatrix ( int  idx) const

◆ resizeView()

void opencover::MultiChannelDrawer::resizeView ( int  idx,
int  w,
int  h,
GLenum  depthFormat = 0,
GLenum  colorFormat = GL_UNSIGNED_BYTE 
)

resize view idx

◆ rgba()

unsigned char * opencover::MultiChannelDrawer::rgba ( int  idx) const

access RGBA data for view idx

◆ setMode()

void opencover::MultiChannelDrawer::setMode ( Mode  mode)

◆ setNumViews()

void opencover::MultiChannelDrawer::setNumViews ( int  nv = -1)

set number of views to render, -1: one view/channel/stereo eye

◆ setViewEye()

void opencover::MultiChannelDrawer::setViewEye ( int  view,
ViewEye  eye 
)

configure for which eye this a view is intended

◆ setViewsToRender()

void opencover::MultiChannelDrawer::setViewsToRender ( ViewSelection  views)

return whether all available views should be rendered

◆ swapFrame()

void opencover::MultiChannelDrawer::swapFrame ( )

from now on, draw with current RGBA and depth data for all views

◆ update()

void opencover::MultiChannelDrawer::update ( )

◆ updateMatrices()

void opencover::MultiChannelDrawer::updateMatrices ( int  idx,
const osg::Matrix &  model,
const osg::Matrix &  view,
const osg::Matrix &  proj 
)

set matrices corresponding to RGBA and depth data for view idx

◆ viewMatrix()

const osg::Matrix & opencover::MultiChannelDrawer::viewMatrix ( int  idx) const

◆ viewsToRender()

ViewSelection opencover::MultiChannelDrawer::viewsToRender ( ) const

whether all available views should be rendered

Friends And Related Function Documentation

◆ SingleScreenCB

friend struct SingleScreenCB
friend

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