libmove3d-planners
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros Groups Pages
parallelepipedForm.hpp
1 #ifndef PARALLELEPIPEDFORM_H
2 #define PARALLELEPIPEDFORM_H
3 
4 #include "geometricForm.hpp"
5 
6 
15 {
16  MOVE3D_STATIC_LOGGER;
17 public:
18  ParallelepipedForm(p3d_point a, p3d_point b, p3d_point c, p3d_point d,
19  p3d_point e, p3d_point f, p3d_point g, p3d_point h);
20  bool isPointInForm(p3d_point p);
21  double distHToPoint(p3d_point p);
22 
23  double getDistanceFromPoint(p3d_point p);
24  double getPlannarDistanceFromPoint(p3d_point p);
25 
26  p3d_point getRandomPointInForm();
27  std::vector<p3d_point> getFormGrid(double sampleRate);
28 
29  GeometricForm* getTransformedForm(p3d_matrix4 M);
30 
31  void draw();
32 
33 private:
34  p3d_point _a;
35  p3d_point _b;
36  p3d_point _c;
37  p3d_point _d;
38  p3d_point _e;
39  p3d_point _f;
40  p3d_point _g;
41  p3d_point _h;
42 };
43 
44 
45 #endif // PARALLELEPIPEDFORM_H
Definition: geometricForm.hpp:11
double getDistanceFromPoint(p3d_point p)
Definition: parallelepipedForm.cpp:38
p3d_point getRandomPointInForm()
Definition: parallelepipedForm.cpp:50
std::vector< p3d_point > getFormGrid(double sampleRate)
Definition: parallelepipedForm.cpp:60
double distHToPoint(p3d_point p)
Definition: parallelepipedForm.cpp:32
c-—d /| /| a-—b h |/g |/ e-—f b and c should be opposite
Definition: parallelepipedForm.hpp:14
bool isPointInForm(p3d_point p)
Definition: parallelepipedForm.cpp:26
GeometricForm * getTransformedForm(p3d_matrix4 M)
create a new form rotate by M compared to this one.
Definition: parallelepipedForm.cpp:107
void draw()
draw the form
Definition: parallelepipedForm.cpp:112
double getPlannarDistanceFromPoint(p3d_point p)
Definition: parallelepipedForm.cpp:44