KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gr_polymesh_renderer.h
Go to the documentation of this file.
1 /* $Id: gr_polymesh_renderer.h 18278 2014-11-25 01:42:10Z ksimek $ */
2 
3 /* =========================================================================== *
4 |
5 | Copyright (c) 1994-2008 by Kobus Barnard (author).
6 |
7 | Personal and educational use of this code is granted, provided that this
8 | header is kept intact, and that the authorship is not misrepresented, that
9 | its use is acknowledged in publications, and relevant papers are cited.
10 |
11 | For other use contact the author (kobus AT cs DOT arizona DOT edu).
12 |
13 | Please note that the code in this file has not necessarily been adequately
14 | tested. Naturally, there is no guarantee of performance, support, or fitness
15 | for any particular task. Nonetheless, I am interested in hearing about
16 | problems that you encounter.
17 |
18 | Author: Luca Del Pero
19 |
20 * =========================================================================== */
21 
22 #ifndef POLYMESH_RENDERER_H_INCLUDED
23 #define POLYMESH_RENDERER_H_INCLUDED
24 
25 #include <vector>
26 //#include "gr_cpp/gr_polymesh.h"
27 #include "gr_cpp/gr_parapiped.h"
28 #include "gr_cpp/gr_camera.h"
29 
30 namespace kjb {
31 
32 class Parapiped;
34 {
35 public:
36 
38  static void wire_render(const Polymesh &);
40  static void wire_occlude_render(const Polymesh &);
41 
42  static void solid_occlude_render(const Polymesh &p);
43 
45  static void solid_render(const Polymesh &);
47  static void project(Polymesh &);
48 
55  static unsigned int wire_render_with_sequential_ids(const Polymesh &, unsigned int start_id = 1);
56 
63  static unsigned int wire_render_with_sequential_ids_16bits
64  (
65  const Polymesh &,
66  unsigned int start_id = 1
67  );
68 
75  static unsigned int solid_render_with_sequential_ids(const Polymesh &, unsigned int start_id = 1);
76 
77  static void solid_render_with_bases(const Polymesh &p, unsigned int base1 = 0, unsigned int base2 = 0);
78 
79  static void solid_render_orientations_with_bases(const Polymesh &p, unsigned int base1);
80 
84  static void silhouette_render(const kjb::Base_gl_interface & camera, const Polymesh & p, double iwidth = 1.0);
85 
87  static void draw_orientation_map(const kjb::Parapiped & p);
88 
93  static void draw_left_right_orientation_map(const kjb::Parapiped & p);
94 
95  static void draw_CMU_orientation_map(const kjb::Parapiped & p);
96 
97  static void draw_geometric_context_map(const kjb::Parapiped & p);
98 };
99 
100 }
101 
102 #endif
103 
static void solid_occlude_render(const Polymesh &p)
Definition: gr_polymesh_renderer.cpp:61
static void draw_CMU_orientation_map(const kjb::Parapiped &p)
Definition: gr_polymesh_renderer.cpp:517
classes to interface camera models to opengl for rendering
static void solid_render_orientations_with_bases(const Polymesh &p, unsigned int base1)
Definition: gr_polymesh_renderer.cpp:149
Parallelepiped: a hexahedron of which each face is a parallelegram.
Definition: gr_parapiped.h:83
Definition: gr_polymesh_renderer.h:33
static void draw_orientation_map(const kjb::Parapiped &p)
Draws the orientation map given a parapiped. This function must be moved somewhere else...
Definition: gr_polymesh_renderer.cpp:354
static void wire_render(const Polymesh &)
Renders this polymesh as a wireframe using OpenGL.
Definition: gr_polymesh_renderer.cpp:32
static void project(Polymesh &)
Projects this polymesh onto the image plane using the current OpenGL transformation.
Definition: gr_polymesh_renderer.cpp:342
Abstract class of connected polygons (faces) forming a mesh. We assume that each edge is shared betwe...
Definition: gr_polymesh.h:89
Parallelepiped: a hexahedron of which each face is a parallelegram.
static unsigned int wire_render_with_sequential_ids_16bits(const Polymesh &, unsigned int start_id=1)
Render each edge of this polymesh with a different color. The first edge will be rendered using the i...
Definition: gr_polymesh_renderer.cpp:116
static void solid_render(const Polymesh &)
Renders this polymesh as a solid using OpenGL.
Definition: gr_polymesh_renderer.cpp:72
Definition: gr_camera.h:103
static void draw_left_right_orientation_map(const kjb::Parapiped &p)
Draws the left-right orientation map given a parapiped. This function assumes that the parapiped is l...
Definition: gr_polymesh_renderer.cpp:376
static unsigned int wire_render_with_sequential_ids(const Polymesh &, unsigned int start_id=1)
Render each edge of this polymesh with a different color. The first edge will be rendered using the i...
Definition: gr_polymesh_renderer.cpp:89
static void wire_occlude_render(const Polymesh &)
Renders this polymesh into the depth buffer using OpenGL.
Definition: gr_polymesh_renderer.cpp:47
static void solid_render_with_bases(const Polymesh &p, unsigned int base1=0, unsigned int base2=0)
Definition: gr_polymesh_renderer.cpp:296
static void draw_geometric_context_map(const kjb::Parapiped &p)
Definition: gr_polymesh_renderer.cpp:541
static unsigned int solid_render_with_sequential_ids(const Polymesh &, unsigned int start_id=1)
Render each polygon of this polymesh with a different color. The first polygon will be rendered using...
Definition: gr_polymesh_renderer.cpp:319
static void silhouette_render(const kjb::Base_gl_interface &camera, const Polymesh &p, double iwidth=1.0)
Renders the silhouette (contour) of this polygonal mesh. This method works only for convex meshes...
Definition: gr_polymesh_renderer.cpp:477