23 #if defined (HAVE_CONFIG_H)
37 GLdouble p_matrix[16];
40 glGetDoublev (GL_PROJECTION_MATRIX, p_matrix);
41 glGetIntegerv (GL_VIEWPORT, viewport);
42 glMatrixMode (GL_PROJECTION);
45 glMultMatrixd (p_matrix);
46 glMatrixMode (GL_MODELVIEW);
63 # define BUFFER_SIZE 128
68 glEnable (GL_DEPTH_TEST);
69 glDepthFunc (GL_LEQUAL);
77 glRenderMode (GL_SELECT);
84 int hits = glRenderMode (GL_RENDER);
89 GLuint current_minZ = 0xffffffff;
90 GLuint current_name = 0xffffffff;
94 GLuint n = select_buffer[j++],
95 minZ = select_buffer[j++];
98 if (((flags &
select_last) == 0 && (minZ <= current_minZ))
99 || ((flags & select_last) != 0 && (minZ >= current_minZ)))
101 bool candidate =
true;
103 select_buffer[
std::min (j + n, GLuint (BUFFER_SIZE)) - 1];
125 if (current_name != 0xffffffff)
129 warning (
"opengl_selector::select: selection buffer overflow");
158 xp2(0) += (bbox(0) + bbox(2));
159 xp2(1) -= (bbox(1) + bbox(3));
169 glVertex3dv (p1.
data ());
170 glVertex3dv (p2.
data ());
171 glVertex3dv (p3.
data ());
172 glVertex3dv (p4.
data ());
185 fake_text (pos(0), pos(1), pos.
numel () > 2 ? pos(2) : 0.0, bbox);
190 double x,
double y,
double z,
191 int halign,
int valign,
double rotation)
209 double x_pix_size = (nc == 1 ? 1 : (xd(1) - xd(0)) / (nc - 1));
213 double y_pix_size = (nr == 1 ? 1 : (yd(1) - yd(0)) / (nr - 1));
215 ColumnVector p1(3, 0.0), p2(3, 0.0), p3(3, 0.0), p4(3, 0.0);
216 p1(0) = xd(0) - x_pix_size/2;
217 p1(1) = yd(0) - y_pix_size/2;
219 p2(0) = xd(1) + x_pix_size/2;
220 p2(1) = yd(0) - y_pix_size/2;
222 p3(0) = xd(1) + x_pix_size/2;
223 p3(1) = yd(1) + y_pix_size/2;
225 p4(0) = xd(0) - x_pix_size/2;
226 p4(1) = yd(1) + y_pix_size/2;
229 glVertex3dv (p1.data ());
230 glVertex3dv (p2.data ());
231 glVertex3dv (p3.data ());
232 glVertex3dv (p4.
data ());
Octave interface to the compression and uncompression libraries.
virtual void init_marker(const std::string &m, double size, float width)
octave_idx_type rows(void) const
virtual graphics_xform get_transform(void) const
Matrix get_data_position(void) const
octave_value get_cdata(void) const
octave_idx_type numel(void) const
Number of elements in the array.
virtual void draw(const graphics_object &go, bool toplevel=true)
virtual void init_marker(const std::string &m, double size, float width)
virtual void setup_opengl_transformation(const axes::properties &props)
octave_value get_xdata(void) const
virtual void setup_opengl_transformation(const axes::properties &props)
std::map< GLuint, graphics_object > object_map
graphics_object select(const graphics_object &ax, int x, int y, int flags=0)
void apply_pick_matrix(void)
octave_value get_ydata(void) const
bool is_hittest(void) const
octave_idx_type columns(void) const
nd deftypefn *octave_map m
void fake_text(double x, double y, double z, const Matrix &bbox, bool use_scale=true)
Matrix get_extent_matrix(void) const
const T * data(void) const
virtual void draw_image(const image::properties &props)
base_properties & get_properties(void)
Matrix matrix_value(bool frc_str_conv=false) const
octave_value get_string(void) const
void warning(const char *fmt,...)
bool is_empty(void) const
virtual void draw(const graphics_object &go, bool toplevel=true)
=val(i)}if ode{val(i)}occurs in table i
virtual void text_to_pixels(const std::string &txt, uint8NDArray &pixels, Matrix &bbox, int halign=0, int valign=0, double rotation=0.0)
the element is set to zero In other the statement xample y
virtual Matrix render_text(const std::string &txt, double x, double y, double z, int halign, int valign, double rotation=0.0)
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T F77_REAL F77_REAL &F77_RET_T F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE * x
virtual void draw_text(const text::properties &props)
charNDArray min(char d, const charNDArray &m)