aboutsummaryrefslogtreecommitdiffstats
path: root/geom.hpp
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@ens.fr>2015-01-08 14:18:36 +0100
committerAlex Auvolat <alex.auvolat@ens.fr>2015-01-08 14:18:36 +0100
commit59c17e85597c16bcfbdc2416cc98e9572b86f34e (patch)
tree1d01050e95f69a33a2f72fedba4b7cc876840c73 /geom.hpp
parent8151e2cde5d855b410431764bff9c0e01b93efa9 (diff)
downloadRobotique-Projet-59c17e85597c16bcfbdc2416cc98e9572b86f34e.tar.gz
Robotique-Projet-59c17e85597c16bcfbdc2416cc98e9572b86f34e.zip
Add readme
Diffstat (limited to 'geom.hpp')
-rw-r--r--geom.hpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/geom.hpp b/geom.hpp
index 056a36e..5c374d2 100644
--- a/geom.hpp
+++ b/geom.hpp
@@ -28,7 +28,7 @@ struct line {
line(double aa, double bb, double cc) : a(aa), b(bb), c(cc) {}
- double dist(double x, double y) const {
+ double dist(vec p) const {
// TODO
return 1;
}
@@ -39,6 +39,17 @@ struct line {
};
+struct segment {
+ vec a, b;
+
+ segment(vec pa, vec pb) : a(pa), b(pb), {}
+
+ double dist(vec p) const {
+ // TODO
+ return 1;
+ }
+};
+
struct circle {
vec c;
double r;
@@ -58,4 +69,16 @@ struct circpoint {
}
};
+struct circarc {
+ circle c;
+ double theta1, theta2;
+
+ circarc(circle cc, double tha, double thb) : c(cc), theta1(tha), theta2(thb) {}
+
+ double dist(vec p) const {
+ // TODO
+ return 1;
+ }
+};
+
/* vim: set ts=4 sw=4 tw=0 noet :*/