aboutsummaryrefslogtreecommitdiff
path: root/src/curve.h
diff options
context:
space:
mode:
authorFranklin Wei <me@fwei.tk>2019-05-31 19:08:07 -0400
committerFranklin Wei <me@fwei.tk>2019-05-31 19:08:07 -0400
commite5ef359f06dc99ede85453a29c9542f29787c77c (patch)
tree6bc32e7cace10bec27022cfc76603df16dfce07a /src/curve.h
parentbc6dcafc3868d55d2653081d27f1eaf771c2d532 (diff)
downloadfieldviz-master.zip
fieldviz-master.tar.gz
fieldviz-master.tar.bz2
fieldviz-master.tar.xz
Move manifold code to libfmlHEADmaster
Diffstat (limited to 'src/curve.h')
-rw-r--r--src/curve.h111
1 files changed, 0 insertions, 111 deletions
diff --git a/src/curve.h b/src/curve.h
deleted file mode 100644
index a3d743a..0000000
--- a/src/curve.h
+++ /dev/null
@@ -1,111 +0,0 @@
-#ifndef CURVE_H
-#define CURVE_H
-
-#include <cmath>
-#include <iostream>
-#include <fml/fml.h>
-
-#include "manifold.h"
-
-using namespace fml;
-
-/* All curves inherit this class (which is empty because Manifold has
- * everything we need). */
-class Curve : public Manifold {
-public:
- const int dimension() const { return 1; }
-};
-
-class LineSegment : public Curve {
-private:
- vec3 a, b;
-public:
- LineSegment(vec3 a_, vec3 b_) : a(a_), b(b_) {};
-
- vec3 integrate(vec3 (*integrand)(vec3 s, vec3 ds), scalar delta) const;
-
- const char *name() const { return "LineSegment"; }
-
- friend std::istream operator>>(std::istream &is, LineSegment &ls);
-};
-
-std::istream operator>>(std::istream &is, LineSegment &ls);
-
-class Arc : public Curve {
-private:
- vec3 center;
-
- /* these are relative to the center (direction will be determined
- * by RHR of normal), and should be orthonormal */
- vec3 radius, normal;
-
- /* how many radians the arc extends for (can be greater than 2pi) */
- scalar angle;
-public:
- Arc(vec3 c_, vec3 r_, vec3 n_, scalar th) : center(c_), radius(r_), normal(n_), angle(th) {};
-
- vec3 integrate(vec3 (*integrand)(vec3 s, vec3 ds), scalar delta) const;
-
- const char *name() const { return "Arc"; }
-
- friend std::istream operator>>(std::istream &is, LineSegment &ls);
-};
-
-std::istream operator>>(std::istream &is, LineSegment &ls);
-
-class Spiral : public Curve {
-private:
- vec3 origin;
-
- /* these are relative to the center (direction will be determined
- * by RHR of normal), and should be orthonormal */
- vec3 radius, normal;
-
- /* how many radians the arc extends for (can be greater than 2pi) */
- scalar angle;
-
- /* linear distance between turns (2pi) */
- scalar pitch;
-public:
- Spiral(vec3 c_, vec3 r_, vec3 n_, scalar th, scalar p) : origin(c_), radius(r_), normal(n_), angle(th), pitch(p) {};
-
- vec3 integrate(vec3 (*integrand)(vec3 s, vec3 ds), scalar delta) const;
-
- const char *name() const { return "Solenoid"; }
-
- friend std::istream operator>>(std::istream &is, LineSegment &ls);
-};
-
-std::istream operator>>(std::istream &is, LineSegment &ls);
-
-class Toroid : public Curve {
-private:
- vec3 origin;
-
- /* these are relative to the center (direction will be determined
- * by RHR of normal), and should be orthonormal */
- vec3 major_radius, major_normal;
-
- /* "thickness" of toroid */
- scalar minor_r;
-
- /* how many radians (about the center) the toroid extends for
- * (can be greater than 2pi) */
- scalar major_angle;
-
- /* central angle between successive turns (2pi rotation of small
- * radius vector) */
- scalar pitch;
-public:
- Toroid() {};
- Toroid(vec3 o, vec3 maj_r, vec3 maj_n, scalar ang, scalar min_r, scalar p) : origin(o), major_radius(maj_r), major_normal(maj_n), major_angle(ang), minor_r(min_r), pitch(p) {};
-
- vec3 integrate(vec3 (*integrand)(vec3 s, vec3 ds), scalar delta) const;
-
- const char *name() const { return "Toroid"; };
-
- friend std::istream operator>>(std::istream &is, LineSegment &ls);
-};
-
-std::istream operator>>(std::istream &is, LineSegment &ls);
-#endif