A Display manages the location and resizing of an OpenGl viewport. More...
#include <display.h>
Public Member Functions | |
void | Activate () const |
Activate Displays viewport for drawing within this area. | |
void | Activate (const OpenGlRenderState &state) const |
Activate Displays and set State Matrices. | |
void | ActivateAndScissor () const |
Activate Displays viewport and Scissor for drawing within this area. | |
void | ActivateAndScissor (const OpenGlRenderState &state) const |
Activate Display and set State Matrices. | |
void | ActivateScissorAndClear () const |
Activate Displays viewport and Scissor for drawing within this area. | |
void | ActivateScissorAndClear (const OpenGlRenderState &state) const |
Activate Display and set State Matrices. | |
View & | AddDisplay (View &view) |
Add view as child. | |
void | GetCamCoordinates (const OpenGlRenderState &cam_state, double winx, double winy, double winzdepth, double &x, double &y, double &z) const |
GLfloat | GetClosestDepth (int winx, int winy, int radius) const |
Return closest depth buffer value within radius of window (winx,winy) | |
void | GetObjectCoordinates (const OpenGlRenderState &cam_state, double winx, double winy, double winzdepth, double &x, double &y, double &z) const |
View & | operator[] (int i) |
Return (i)th child of this view. | |
virtual void | Render () |
virtual void | RenderChildren () |
Instruct all children to render themselves if appropriate. | |
virtual void | Resize (const Viewport &parent) |
Given the specification of Display, compute viewport. | |
virtual void | ResizeChildren () |
Instruct all children to resize. | |
View & | SetAspect (double aspect) |
View & | SetBounds (Attach bottom, Attach top, Attach left, Attach right, bool keep_aspect=false) |
Set bounds for the View using mixed fractional / pixel coordinates (OpenGl view coordinates) | |
View & | SetBounds (Attach bottom, Attach top, Attach left, Attach right, double aspect) |
Set bounds for the View using mixed fractional / pixel coordinates (OpenGl view coordinates) | |
View & | SetDrawFunction (const boost::function< void(View &)> &drawFunc) |
Set drawFunc as the drawing function for this view. | |
View & | SetFocus () |
Set this view as the active View to receive input. | |
View & | SetHandler (Handler *handler) |
Designate handler for accepting mouse / keyboard input. | |
View & | SetLayout (Layout layout) |
Set layout policy for this view. | |
View & | SetLock (Lock horizontal, Lock vertical) |
Set how this view should be positioned relative to its parent. | |
View () | |
virtual | ~View () |
Public Attributes | |
double | aspect |
Attach | bottom |
boost::function< void(View &)> | extern_draw_function |
Handler * | handler |
Lock | hlock |
Layout | layout |
Attach | left |
Attach | right |
int | scroll_offset |
bool | show |
Attach | top |
Viewport | v |
std::vector< View * > | views |
Lock | vlock |
Viewport | vp |
Private Member Functions | |
View (View &) |
A Display manages the location and resizing of an OpenGl viewport.
pangolin::View::View | ( | ) | [inline] |
virtual pangolin::View::~View | ( | ) | [inline, virtual] |
pangolin::View::View | ( | View & | ) | [inline, private] |
void pangolin::View::Activate | ( | ) | const |
Activate Displays viewport for drawing within this area.
Definition at line 783 of file display.cpp.
void pangolin::View::Activate | ( | const OpenGlRenderState & | state | ) | const |
Activate Displays and set State Matrices.
Definition at line 801 of file display.cpp.
void pangolin::View::ActivateAndScissor | ( | ) | const |
Activate Displays viewport and Scissor for drawing within this area.
Definition at line 788 of file display.cpp.
void pangolin::View::ActivateAndScissor | ( | const OpenGlRenderState & | state | ) | const |
Activate Display and set State Matrices.
Definition at line 807 of file display.cpp.
void pangolin::View::ActivateScissorAndClear | ( | ) | const |
Activate Displays viewport and Scissor for drawing within this area.
Definition at line 794 of file display.cpp.
void pangolin::View::ActivateScissorAndClear | ( | const OpenGlRenderState & | state | ) | const |
Activate Display and set State Matrices.
Definition at line 814 of file display.cpp.
View & pangolin::View::AddDisplay | ( | View & | view | ) |
Add view as child.
Definition at line 893 of file display.cpp.
void pangolin::View::GetCamCoordinates | ( | const OpenGlRenderState & | cam_state, |
double | winx, | ||
double | winy, | ||
double | winzdepth, | ||
double & | x, | ||
double & | y, | ||
double & | z | ||
) | const |
Obtain camera space coordinates of scene at pixel (winx, winy, winzdepth) winzdepth can be obtained from GetClosestDepth
Definition at line 841 of file display.cpp.
GLfloat pangolin::View::GetClosestDepth | ( | int | winx, |
int | winy, | ||
int | radius | ||
) | const |
Return closest depth buffer value within radius of window (winx,winy)
Definition at line 822 of file display.cpp.
void pangolin::View::GetObjectCoordinates | ( | const OpenGlRenderState & | cam_state, |
double | winx, | ||
double | winy, | ||
double | winzdepth, | ||
double & | x, | ||
double & | y, | ||
double & | z | ||
) | const |
Obtain object space coordinates of scene at pixel (winx, winy, winzdepth) winzdepth can be obtained from GetClosestDepth
Definition at line 833 of file display.cpp.
View & pangolin::View::operator[] | ( | int | i | ) |
Return (i)th child of this view.
Definition at line 907 of file display.cpp.
void pangolin::View::Render | ( | void | ) | [virtual] |
Perform any automatic rendering for this View. Default implementation simply instructs children to render themselves.
Reimplemented in pangolin::Plotter, pangolin::TextInput, pangolin::Slider, pangolin::Checkbox, pangolin::Button, and pangolin::Panel.
Definition at line 768 of file display.cpp.
void pangolin::View::RenderChildren | ( | ) | [virtual] |
Instruct all children to render themselves if appropriate.
Definition at line 777 of file display.cpp.
void pangolin::View::Resize | ( | const Viewport & | parent | ) | [virtual] |
Given the specification of Display, compute viewport.
Definition at line 619 of file display.cpp.
void pangolin::View::ResizeChildren | ( | ) | [virtual] |
Instruct all children to resize.
Reimplemented in pangolin::TextInput, pangolin::Slider, pangolin::Checkbox, pangolin::Button, and pangolin::Panel.
Definition at line 682 of file display.cpp.
View & pangolin::View::SetAspect | ( | double | aspect | ) |
Force this view to have the given aspect, whilst fitting snuggly within the parent. A negative value with 'over-draw', fitting the smaller side of the parent.
Definition at line 872 of file display.cpp.
View & pangolin::View::SetBounds | ( | Attach | bottom, |
Attach | top, | ||
Attach | left, | ||
Attach | right, | ||
bool | keep_aspect = false |
||
) |
Set bounds for the View using mixed fractional / pixel coordinates (OpenGl view coordinates)
Definition at line 854 of file display.cpp.
View & pangolin::View::SetBounds | ( | Attach | bottom, |
Attach | top, | ||
Attach | left, | ||
Attach | right, | ||
double | aspect | ||
) |
Set bounds for the View using mixed fractional / pixel coordinates (OpenGl view coordinates)
Definition at line 861 of file display.cpp.
View & pangolin::View::SetDrawFunction | ( | const boost::function< void(View &)> & | drawFunc | ) |
Set drawFunc as the drawing function for this view.
Definition at line 918 of file display.cpp.
View & pangolin::View::SetFocus | ( | ) |
Set this view as the active View to receive input.
Definition at line 848 of file display.cpp.
View & pangolin::View::SetHandler | ( | Handler * | handler | ) |
Designate handler for accepting mouse / keyboard input.
Definition at line 912 of file display.cpp.
View & pangolin::View::SetLayout | ( | Layout | layout | ) |
Set layout policy for this view.
Definition at line 886 of file display.cpp.
View & pangolin::View::SetLock | ( | Lock | horizontal, |
Lock | vertical | ||
) |
Set how this view should be positioned relative to its parent.
Definition at line 879 of file display.cpp.
double pangolin::View::aspect |
boost::function<void(View&)> pangolin::View::extern_draw_function |
bool pangolin::View::show |
Reimplemented in pangolin::Plotter.
std::vector<View*> pangolin::View::views |