aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranklin Wei <me@fwei.tk>2019-03-07 19:14:01 -0500
committerFranklin Wei <me@fwei.tk>2019-03-07 19:25:41 -0500
commit6c56267423a403c5da23380e9d6f23e8926ffb46 (patch)
tree278f82b3801509dd2a719de323d6f3738079763e
parent291bd26fd8920831181e8207e1fcdf544cd6cd6f (diff)
downloadfieldviz-6c56267423a403c5da23380e9d6f23e8926ffb46.zip
fieldviz-6c56267423a403c5da23380e9d6f23e8926ffb46.tar.gz
fieldviz-6c56267423a403c5da23380e9d6f23e8926ffb46.tar.bz2
fieldviz-6c56267423a403c5da23380e9d6f23e8926ffb46.tar.xz
Move math functions into a separate library
-rw-r--r--CMakeLists.txt7
-rw-r--r--src/curve.h4
-rw-r--r--src/main.cpp3
3 files changed, 8 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 30ad684..cd5836a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,8 +1,9 @@
cmake_minimum_required (VERSION 2.6)
project (fieldviz)
-add_executable(fieldviz src/main.cpp src/curve.cpp src/quat.cpp src/vec3.cpp)
-target_link_libraries(fieldviz readline)
+add_executable(fieldviz src/main.cpp src/curve.cpp)
-add_definitions(-std=c++14 -Og -g)
+add_definitions(-std=c++14 -O2 -g)
+
+target_link_libraries(fieldviz fml readline)
include_directories(lib)
diff --git a/src/curve.h b/src/curve.h
index 5f11351..891a6af 100644
--- a/src/curve.h
+++ b/src/curve.h
@@ -3,8 +3,8 @@
#include <cmath>
#include <iostream>
-#include "vec3.h"
-#include "quat.h"
+#include <fml/fml.h>
+using namespace fml;
/* All curves inherit this class */
class Curve {
diff --git a/src/main.cpp b/src/main.cpp
index 26ed520..9b67ffd 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -12,9 +12,10 @@
#include "gnuplot_i.hpp"
-#include "vec3.h"
#include "curve.h"
+#include <fml/fml.h>
+using namespace fml;
using namespace std;
/* A current or charge distribution */