ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libBASS/RigidBodyStamp.hpp
Revision: 982
Committed: Mon Jan 26 21:26:40 2004 UTC (20 years, 5 months ago) by gezelter
File size: 1499 byte(s)
Log Message:
Changed default orientation in BASS to use Euler angles in the
following order: phi, theta, psi
Removed the ability to set orientation using a unit vector

File Contents

# User Rev Content
1 gezelter 957 #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 gezelter 982 void setOrientation( double phi, double theta, double psi );
15 gezelter 957 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     int getNAtoms( void ) { return n_atoms; }
23     short int havePosition( void ) { return have_position; }
24     short int haveOrientation( void ) { return have_orientation; }
25     double getPosX( void ) { return pos[0]; }
26     double getPosY( void ) { return pos[1]; }
27     double getPosZ( void ) { return pos[2]; }
28 gezelter 982 double getEulerPhi( void ) { return ornt[0]; }
29     double getEulerTheta( void ) { return ornt[1]; }
30     double getEulerPsi( void ) { return ornt[2]; }
31 gezelter 957
32     AtomStamp* getAtom( int index ) { return atoms[index]; }
33    
34     int haveExtras( void ) { return have_extras; }
35     LinkedAssign* getUnhandled( void ) { return unhandled; }
36    
37     static char errMsg[500];
38     private:
39    
40     double pos[3]; //the position vector
41     short int have_position; // boolean for positions
42     double ornt[3]; // the orientation vector
43     short int have_orientation;
44    
45     int n_atoms;
46    
47 gezelter 982 int have_atoms;
48 gezelter 957
49     AtomStamp** atoms;
50    
51     LinkedAssign* unhandled; // the unhandled assignments
52     short int have_extras;
53     };
54    
55     #endif