GNU Octave  3.8.0
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
opengl_renderer Class Reference

#include "gl-render.h"

Collaboration diagram for opengl_renderer:
Collaboration graph
[legend]

Public Member Functions

 opengl_renderer (void)
virtual ~opengl_renderer (void)
virtual void draw (const graphics_object &go, bool toplevel=true)
virtual void draw (const Matrix &hlist, bool toplevel=false)
virtual graphics_xform get_transform (void) const
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_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 (GLsizei w, GLsizei h, GLenum format, GLenum type, const GLvoid *data)
virtual void draw_surface (const surface::properties &props)
virtual void draw_text (const text::properties &props)
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 std::string &gridstyle, 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_linestyle (const std::string &s, bool stipple=false)
virtual void set_linewidth (float w)
virtual void set_polygon_offset (bool on, double offset=0.0)
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)

Private Member Functions

 opengl_renderer (const opengl_renderer &)
octave_uint8 clip_code (double x, double y, double z) const
void draw_axes_boxes (const axes::properties &props)
void draw_axes_children (const axes::properties &props)
void draw_axes_planes (const axes::properties &props)
void draw_axes_x_grid (const axes::properties &props)
void draw_axes_y_grid (const axes::properties &props)
void draw_axes_z_grid (const axes::properties &props)
bool is_nan_or_inf (double x, double y, double z) const
unsigned int make_marker_list (const std::string &m, double size, bool filled) const
opengl_rendereroperator= (const opengl_renderer &)

Private Attributes

ColumnVector camera_dir
ColumnVector camera_pos
unsigned int filled_marker_id
unsigned int marker_id
ft_render text_renderer
graphics_toolkit toolkit
graphics_xform xform
double xmax
double xmin
double xZ1
double xZ2
double ymax
double ymin
double zmax
double zmin

Detailed Description

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

Constructor & Destructor Documentation

opengl_renderer::opengl_renderer ( void  )
inline

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

virtual opengl_renderer::~opengl_renderer ( void  )
inlinevirtual

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

opengl_renderer::opengl_renderer ( const opengl_renderer )
inlineprivate

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

Member Function Documentation

octave_uint8 opengl_renderer::clip_code ( double  x,
double  y,
double  z 
) const
inlineprivate

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

References xmax(), and xmin().

virtual void opengl_renderer::draw ( const graphics_object go,
bool  toplevel = true 
)
virtual
virtual void opengl_renderer::draw ( const Matrix hlist,
bool  toplevel = false 
)
inlinevirtual

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

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

virtual void opengl_renderer::draw_axes ( const axes::properties props)
protectedvirtual
void opengl_renderer::draw_axes_boxes ( const axes::properties props)
private
void opengl_renderer::draw_axes_children ( const axes::properties props)
private
void opengl_renderer::draw_axes_planes ( const axes::properties props)
private
void opengl_renderer::draw_axes_x_grid ( const axes::properties props)
private
void opengl_renderer::draw_axes_y_grid ( const axes::properties props)
private
void opengl_renderer::draw_axes_z_grid ( const axes::properties props)
private
virtual void opengl_renderer::draw_figure ( const figure::properties props)
protectedvirtual
virtual void opengl_renderer::draw_hggroup ( const hggroup::properties props)
protectedvirtual
virtual void opengl_renderer::draw_image ( const image::properties props)
protectedvirtual
virtual void opengl_renderer::draw_line ( const line::properties props)
protectedvirtual
virtual void opengl_renderer::draw_marker ( double  x,
double  y,
double  z,
const Matrix lc,
const Matrix fc 
)
protectedvirtual
virtual void opengl_renderer::draw_patch ( const patch::properties props)
protectedvirtual
virtual void opengl_renderer::draw_pixels ( GLsizei  w,
GLsizei  h,
GLenum  format,
GLenum  type,
const GLvoid *  data 
)
protectedvirtual
virtual void opengl_renderer::draw_surface ( const surface::properties props)
protectedvirtual
virtual void opengl_renderer::draw_text ( const text::properties props)
protectedvirtual
virtual void opengl_renderer::draw_uipanel ( const uipanel::properties props,
const graphics_object go 
)
protectedvirtual
virtual void opengl_renderer::end_marker ( void  )
protectedvirtual
virtual graphics_xform opengl_renderer::get_transform ( void  ) const
inlinevirtual

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

References xform().

virtual void opengl_renderer::init_gl_context ( bool  enhanced,
const Matrix backgroundColor 
)
protectedvirtual
virtual void opengl_renderer::init_marker ( const std::string &  m,
double  size,
float  width 
)
protectedvirtual
bool opengl_renderer::is_nan_or_inf ( double  x,
double  y,
double  z 
) const
inlineprivate

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

References xisinf(), and xisnan().

unsigned int opengl_renderer::make_marker_list ( const std::string &  m,
double  size,
bool  filled 
) const
private
opengl_renderer& opengl_renderer::operator= ( const opengl_renderer )
inlineprivate

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

virtual void opengl_renderer::render_grid ( const std::string &  gridstyle,
const Matrix ticks,
double  lim1,
double  lim2,
double  p1,
double  p1N,
double  p2,
double  p2N,
int  xyz,
bool  is_3D 
)
protectedvirtual
virtual Matrix opengl_renderer::render_text ( const std::string &  txt,
double  x,
double  y,
double  z,
int  halign,
int  valign,
double  rotation = 0.0 
)
protectedvirtual
virtual void 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 
)
protectedvirtual
virtual void 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 
)
protectedvirtual
virtual void opengl_renderer::set_clipbox ( double  x1,
double  x2,
double  y1,
double  y2,
double  z1,
double  z2 
)
protectedvirtual
virtual void opengl_renderer::set_clipping ( bool  on)
protectedvirtual
virtual void opengl_renderer::set_color ( const Matrix c)
protectedvirtual
virtual void opengl_renderer::set_font ( const base_properties props)
protectedvirtual
virtual void opengl_renderer::set_linestyle ( const std::string &  s,
bool  stipple = false 
)
protectedvirtual
virtual void opengl_renderer::set_linewidth ( float  w)
protectedvirtual
virtual void opengl_renderer::set_polygon_offset ( bool  on,
double  offset = 0.0 
)
protectedvirtual
virtual void opengl_renderer::set_viewport ( int  w,
int  h 
)
virtual
virtual void opengl_renderer::setup_opengl_transformation ( const axes::properties props)
protectedvirtual
virtual void opengl_renderer::text_to_pixels ( const std::string &  txt,
uint8NDArray pixels,
Matrix bbox,
int  halign = 0,
int  valign = 0,
double  rotation = 0.0 
)
protectedvirtual

Member Data Documentation

ColumnVector opengl_renderer::camera_dir
private

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

ColumnVector opengl_renderer::camera_pos
private

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

unsigned int opengl_renderer::filled_marker_id
private

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

unsigned int opengl_renderer::marker_id
private

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

ft_render opengl_renderer::text_renderer
private

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

graphics_toolkit opengl_renderer::toolkit
private

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

graphics_xform opengl_renderer::xform
private

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

double opengl_renderer::xmax
private

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

double opengl_renderer::xmin
private

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

double opengl_renderer::xZ1
private

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

double opengl_renderer::xZ2
private

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

double opengl_renderer::ymax
private

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

double opengl_renderer::ymin
private

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

double opengl_renderer::zmax
private

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

double opengl_renderer::zmin
private

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


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