GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
octave::opengl_selector Class Reference

#include "gl-select.h"

Inheritance diagram for octave::opengl_selector:
Inheritance graph
[legend]
Collaboration diagram for octave::opengl_selector:
Collaboration graph
[legend]

Public Member Functions

 opengl_selector (void)
 
virtual ~opengl_selector (void)
 
virtual void draw (const Matrix &hlist, bool toplevel=false)
 
virtual void draw (const graphics_object &go, bool toplevel=true)
 
virtual void finish (void)
 
virtual graphics_xform get_transform (void) const
 
graphics_object select (const graphics_object &ax, int x, int y, int flags=0)
 
virtual void set_viewport (int w, int h)
 

Protected Member Functions

virtual void draw_axes (const axes::properties &props)
 
virtual void draw_figure (const figure::properties &props)
 
virtual void draw_hggroup (const hggroup::properties &props)
 
virtual void draw_image (const image::properties &props)
 
virtual void draw_light (const light::properties &props)
 
virtual void draw_line (const line::properties &props)
 
virtual void draw_marker (double x, double y, double z, const Matrix &lc, const Matrix &fc)
 
virtual void draw_patch (const patch::properties &props)
 
virtual void draw_pixels (int w, int h, const float *data)
 
virtual void draw_pixels (int w, int h, const uint8_t *data)
 
virtual void draw_pixels (int w, int h, const uint16_t *data)
 
virtual void draw_surface (const surface::properties &props)
 
virtual void draw_text (const text::properties &props)
 
virtual void draw_uibuttongroup (const uibuttongroup::properties &props, const graphics_object &go)
 
virtual void draw_uipanel (const uipanel::properties &props, const graphics_object &go)
 
virtual void end_marker (void)
 
virtual void init_gl_context (bool enhanced, const Matrix &backgroundColor)
 
virtual void init_marker (const std::string &m, double size, float width)
 
virtual void render_grid (const double linewidth, const std::string &gridstyle, const Matrix &gridcolor, const double gridalpha, const Matrix &ticks, double lim1, double lim2, double p1, double p1N, double p2, double p2N, int xyz, bool is_3D)
 
virtual Matrix render_text (const std::string &txt, double x, double y, double z, int halign, int valign, double rotation=0.0)
 
virtual void render_tickmarks (const Matrix &ticks, double lim1, double lim2, double p1, double p1N, double p2, double p2N, double dx, double dy, double dz, int xyz, bool doubleside)
 
virtual void render_ticktexts (const Matrix &ticks, const string_vector &ticklabels, double lim1, double lim2, double p1, double p2, int xyz, int ha, int va, int &wmax, int &hmax)
 
virtual void set_clipbox (double x1, double x2, double y1, double y2, double z1, double z2)
 
virtual void set_clipping (bool on)
 
virtual void set_color (const Matrix &c)
 
virtual void set_font (const base_properties &props)
 
virtual void set_interpreter (const caseless_str &interp)
 
virtual void set_linestyle (const std::string &s, bool stipple=false, double linewidth=0.5)
 
virtual void set_linewidth (float w)
 
virtual void set_polygon_offset (bool on, float offset=0.0f)
 
virtual void setup_opengl_transformation (const axes::properties &props)
 
virtual void text_to_pixels (const std::string &txt, uint8NDArray &pixels, Matrix &bbox, int halign=0, int valign=0, double rotation=0.0)
 
virtual void text_to_strlist (const std::string &txt, std::list< text_renderer::string > &lst, Matrix &bbox, int halign=0, int valign=0, double rotation=0.0)
 

Private Member Functions

void apply_pick_matrix (void)
 
void fake_text (double x, double y, double z, const Matrix &bbox, bool use_scale=true)
 

Private Attributes

std::map< GLuint, graphics_objectobject_map
 
int size
 
int xp
 
int yp
 

Detailed Description

Definition at line 40 of file gl-select.h.

Constructor & Destructor Documentation

octave::opengl_selector::opengl_selector ( void  )
inline

Definition at line 43 of file gl-select.h.

virtual octave::opengl_selector::~opengl_selector ( void  )
inlinevirtual

Definition at line 45 of file gl-select.h.

Member Function Documentation

void octave::opengl_selector::apply_pick_matrix ( void  )
private

Definition at line 35 of file gl-select.cc.

