From a4dde508de77ff279a8424bc8de95e58d5c20403 Mon Sep 17 00:00:00 2001 From: Jesse Mapel Date: Fri, 30 Nov 2018 11:50:57 -0700 Subject: [PATCH] Changed methods to use strings instead of char* --- include/eal.h | 26 +++++++++++++++----------- src/eal.cpp | 18 ++++++++++-------- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/include/eal.h b/include/eal.h index 1f81642..016aa88 100644 --- a/include/eal.h +++ b/include/eal.h @@ -1,21 +1,25 @@ -#ifndef EAL_H -#define EAL_H +#ifndef EAL_INCLUDE_EAL_H +#define EAL_INCLUDE_EAL_H #include -#include +#include using namespace std; -vector getPosition(vector> coords, vector coeffs, char *interp, double time); -vector getVelocity(vector> coords, vector coeffs, char *interp, double time, bool interpolation); +namespace eal { -vector getPosition(vector coeffs, char *interp, double time); -vector getVelocity(vector coeffs, char *interp, double time, bool interpolation); + vector getPosition(vector> coords, vector times, string interp, double time); + vector getVelocity(vector> coords, vector times, string interp, double time, bool interpolation); -vector getRotation(char *from, char *to, vector> rotations, vector times, char *interp, double time); -vector getAngularVelocity(char *from, char *to, vector> rotations, vector times, char *interp, double time); + vector getPosition(vector coeffs, string interp, double time); + vector getVelocity(vector coeffs, string interp, double time, bool interpolation); -vector getRotation(char *from, char *to, vector coefficients, char *interp, double time); -vector getAngularVelocity(char *from, char *to, vector coefficients, char *interp, double time); + vector getRotation(string from, string to, vector> rotations, vector times, string interp, double time); + vector getAngularVelocity(string from, string to, vector> rotations, vector times, string interp, double time); + + vector getRotation(string from, string to, vector coefficients, string interp, double time); + vector getAngularVelocity(string from, string to, vector coefficients, string interp, double time); + +} #endif // EAL_H diff --git a/src/eal.cpp b/src/eal.cpp index b523c36..629d3cb 100644 --- a/src/eal.cpp +++ b/src/eal.cpp @@ -1,25 +1,27 @@ #include "eal.h" +using namespace eal; + // Positional Functions // Position Data Functions -vector getPosition(vector> coords, vector coeffs, char *interp, double time) { +vector getPosition(vector> coords, vector times, string interp, double time) { vector coordinate = {0.0, 0.0, 0.0}; return coordinate; } -vector getVelocity(vector> coords, vector coeffs, char *interp, double time, bool interpolation) { +vector getVelocity(vector> coords, vector times, string interp, double time, bool interpolation) { vector coordinate = {0.0, 0.0, 0.0}; return coordinate; } // Postion Function Functions -vector getPosition(vector coeffs, char *interp, double time) { +vector getPosition(vector coeffs, string interp, double time) { vector coordinate = {0.0, 0.0, 0.0}; return coordinate; } -vector getVelocity(vector coeffs, char *interp, double time, bool interpolation) { +vector getVelocity(vector coeffs, string interp, double time, bool interpolation) { vector coordinate = {0.0, 0.0, 0.0}; return coordinate; } @@ -27,23 +29,23 @@ vector getVelocity(vector coeffs, char *interp, double time, boo // Rotation Data Functions // Rotation Data Functions -vector getRotation(char *from, char *to, vector> rotations, vector times, char *interp, double time) { +vector getRotation(string from, string to, vector> rotations, vector times, string interp, double time) { vector coordinate = {0.0, 0.0, 0.0}; return coordinate; } -vector getAngularVelocity(char *from, char *to, vector> rotations, vector times, char *interp, double time) { +vector getAngularVelocity(string from, string to, vector> rotations, vector times, string interp, double time) { vector coordinate = {0.0, 0.0, 0.0}; return coordinate; } // Rotation Function Functions -vector getRotation(char *from, char *to, vector coefficients, char *interp, double time) { +vector getRotation(string from, string to, vector coefficients, string interp, double time) { vector coordinate = {0.0, 0.0, 0.0}; return coordinate; } -vector getAngularVelocity(char *from, char *to, vector coefficients, char *interp, double time) { +vector getAngularVelocity(string from, string to, vector coefficients, string interp, double time) { vector coordinate = {0.0, 0.0, 0.0}; return coordinate; } -- GitLab