KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
edge_likelihood_util.h
Go to the documentation of this file.
1 /* $Id: edge_likelihood_util.h 14948 2013-07-18 16:00:33Z delpero $ */
35 /* =========================================================================== *
36  |
37  | Copyright (c) 1994-2010 by Kobus Barnard (author)
38  |
39  | Personal and educational use of this code is granted, provided that this
40  | header is kept intact, and that the authorship is not misrepresented, that
41  | its use is acknowledged in publications, and relevant papers are cited.
42  |
43  | For other use contact the author (kobus AT cs DOT arizona DOT edu).
44  |
45  | Please note that the code in this file has not necessarily been adequately
46  | tested. Naturally, there is no guarantee of performance, support, or fitness
47  | for any particular task. Nonetheless, I am interested in hearing about
48  | problems that you encounter.
49  |
50  | Author: Luca Del Pero
51  * =========================================================================== */
52 
53 #ifndef KJB_EDGE_LIKELIHOOD_UTIL_H_
54 #define KJB_EDGE_LIKELIHOOD_UTIL_H_
55 
56 #include <edge_cpp/line_segment.h>
57 #include <edge_cpp/edge.h>
61 
65 namespace kjb {
66 
75  void prepare_model_map(Int_matrix & model_map, const Polymesh & p);
76 
87  void prepare_model_edges(std::vector<Model_edge> & edges, const Polymesh & p, const Base_gl_interface & eye);
88 
96  void prepare_model_map(Int_matrix & model_map, const std::vector<const Polymesh *> & ps);
97 
108  void prepare_model_edges(std::vector<Model_edge> & edges, const std::vector<const Polymesh *> & ps, const Base_gl_interface & eye);
109 
111  (
112  std::vector<Model_edge> & edges,
113  const std::vector<const Polymesh *> & ps,
114  const Base_gl_interface & eye,
115  const Matrix & M,
116  double width,
117  double height,
118  const std::vector<bool> & flagged
119  );
120 
122  (
123  std::vector<Model_edge> & edges,
124  const std::vector<const Polymesh *> & ps,
125  const Base_gl_interface & eye,
126  const Matrix & M,
127  double width,
128  double height
129  );
130 
132  (
133  std::vector<Model_edge> & edges,
134  const Polymesh & p,
135  const Base_gl_interface & eye,
136  const Matrix & M,
137  double width,
138  double height,
139  bool flagged
140  );
141 
143  (
144  std::vector<Model_edge> & edges,
145  const Polymesh & p,
146  const Base_gl_interface & eye,
147  const Matrix & M,
148  double width,
149  double height
150  );
151 
160  void prepare_solid_model_map(Int_matrix & model_map, const std::vector<const Polymesh *> & ps);
161 
170  void prepare_solid_model_map(Int_matrix & model_map, const Polymesh & p);
171 
172  void draw_model_edges(kjb::Image & img, const std::vector<Model_edge> & edges);
173 
177  void prepare_rendered_model_edges(std::vector<Model_edge> & edges, const Int_matrix & model_map);
178 
179  // Used by the prepare_renderend_model_edges() method to sort the points of the model edge
181  {
182  public:
183  bool operator() (const Vector& p1, const Vector& p2)
184  {
185  return p1[0] < p2[0];
186  }
187  };
188 }
189 
190 #endif /* KJB_EDGE_LIKELIHOOD_UTIL_H_ */
191 
Definition: edge_likelihood_util.h:180
void prepare_model_map(Int_matrix &model_map, const Polymesh &p)
Prepares a model map from a polymesh.
Definition: edge_likelihood_util.cpp:35
height
Definition: APPgetLargeConnectedEdges.m:33
This class implements vectors, in the linear-algebra sense, with real-valued elements.
Definition: m_vector.h:87
bool operator()(const Vector &p1, const Vector &p2)
Definition: edge_likelihood_util.h:183
Declarations for Line segment set classes.
void prepare_rendered_model_edges(std::vector< Model_edge > &edges, const Int_matrix &model_map)
Prepares a set of rendered model edges from the model_map.
Definition: edge_likelihood_util.cpp:366
void prepare_model_edges(std::vector< Model_edge > &edges, const Polymesh &p, const Base_gl_interface &eye)
Prepares a set of model edges from a polymesh.
Definition: edge_likelihood_util.cpp:57
edges
Definition: APPgetLargeConnectedEdges.m:85
void draw_model_edges(kjb::Image &img, const std::vector< Model_edge > &edges)
Definition: edge_likelihood_util.cpp:353
Wrapped version of the C struct KJB_image.
Definition: i_image.h:76
void prepare_solid_model_map(Int_matrix &model_map, const std::vector< const Polymesh * > &ps)
Prepares a model map from a polymesh.
Definition: edge_likelihood_util.cpp:342