References size, xp, and yp.

Referenced by init_marker(), and setup_opengl_transformation().

virtual void octave::opengl_renderer::draw ( const Matrix hlist,
bool  toplevel = false 
)
inlinevirtualinherited

Definition at line 45 of file gl-render.h.

References gh_manager::get_object(), and Array< T >::numel().

void octave::opengl_selector::draw ( const graphics_object go,
bool  toplevel = true 
)
virtual

Reimplemented from octave::opengl_renderer.

Definition at line 137 of file gl-select.cc.

References octave::opengl_renderer::draw(), name, and object_map.

Referenced by select().

void octave::opengl_renderer::draw_axes ( const axes::properties props)
protectedvirtualinherited
void octave::opengl_renderer::draw_figure ( const figure::properties props)
protectedvirtualinherited
void octave::opengl_renderer::draw_hggroup ( const hggroup::properties props)
protectedvirtualinherited
void octave::opengl_selector::draw_image ( const image::properties props)
protectedvirtual
void octave::opengl_renderer::draw_light ( const light::properties props)
protectedvirtualinherited
void octave::opengl_renderer::draw_line ( const line::properties props)
protectedvirtualinherited
void octave::opengl_renderer::draw_marker ( double  x,
double  y,
double  z,
const Matrix lc,
const Matrix fc 
)
protectedvirtualinherited
void octave::opengl_renderer::draw_patch ( const patch::properties props)
protectedvirtualinherited

Definition at line 2732 of file gl-render.cc.

References a, octave::opengl_tesselator::add_vertex(), octave::vertex_data::vertex_data_rep::ambient, patch::properties::backfacelighting_is(), octave::opengl_tesselator::begin_contour(), octave::opengl_tesselator::begin_polygon(), c, octave::vertex_data::vertex_data_rep::color, Array< T >::columns(), octave::vertex_data::vertex_data_rep::coords, Array< T >::data(), octave::vertex_data::vertex_data_rep::diffuse, octave::opengl_renderer::draw_marker(), patch::properties::edgealpha_is(), patch::properties::edgealpha_is_double(), patch::properties::edgecolor_is(), patch::properties::edgecolor_is_rgb(), patch::properties::edgelighting_is(), octave::opengl_tesselator::end_contour(), octave::opengl_renderer::end_marker(), octave::opengl_tesselator::end_polygon(), f, patch::properties::facealpha_is(), patch::properties::facealpha_is_double(), patch::properties::facecolor_is(), patch::properties::facecolor_is_rgb(), patch::properties::facelighting_is(), octave::FLAT, Array< T >::fortran_vec(), patch::properties::get_ambientstrength(), patch::properties::get_color_data(), patch::properties::get_diffusestrength(), patch::properties::get_edgealpha_double(), patch::properties::get_edgecolor_rgb(), patch::properties::get_facealpha_double(), patch::properties::get_facecolor_rgb(), patch::properties::get_faces(), patch::properties::get_linestyle(), patch::properties::get_linewidth(), patch::properties::get_marker(), patch::properties::get_markeredgecolor_rgb(), patch::properties::get_markerfacecolor_rgb(), patch::properties::get_markersize(), patch::properties::get_specularcolorreflectance(), patch::properties::get_specularexponent(), patch::properties::get_specularstrength(), patch::properties::get_vertexnormals(), patch::properties::get_vertices(), octave::GOURAUD, patch::properties::has_bad_data(), octave::opengl_renderer::init_marker(), octave::INTERP, Array< T >::is_empty(), octave::opengl_renderer::is_nan_or_inf(), octave::math::isnan(), k, LIGHT_MODE, patch::properties::linestyle_is(), m, patch::properties::marker_is(), patch::properties::markeredgecolor_is(), patch::properties::markerfacecolor_is(), octave_value::matrix_value(), nn, octave::opengl_renderer::num_lights, Array< T >::numel(), panic_impossible, Matrix::resize(), Array< T >::rows(), graphics_xform::scale(), octave::opengl_renderer::set_linestyle(), octave::opengl_renderer::set_linewidth(), octave::vertex_data::vertex_data_rep::specular, octave::vertex_data::vertex_data_rep::specular_color_refl, string, octave::UNIFORM, octave::opengl_renderer::view_vector, warning(), and octave::opengl_renderer::xform.

