KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gr_polygon_renderer.h
Go to the documentation of this file.
1 
2 /* $Id: gr_polygon_renderer.h 18278 2014-11-25 01:42:10Z ksimek $ */
3 
4 /* =========================================================================== *
5 |
6 | Copyright (c) 1994-2008 by Kobus Barnard (author).
7 |
8 | Personal and educational use of this code is granted, provided that this
9 | header is kept intact, and that the authorship is not misrepresented, that
10 | its use is acknowledged in publications, and relevant papers are cited.
11 |
12 | For other use contact the author (kobus AT cs DOT arizona DOT edu).
13 |
14 | Please note that the code in this file has not necessarily been adequately
15 | tested. Naturally, there is no guarantee of performance, support, or fitness
16 | for any particular task. Nonetheless, I am interested in hearing about
17 | problems that you encounter.
18 |
19 | Author: Luca Del Pero
20 |
21 * =========================================================================== */
22 
23 #ifndef POLYGON_RENDERER_H_INCLUDED
24 #define POLYGON_RENDERER_H_INCLUDED
25 
26 #include <vector>
27 #include "gr_cpp/gr_polygon.h"
28 #include "gr_cpp/gr_camera.h"
29 
30 namespace kjb {
31 
33 {
34 public:
35 
37  static void wire_render(const Polygon &);
38 
40  static void wire_occlude_render(const Polygon &);
41 
43  static void solid_occlude_render(const Polygon &);
44 
51  static unsigned int wire_render_with_sequential_ids(const Polygon &, unsigned int start_id = 1);
52 
53  static unsigned int wire_render_with_sequential_ids_16bits
54  (
55  const Polygon &p,
56  unsigned int start_id = 1
57  );
58 
60  static void solid_render(const Polygon &);
61 
63  static void solid_render_with_bases(const Polygon & p, unsigned int base1 = 0, unsigned int base2 = 0);
64 
66  static void project(Polygon & p);
67 
68  static void project(Polygon & p, const Matrix & M, double width, double height);
69 };
70 
71 }
72 
73 #endif
74 
static void project(Polygon &p)
Projects this polygon onto the image plane using the current OpenGL transformation.
Definition: gr_polygon_renderer.cpp:319
static void wire_occlude_render(const Polygon &)
Renders this polygon into the depth buffer using OpenGL, excluding the contour.
Definition: gr_polygon_renderer.cpp:216
classes to interface camera models to opengl for rendering
height
Definition: APPgetLargeConnectedEdges.m:33
static void wire_render(const Polygon &)
Renders this polygon as a wireframe using OpenGL.
Definition: gr_polygon_renderer.cpp:36
static void solid_render_with_bases(const Polygon &p, unsigned int base1=0, unsigned int base2=0)
Renders this polygon as a solid using OpenGL.
Definition: gr_polygon_renderer.cpp:178
Definition: gr_polygon_renderer.h:32
Definition: gr_polygon.h:36
static unsigned int wire_render_with_sequential_ids(const Polygon &, unsigned int start_id=1)
Render each edge of this polygon with a different color. The first edge will be rendered using the in...
Definition: gr_polygon_renderer.cpp:69
static void solid_render(const Polygon &)
Renders this polygon as a solid using OpenGL.
Definition: gr_polygon_renderer.cpp:291
static void solid_occlude_render(const Polygon &)
Renders this polygon in the Z buffer.
Definition: gr_polygon_renderer.cpp:265
This class implements matrices, in the linear-algebra sense, with real-valued elements.
Definition: m_matrix.h:94
static unsigned int wire_render_with_sequential_ids_16bits(const Polygon &p, unsigned int start_id=1)
Definition: gr_polygon_renderer.cpp:125