ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/SHAPES/SHAPE.hpp
Revision: 1299
Committed: Thu Jun 24 15:56:05 2004 UTC (20 years ago) by gezelter
File size: 1193 byte(s)
Log Message:
work on visualizer

File Contents

# Content
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
25 double getSigmaAt(double costheta, double phi);
26 double getSAt(double costheta, double phi);
27 double getEpsAt(double costheta, double phi);
28
29 double getMass(void) {return mass;}
30 void getI(double theI[3][3]);
31
32 private:
33
34 void findBegin( char* startText );
35 int count_tokens(char *line, char *delimiters); // doesn't belong here!
36
37 FILE *shapeFile;
38
39 char *shapeType; // The name of the shape
40 double mass; // The mass
41 double I[3][3]; // The moment of inertia tensor
42 vector<SHFunc*> sigmaFuncs; // The contact functions
43 vector<SHFunc*> sFuncs; // The range functions
44 vector<SHFunc*> epsFuncs; // The strength functions
45
46 };
47
48 #endif
49