63 #ifndef KJB_PARAPIPED_H
64 #define KJB_PARAPIPED_H
90 double x1,
double y1,
double z1,
91 double x2,
double y2,
double z2,
92 double x3,
double y3,
double z3,
93 double x4,
double y4,
double z4
159 virtual void write(std::ostream& out)
const
165 double x1,
double y1,
double z1,
166 double x2,
double y2,
double z2,
167 double x3,
double y3,
double z3,
168 double x4,
double y4,
double z4
175 virtual unsigned int adjacent_face(
unsigned int f,
unsigned int e)
const
193 std::vector<int> & base_edge_indexes,
194 std::vector<int> & vertical_edge_indexes,
195 std::vector<int> & top_edge_indexes
198 base_edge_indexes.push_back(2);
199 base_edge_indexes.push_back(4);
200 base_edge_indexes.push_back(12);
201 base_edge_indexes.push_back(13);
202 base_edge_indexes.push_back(14);
203 base_edge_indexes.push_back(15);
204 base_edge_indexes.push_back(18);
205 base_edge_indexes.push_back(23);
208 vertical_edge_indexes.push_back(1);
209 vertical_edge_indexes.push_back(3);
210 vertical_edge_indexes.push_back(5);
211 vertical_edge_indexes.push_back(7);
212 vertical_edge_indexes.push_back(17);
213 vertical_edge_indexes.push_back(19);
214 vertical_edge_indexes.push_back(20);
215 vertical_edge_indexes.push_back(22);
217 top_edge_indexes.push_back(0);
218 top_edge_indexes.push_back(6);
219 top_edge_indexes.push_back(8);
220 top_edge_indexes.push_back(9);
221 top_edge_indexes.push_back(10);
222 top_edge_indexes.push_back(11);
223 top_edge_indexes.push_back(16);
224 top_edge_indexes.push_back(21);
250 void create_adjacency_matrix();
void set_points(double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3, double x4, double y4, double z4)
reset the points of this parapiped
Definition: gr_parapiped.cpp:615
static void get_edge_indexes(std::vector< int > &base_edge_indexes, std::vector< int > &vertical_edge_indexes, std::vector< int > &top_edge_indexes)
Definition: gr_parapiped.h:192
Definition for the Int_matrix class, a thin wrapper on the KJB Int_matrix struct and its related func...
void draw_orientation_map() const
Definition: gr_parapiped.cpp:758
void draw_CMU_orientation_map() const
Definition: gr_parapiped.cpp:768
y2
Definition: APPgetLargeConnectedEdges.m:125
Object thrown when an index argument exceeds the size of a container.
Definition: l_exception.h:399
static int get_num_edges()
Definition: gr_parapiped.h:186
This class implements matrices, in the linear-algebra sense, restricted to integer-valued elements...
Definition: l_int_matrix.h:71
std::vector< kjb::Vector > points
Points defining this parapiped.
Definition: gr_parapiped.h:230
void draw_geometric_context_map() const
Definition: gr_parapiped.cpp:773
virtual void write(std::ostream &out) const
Writes this parallelepiped to an output stream.
Definition: gr_parapiped.cpp:519
This class implements vectors, in the linear-algebra sense, with real-valued elements.
Definition: m_vector.h:87
Parallelepiped: a hexahedron of which each face is a parallelegram.
Definition: gr_parapiped.h:83
virtual Parapiped & operator=(const Parapiped &p)
Copies a parallelepiped into this one.
Definition: gr_parapiped.cpp:396
const kjb::Vector & get_center() const
Returns the center vector for this parallelepiped.
Definition: gr_parapiped.cpp:436
Abstract class of connected polygons (faces) forming a mesh.
x1
Definition: APPgetLargeConnectedEdges.m:122
virtual void transform(const kjb::Matrix &M)
Transforms this parallelepiped.
Definition: gr_parapiped.cpp:583
virtual void read(std::istream &in)
Reads this parallelepiped from an input stream.
Definition: gr_parapiped.cpp:448
Definition: gr_polygon.h:36
Abstract class of connected polygons (faces) forming a mesh. We assume that each edge is shared betwe...
Definition: gr_polymesh.h:89
virtual ~Parapiped()
Deletes this parallelepiped.
Definition: gr_parapiped.h:123
kjb::Vector center
Center of this parallelepiped.
Definition: gr_parapiped.h:237
y1
Definition: APPgetLargeConnectedEdges.m:124
void draw_left_right_orientation_map() const
Definition: gr_parapiped.cpp:763
x2
Definition: APPgetLargeConnectedEdges.m:123
Exception often thrown when wrapped C functions return error codes.
Definition: l_exception.h:262
virtual unsigned int adjacent_face(unsigned int f, unsigned int e) const
returns the index of the face adjacent to face f along edge e This is an efficient implementation to ...
Definition: gr_parapiped.cpp:703
Object thrown when an argument to a function is not acceptable.
Definition: l_exception.h:377
get the indices of edges in each direction for i
Definition: APPgetLargeConnectedEdges.m:48
virtual void add_face(const Polygon &face)
Adds a face to this parapiped -> Not implemented here, it will throw an exception, because the use of this method will violate the constraints defining this parapiped.
Definition: gr_parapiped.cpp:753
Object thrown when input or output fails.
Definition: l_exception.h:496
This class implements matrices, in the linear-algebra sense, with real-valued elements.
Definition: m_matrix.h:94
const kjb::Vector & get_point(size_t i) const
Returns an indexed point defining this parapiped.
Definition: gr_parapiped.cpp:420
Parapiped(double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3, double x4, double y4, double z4)
Constructs a parallelepiped.
Definition: gr_parapiped.cpp:128
virtual Parapiped * clone() const
Clones this parallelepiped.
Definition: gr_parapiped.cpp:409