Visual Computing Library
Loading...
Searching...
No Matches
vcl::AbstractViewerDrawer< DerivedRenderApp > Class Template Referenceabstract

The AbstractViewerDrawer class is a base class for all viewer drawers implementations. More...

#include <vclib/render/drawers/abstract_viewer_drawer.h>

Inheritance diagram for vcl::AbstractViewerDrawer< DerivedRenderApp >:

Public Member Functions

 AbstractViewerDrawer (uint width=1024, uint height=768)
 
const DrawableObjectVectordrawableObjectVector () const
 
void setDrawableObjectVector (const std::shared_ptr< DrawableObjectVector > &v)
 
uint pushDrawableObject (const DrawableObject &obj)
 
uint pushDrawableObject (DrawableObject &&obj)
 
void fitScene ()
 
virtual void toggleAxisVisibility ()=0
 
virtual void toggleTrackBallVisibility ()=0
 
void onInit (uint) override
 
void onResize (unsigned int width, unsigned int height) override
 
void onKeyPress (Key::Enum key, const KeyModifiers &modifiers) override
 
void onKeyRelease (Key::Enum key, const KeyModifiers &modifiers) override
 
void onMouseMove (double x, double y, const KeyModifiers &modifiers) override
 
void onMousePress (MouseButton::Enum button, double x, double y, const KeyModifiers &modifiers) override
 
void onMouseRelease (MouseButton::Enum button, double x, double y, const KeyModifiers &modifiers) override
 
void onMouseScroll (double dx, double dy, const KeyModifiers &modifiers) override
 
- Public Member Functions inherited from vcl::DesktopTrackBall< float >
 DesktopTrackBall (uint width=1024, uint height=768)
 
bool isDragging () const
 
MotionType currentMotion () const
 
DirectionalLight< floatlight () const
 
const Camera< float > & camera () const
 
Matrix44< floatviewMatrix () const
 
Matrix44< floatlightGizmoMatrix () const
 
Matrix44< floatgizmoMatrix () const
 
Matrix44< floatprojectionMatrix () const
 
void resetTrackBall ()
 
void setTrackBall (const Point3< float > &center, float radius)
 
void focus (const Point3< float > &center)
 
void resizeViewer (uint w, uint h)
 
void setKeyModifiers (KeyModifiers keys)
 
void moveMouse (int x, int y)
 
void pressMouse (MouseButton::Enum button)
 
void releaseMouse (MouseButton::Enum button)
 
void scroll (float pixelDeltaX, float pixelDeltaY)
 
void keyPress (Key::Enum key)
 
void keyRelease (Key::Enum key)
 
- Public Member Functions inherited from vcl::EventDrawer< DerivedRenderApp >
 EventDrawer (uint, uint)
 
virtual void onMouseDoubleClick (MouseButton::Enum button, double x, double y, const KeyModifiers &modifiers)
 
- Public Member Functions inherited from vcl::PlainDrawer< DerivedRenderApp >
 PlainDrawer (uint, uint)
 
virtual void onResize (uint width, uint height)
 
virtual void onDraw (uint viewId)
 
virtual void onDrawContent (uint viewId)
 
virtual void onPostDraw ()
 

Protected Types

using DTB = vcl::DesktopTrackBall< float >
 
- Protected Types inherited from vcl::PlainDrawer< DerivedRenderApp >
using DRT = DerivedRenderApp
 

Protected Member Functions

void readRequest (MouseButton::Enum button, double x, double y, const KeyModifiers &modifiers, bool homogeneousNDC=true)
 
- Protected Member Functions inherited from vcl::PlainDrawer< DerivedRenderApp >
autoderived ()
 
const autoderived () const
 

Protected Attributes

std::shared_ptr< DrawableObjectVectormDrawList
 

Private Member Functions

autoderived ()
 
const autoderived () const
 

Private Attributes

bool mReadRequested = false
 

Additional Inherited Members

- Public Types inherited from vcl::DesktopTrackBall< float >
using ScalarType = float
 
using MatrixType = vcl::Matrix44< float >
 
using TrackBallType = vcl::TrackBall< float >
 
- Static Public Attributes inherited from vcl::DesktopTrackBall< float >
static const Point3< floatUNIT_X
 
static const Point3< floatUNIT_Y
 
- Static Public Attributes inherited from vcl::EventDrawer< DerivedRenderApp >
static const bool CAN_BLOCK_EVENT_PROPAGATION = false
 

Detailed Description

template<typename DerivedRenderApp>
class vcl::AbstractViewerDrawer< DerivedRenderApp >

The AbstractViewerDrawer class is a base class for all viewer drawers implementations.

It provides all the common functionalities of a viewer, but not the core rendering functionalities. It is meant to be subclassed by a concrete viewer drawer implementation.

Member Function Documentation

◆ onInit()

void vcl::AbstractViewerDrawer< DerivedRenderApp >::onInit ( uint  )
inlineoverridevirtual

◆ onKeyPress()

void vcl::AbstractViewerDrawer< DerivedRenderApp >::onKeyPress ( Key::Enum  key,
const KeyModifiers modifiers 
)
inlineoverridevirtual

◆ onKeyRelease()

void vcl::AbstractViewerDrawer< DerivedRenderApp >::onKeyRelease ( Key::Enum  key,
const KeyModifiers modifiers 
)
inlineoverridevirtual

◆ onMouseMove()

void vcl::AbstractViewerDrawer< DerivedRenderApp >::onMouseMove ( double  x,
double  y,
const KeyModifiers modifiers 
)
inlineoverridevirtual

◆ onMousePress()

void vcl::AbstractViewerDrawer< DerivedRenderApp >::onMousePress ( MouseButton::Enum  button,
double  x,
double  y,
const KeyModifiers modifiers 
)
inlineoverridevirtual

◆ onMouseRelease()

void vcl::AbstractViewerDrawer< DerivedRenderApp >::onMouseRelease ( MouseButton::Enum  button,
double  x,
double  y,
const KeyModifiers modifiers 
)
inlineoverridevirtual

◆ onMouseScroll()

void vcl::AbstractViewerDrawer< DerivedRenderApp >::onMouseScroll ( double  dx,
double  dy,
const KeyModifiers modifiers 
)
inlineoverridevirtual

Member Data Documentation

◆ mDrawList

std::shared_ptr<DrawableObjectVector> vcl::AbstractViewerDrawer< DerivedRenderApp >::mDrawList
protected
Initial value:
=
std::make_shared<DrawableObjectVector>()

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