KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gr_right_triangle_pair.h
Go to the documentation of this file.
1 /* $Id$ */
35 /* =========================================================================== *
36 |
37 | Copyright (c) 1994-2008 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 | Authors:
51 | Emily Hartley
52 |
53 * =========================================================================== */
54 
55 #ifndef KJB_RIGHT_TRIANGLE_PAIR_H
56 #define KJB_RIGHT_TRIANGLE_PAIR_H
57 
58 #include "gr_cpp/gr_polymesh.h"
59 namespace kjb{
60 
61 
63 {
64  public:
66  Right_Triangle_Pair(const Polymesh& p);
67 
68  Right_Triangle_Pair(const Polymesh& p, int triangle1, int triangle2, int hypotenuse1, int hypotenuse2, Vector edges1, Vector edges2);
69 
72 
75 
78 
80  inline const Polymesh* get_polymesh() const
81  {
82  return m_p;
83  }
84 
86  inline int get_triangle1() const
87  {
88  return index_triangle1;
89  }
90 
92  inline int get_triangle2() const
93  {
94  return index_triangle2;
95  }
96 
98  inline int get_hypotenuse1() const
99  {
100  return m_hypotenuse1;
101  }
102 
104  inline int get_hypotenuse2() const
105  {
106  return m_hypotenuse2;
107  }
108 
114  inline const Vector & get_parallel_edges1() const
115  {
116  return parallel_edges1;
117  }
118 
124  inline const Vector & get_parallel_edges2() const
125  {
126  return parallel_edges2;
127  }
128 
129  private:
130 
131  const Polymesh* m_p;
132 
133  int index_triangle1;
134  int index_triangle2;
135 
136  int m_hypotenuse1;
137  int m_hypotenuse2;
138 
139  Vector parallel_edges1;
140  Vector parallel_edges2;
141 };
142 
143 }
144 
145 #endif
~Right_Triangle_Pair()
Deletes this Right_Triangle_Pair.
Definition: gr_right_triangle_pair.cpp:109
int get_hypotenuse2() const
Returns the index of the hypotenuse of triangle2.
Definition: gr_right_triangle_pair.h:104
int get_triangle2() const
Returns the index of the other right triangles.
Definition: gr_right_triangle_pair.h:92
Right_Triangle_Pair(const Polymesh &p)
Constructs a right_triangle_pair from a polymesh.
Definition: gr_right_triangle_pair.cpp:63
int get_hypotenuse1() const
Returns the index of the hypotenuse of triangle1.
Definition: gr_right_triangle_pair.h:98
Definition: gr_right_triangle_pair.h:62
This class implements vectors, in the linear-algebra sense, with real-valued elements.
Definition: m_vector.h:87
const Vector & get_parallel_edges1() const
Returns the Vector containing the indices of the parallel edges in the rectangle formed by the two ri...
Definition: gr_right_triangle_pair.h:114
Abstract class of connected polygons (faces) forming a mesh.
Right_Triangle_Pair & operator=(const Right_Triangle_Pair &rtp)
Copies a Right_Triangle_Pair into this one.
Definition: gr_right_triangle_pair.cpp:120
Abstract class of connected polygons (faces) forming a mesh. We assume that each edge is shared betwe...
Definition: gr_polymesh.h:89
const Vector & get_parallel_edges2() const
Returns the Vector containing the indices of the parallel edges in the rectangle formed by the two ri...
Definition: gr_right_triangle_pair.h:124
int get_triangle1() const
Returns the index of one of the right triangles.
Definition: gr_right_triangle_pair.h:86
const Polymesh * get_polymesh() const
Returns the polymesh.
Definition: gr_right_triangle_pair.h:80