MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::ViewportGL Class Reference

This class holds data needed to render viewport primitives and accumulative picker via OpenGL. More...

#include <MRViewportGL.h>

Classes

struct  BasePickResult
 
struct  PickParameters
 Parameters of objects picking. More...
 
struct  PickResult
 Result of object picking. More...
 
struct  ScaledPickRes
 

Public Types

typedef unsigned int GLuint
 
typedef float GLfloat
 
using PickResults = std::vector<PickResult>
 
using BasePickResults = std::vector<BasePickResult>
 

Public Member Functions

 ViewportGL ()=default
 
 ViewportGL (const ViewportGL &)
 Copy operators do nothing, not to share GL data.
 
ViewportGLoperator= (const ViewportGL &)
 
MRVIEWER_API ViewportGL (ViewportGL &&other) noexcept
 
ViewportGLoperator= (ViewportGL &&) noexcept
 
 ~ViewportGL ()
 
void init ()
 Initialize all GL buffers and arrays.
 
void free ()
 Free all GL data.
 
void drawBorder (const Box2f &rect, const Color &color) const
 Binds and draws viewport border.
 
void fillViewport (const Box2f &rect, const Color &color) const
 Fills viewport with given color (clear frame buffer)
 
bool checkInit () const
 Check that members have been initialized.
 
PickResults pickObjects (const PickParameters &params, const std::vector< Vector2i > &picks) const
 Find picked object, face id and z coordinate, of objects given in parameters (works for vector of picks)
 
std::vector< unsigned > findUniqueObjectsInRect (const PickParameters &params, const Box2i &rect, int maxRenderResolutionSide) const
 
ScaledPickRes pickObjectsInRect (const PickParameters &params, const Box2i &rect, int maxRenderResolutionSide) const
 

Detailed Description

This class holds data needed to render viewport primitives and accumulative picker via OpenGL.


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