Referenced by octave::opengl_renderer::draw().

void octave::opengl_renderer::draw_pixels ( int  w,
int  h,
const float *  data 
)
protectedvirtualinherited

Definition at line 3501 of file gl-render.cc.

References panic_impossible.

Referenced by octave::opengl_renderer::draw_image().

void octave::opengl_renderer::draw_pixels ( int  w,
int  h,
const uint8_t *  data 
)
protectedvirtualinherited

Definition at line 3522 of file gl-render.cc.

References panic_impossible.

void octave::opengl_renderer::draw_pixels ( int  w,
int  h,
const uint16_t *  data 
)
protectedvirtualinherited

Definition at line 3543 of file gl-render.cc.

References panic_impossible.

void octave::opengl_renderer::draw_surface ( const surface::properties props)
protectedvirtualinherited

Definition at line 2120 of file gl-render.cc.

References a, octave_value::array_value(), surface::properties::backfacelighting_is(), c, Array< T >::columns(), octave::opengl_texture::create(), Array< T >::data(), Array< T >::dims(), octave::opengl_renderer::draw_marker(), surface::properties::edgealpha_is(), surface::properties::edgealpha_is_double(), surface::properties::edgecolor_is(), surface::properties::edgecolor_is_rgb(), surface::properties::edgelighting_is(), octave::opengl_renderer::end_marker(), f, surface::properties::facealpha_is(), surface::properties::facealpha_is_double(), surface::properties::facecolor_is(), surface::properties::facecolor_is_rgb(), surface::properties::facelighting_is(), octave::math::finite(), octave::FLAT, surface::properties::get_ambientstrength(), surface::properties::get_color_data(), surface::properties::get_diffusestrength(), surface::properties::get_edgealpha_double(), surface::properties::get_edgecolor_rgb(), surface::properties::get_facealpha_double(), surface::properties::get_facecolor_rgb(), surface::properties::get_linestyle(), surface::properties::get_linewidth(), surface::properties::get_marker(), surface::properties::get_markeredgecolor_rgb(), surface::properties::get_markerfacecolor_rgb(), surface::properties::get_markersize(), surface::properties::get_specularcolorreflectance(), surface::properties::get_specularexponent(), surface::properties::get_specularstrength(), surface::properties::get_vertexnormals(), surface::properties::get_xdata(), surface::properties::get_ydata(), surface::properties::get_zdata(), octave::GOURAUD, octave::opengl_renderer::init_marker(), octave::INTERP, Array< T >::is_empty(), octave::opengl_renderer::is_nan_or_inf(), k, LIGHT_MODE, surface::properties::linestyle_is(), surface::properties::marker_is(), surface::properties::markeredgecolor_is(), surface::properties::markerfacecolor_is(), octave_value::matrix_value(), surface::properties::meshstyle_is(), octave::opengl_renderer::num_lights, panic_impossible, Array< T >::rows(), octave::opengl_renderer::set_linestyle(), octave::opengl_renderer::set_linewidth(), octave::opengl_renderer::set_normal(), octave::opengl_renderer::set_polygon_offset(), octave::opengl_texture::tex_coord(), octave::TEXTURE, octave::UNIFORM, x, octave::opengl_renderer::xform, graphics_xform::xscale(), y, graphics_xform::yscale(), and graphics_xform::zscale().

Referenced by octave::opengl_renderer::draw().

void octave::opengl_selector::draw_text ( const text::properties props)
protectedvirtual
void octave::opengl_renderer::draw_uibuttongroup ( const uibuttongroup::properties props,
const graphics_object go 
)
protectedvirtualinherited
void octave::opengl_renderer::draw_uipanel ( const uipanel::properties props,
const graphics_object go 
)
protectedvirtualinherited
void octave::opengl_renderer::end_marker ( void  )
protectedvirtualinherited
void octave::opengl_selector::fake_text ( double  x,
double  y,
double  z,
const Matrix bbox,
bool  use_scale = true 
)
private
void octave::opengl_renderer::finish ( void  )
virtualinherited

Definition at line 1077 of file gl-render.cc.

References panic_impossible.

Referenced by G__osmesa_print__().

virtual graphics_xform octave::opengl_renderer::get_transform ( void  ) const
inlinevirtualinherited

Definition at line 59 of file gl-render.h.

References xform().

Referenced by fake_text().

