Skip to content
Snippets Groups Projects
Commit a4dde508 authored by Jesse Mapel's avatar Jesse Mapel
Browse files

Changed methods to use strings instead of char*

parent 0ed6f9d0
No related branches found
No related tags found
No related merge requests found
#ifndef EAL_H #ifndef EAL_INCLUDE_EAL_H
#define EAL_H #define EAL_INCLUDE_EAL_H
#include <vector> #include <vector>
#include <string.h> #include <string>
using namespace std; using namespace std;
vector<double> getPosition(vector<vector<double>> coords, vector<double> coeffs, char *interp, double time); namespace eal {
vector<double> getVelocity(vector<vector<double>> coords, vector<double> coeffs, char *interp, double time, bool interpolation);
vector<double> getPosition(vector<double> coeffs, char *interp, double time); vector<double> getPosition(vector<vector<double>> coords, vector<double> times, string interp, double time);
vector<double> getVelocity(vector<double> coeffs, char *interp, double time, bool interpolation); vector<double> getVelocity(vector<vector<double>> coords, vector<double> times, string interp, double time, bool interpolation);
vector<double> getRotation(char *from, char *to, vector<vector<double>> rotations, vector<double> times, char *interp, double time); vector<double> getPosition(vector<double> coeffs, string interp, double time);
vector<double> getAngularVelocity(char *from, char *to, vector<vector<double>> rotations, vector<double> times, char *interp, double time); vector<double> getVelocity(vector<double> coeffs, string interp, double time, bool interpolation);
vector<double> getRotation(char *from, char *to, vector<double> coefficients, char *interp, double time); vector<double> getRotation(string from, string to, vector<vector<double>> rotations, vector<double> times, string interp, double time);
vector<double> getAngularVelocity(char *from, char *to, vector<double> coefficients, char *interp, double time); vector<double> getAngularVelocity(string from, string to, vector<vector<double>> rotations, vector<double> times, string interp, double time);
vector<double> getRotation(string from, string to, vector<double> coefficients, string interp, double time);
vector<double> getAngularVelocity(string from, string to, vector<double> coefficients, string interp, double time);
}
#endif // EAL_H #endif // EAL_H
#include "eal.h" #include "eal.h"
using namespace eal;
// Positional Functions // Positional Functions
// Position Data Functions // Position Data Functions
vector<double> getPosition(vector<vector<double>> coords, vector<double> coeffs, char *interp, double time) { vector<double> getPosition(vector<vector<double>> coords, vector<double> times, string interp, double time) {
vector<double> coordinate = {0.0, 0.0, 0.0}; vector<double> coordinate = {0.0, 0.0, 0.0};
return coordinate; return coordinate;
} }
vector<double> getVelocity(vector<vector<double>> coords, vector<double> coeffs, char *interp, double time, bool interpolation) { vector<double> getVelocity(vector<vector<double>> coords, vector<double> times, string interp, double time, bool interpolation) {
vector<double> coordinate = {0.0, 0.0, 0.0}; vector<double> coordinate = {0.0, 0.0, 0.0};
return coordinate; return coordinate;
} }
// Postion Function Functions // Postion Function Functions
vector<double> getPosition(vector<double> coeffs, char *interp, double time) { vector<double> getPosition(vector<double> coeffs, string interp, double time) {
vector<double> coordinate = {0.0, 0.0, 0.0}; vector<double> coordinate = {0.0, 0.0, 0.0};
return coordinate; return coordinate;
} }
vector<double> getVelocity(vector<double> coeffs, char *interp, double time, bool interpolation) { vector<double> getVelocity(vector<double> coeffs, string interp, double time, bool interpolation) {
vector<double> coordinate = {0.0, 0.0, 0.0}; vector<double> coordinate = {0.0, 0.0, 0.0};
return coordinate; return coordinate;
} }
...@@ -27,23 +29,23 @@ vector<double> getVelocity(vector<double> coeffs, char *interp, double time, boo ...@@ -27,23 +29,23 @@ vector<double> getVelocity(vector<double> coeffs, char *interp, double time, boo
// Rotation Data Functions // Rotation Data Functions
// Rotation Data Functions // Rotation Data Functions
vector<double> getRotation(char *from, char *to, vector<vector<double>> rotations, vector<double> times, char *interp, double time) { vector<double> getRotation(string from, string to, vector<vector<double>> rotations, vector<double> times, string interp, double time) {
vector<double> coordinate = {0.0, 0.0, 0.0}; vector<double> coordinate = {0.0, 0.0, 0.0};
return coordinate; return coordinate;
} }
vector<double> getAngularVelocity(char *from, char *to, vector<vector<double>> rotations, vector<double> times, char *interp, double time) { vector<double> getAngularVelocity(string from, string to, vector<vector<double>> rotations, vector<double> times, string interp, double time) {
vector<double> coordinate = {0.0, 0.0, 0.0}; vector<double> coordinate = {0.0, 0.0, 0.0};
return coordinate; return coordinate;
} }
// Rotation Function Functions // Rotation Function Functions
vector<double> getRotation(char *from, char *to, vector<double> coefficients, char *interp, double time) { vector<double> getRotation(string from, string to, vector<double> coefficients, string interp, double time) {
vector<double> coordinate = {0.0, 0.0, 0.0}; vector<double> coordinate = {0.0, 0.0, 0.0};
return coordinate; return coordinate;
} }
vector<double> getAngularVelocity(char *from, char *to, vector<double> coefficients, char *interp, double time) { vector<double> getAngularVelocity(string from, string to, vector<double> coefficients, string interp, double time) {
vector<double> coordinate = {0.0, 0.0, 0.0}; vector<double> coordinate = {0.0, 0.0, 0.0};
return coordinate; return coordinate;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment