#ifndef _MODEL_H_ #define _MODEL_H_ #include "scanner.h" /** * defines a temporal motion trajectory model * by Alex Gruenstein * for cs223b final project */ class Model { public: Model(const char *filename); //load the model from a file int GetLength(); double InterpolateLeftHvel(double phase); double InterpolateLeftVvel(double phase); double InterpolateRightHvel(double phase); double InterpolateRightVvel(double phase); double *hvelLeft; //horizontal velocities double *vvelLeft; //vertical velocities double *hvelRight; double *vvelRight; private: double *ReadDoubleArray(Scanner s, int length); double LinearInterpolate(double *array, double phase); int length; //length of model in timesteps }; #endif _MODEL_H_