void octave::opengl_renderer::init_gl_context ( bool  enhanced,
const Matrix backgroundColor 
)
protectedvirtualinherited
void octave::opengl_selector::init_marker ( const std::string m,
double  size,
float  width 
)
protectedvirtual

Reimplemented from octave::opengl_renderer.

Definition at line 57 of file gl-select.cc.

References apply_pick_matrix(), and octave::opengl_renderer::init_marker().

void octave::opengl_renderer::render_grid ( const double  linewidth,
const std::string gridstyle,
const Matrix gridcolor,
const double  gridalpha,
const Matrix ticks,
double  lim1,
double  lim2,
double  p1,
double  p1N,
double  p2,
double  p2N,
int  xyz,
bool  is_3D 
)
protectedvirtualinherited
Matrix octave::opengl_selector::render_text ( const std::string txt,
double  x,
double  y,
double  z,
int  halign,
int  valign,
double  rotation = 0.0 
)
protectedvirtual

Reimplemented from octave::opengl_renderer.

Definition at line 189 of file gl-select.cc.

References fake_text(), and octave::opengl_renderer::text_to_pixels().

void octave::opengl_renderer::render_tickmarks ( const Matrix ticks,
double  lim1,
double  lim2,
double  p1,
double  p1N,
double  p2,
double  p2N,
double  dx,
double  dy,
double  dz,
int  xyz,
bool  doubleside 
)
protectedvirtualinherited
void octave::opengl_renderer::render_ticktexts ( const Matrix ticks,
const string_vector ticklabels,
double  lim1,
double  lim2,
double  p1,
double  p2,
int  xyz,
int  ha,
int  va,
int wmax,
int hmax 
)
protectedvirtualinherited
graphics_object octave::opengl_selector::select ( const graphics_object ax,
int  x,
int  y,
int  flags = 0 
)
void octave::opengl_renderer::set_clipbox ( double  x1,
double  x2,
double  y1,
double  y2,
double  z1,
double  z2 
)
protectedvirtualinherited
void octave::opengl_renderer::set_clipping ( bool  on)
protectedvirtualinherited
void octave::opengl_renderer::set_color ( const Matrix c)
protectedvirtualinherited
void octave::opengl_renderer::set_font ( const base_properties props)
protectedvirtualinherited
virtual void octave::opengl_renderer::set_interpreter ( const caseless_str interp)
inlineprotectedvirtualinherited

Definition at line 89 of file gl-render.h.

Referenced by octave::opengl_renderer::draw_axes().

void octave::opengl_renderer::set_linestyle ( const std::string s,
bool  stipple = false,
double  linewidth = 0.5 
)
protectedvirtualinherited
void octave::opengl_renderer::set_linewidth ( float  w)
protectedvirtualinherited
void octave::opengl_renderer::set_polygon_offset ( bool  on,
float  offset = 0.0f 
)
protectedvirtualinherited
void octave::opengl_renderer::set_viewport ( int  w,
int  h 
)
virtualinherited

Definition at line 3481 of file gl-render.cc.

References panic_impossible.

Referenced by QtHandles::GLCanvas::draw(), and QtHandles::GLCanvas::selectFromAxes().

void octave::opengl_selector::setup_opengl_transformation ( const axes::properties props)
protectedvirtual
void octave::opengl_renderer::text_to_pixels ( const std::string txt,
uint8NDArray pixels,
Matrix bbox,
int  halign = 0,
int  valign = 0,
double  rotation = 0.0 
)
protectedvirtualinherited
void octave::opengl_renderer::text_to_strlist ( const std::string txt,
std::list< text_renderer::string > &  lst,
Matrix bbox,
int  halign = 0,
int  valign = 0,
double  rotation = 0.0 
)
protectedvirtualinherited

Member Data Documentation

std::map<GLuint, graphics_object> octave::opengl_selector::object_map
private

Definition at line 79 of file gl-select.h.

Referenced by draw(), and select().

int octave::opengl_selector::size
private

Definition at line 76 of file gl-select.h.

Referenced by apply_pick_matrix().

int octave::opengl_selector::xp
private

Definition at line 73 of file gl-select.h.

Referenced by apply_pick_matrix(), and select().

int octave::opengl_selector::yp
private

Definition at line 73 of file gl-select.h.

Referenced by apply_pick_matrix(), and select().


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