| 1 |
#ifndef __SHAPE_HPP__ |
| 2 |
#define __SHAPE_HPP__ |
| 3 |
|
| 4 |
#include <fstream> |
| 5 |
#include <vector> |
| 6 |
#include "SHFunc.hpp" |
| 7 |
|
| 8 |
using namespace std; |
| 9 |
|
| 10 |
class SHAPE { |
| 11 |
|
| 12 |
public: |
| 13 |
|
| 14 |
SHAPE(void); |
| 15 |
~SHAPE(void); |
| 16 |
void readSHAPEfile(const char*); |
| 17 |
|
| 18 |
char *getType() {return shapeType;} |
| 19 |
void setType(char * name) {strcpy(shapeType, name);} |
| 20 |
|
| 21 |
vector<SHFunc*> getSigmaFuncs(void) {return sigmaFuncs;} |
| 22 |
vector<SHFunc*> getSFuncs(void) {return sFuncs;} |
| 23 |
vector<SHFunc*> getEpsFuncs(void) {return epsFuncs;} |
| 24 |
double getMass(void) {return mass;} |
| 25 |
void getI(double theI[3][3]); |
| 26 |
|
| 27 |
private: |
| 28 |
|
| 29 |
void findBegin( char* startText ); |
| 30 |
int count_tokens(char *line, char *delimiters); // doesn't belong here! |
| 31 |
|
| 32 |
FILE *shapeFile; |
| 33 |
|
| 34 |
char *shapeType; // The name of the shape |
| 35 |
double mass; // The mass |
| 36 |
double I[3][3]; // The moment of inertia tensor |
| 37 |
vector<SHFunc*> sigmaFuncs; // The contact functions |
| 38 |
vector<SHFunc*> sFuncs; // The range functions |
| 39 |
vector<SHFunc*> epsFuncs; // The strength functions |
| 40 |
|
| 41 |
}; |
| 42 |
|
| 43 |
#endif |
| 44 |
|