1 |
#ifndef __RIGIDBODYSTAMP_H__ |
2 |
#define __RIGIDBODYSTAMP_H__ |
3 |
|
4 |
#include "AtomStamp.hpp" |
5 |
#include "LinkedAssign.hpp" |
6 |
|
7 |
class RigidBodyStamp{ |
8 |
|
9 |
public: |
10 |
RigidBodyStamp(); |
11 |
~RigidBodyStamp(); |
12 |
|
13 |
void setPosition( double x, double y, double z ); |
14 |
void setOrientation( double x, double y, double z ); |
15 |
char* assignString( char* lhs, char* rhs ); |
16 |
char* assignDouble( char* lhs, double rhs ); |
17 |
char* assignInt( char* lhs, int rhs ); |
18 |
char* checkMe( void ); |
19 |
|
20 |
char* addAtom( AtomStamp* the_atom, int atomIndex ); |
21 |
|
22 |
char* getID( void ) { return name; } |
23 |
int getNAtoms( void ) { return n_atoms; } |
24 |
short int havePosition( void ) { return have_position; } |
25 |
short int haveOrientation( void ) { return have_orientation; } |
26 |
double getPosX( void ) { return pos[0]; } |
27 |
double getPosY( void ) { return pos[1]; } |
28 |
double getPosZ( void ) { return pos[2]; } |
29 |
double getOrntX( void ) { return ornt[0]; } |
30 |
double getOrntY( void ) { return ornt[1]; } |
31 |
double getOrntZ( void ) { return ornt[2]; } |
32 |
|
33 |
AtomStamp* getAtom( int index ) { return atoms[index]; } |
34 |
|
35 |
int haveExtras( void ) { return have_extras; } |
36 |
LinkedAssign* getUnhandled( void ) { return unhandled; } |
37 |
|
38 |
static char errMsg[500]; |
39 |
private: |
40 |
|
41 |
double pos[3]; //the position vector |
42 |
short int have_position; // boolean for positions |
43 |
double ornt[3]; // the orientation vector |
44 |
short int have_orientation; |
45 |
|
46 |
char name[100]; |
47 |
int n_atoms; |
48 |
|
49 |
int have_name, have_atoms; |
50 |
|
51 |
AtomStamp** atoms; |
52 |
|
53 |
LinkedAssign* unhandled; // the unhandled assignments |
54 |
short int have_extras; |
55 |
}; |
56 |
|
57 |
#endif |