--- trunk/OOPSE-1.0/utils/sysbuilder/BaseLattice.hpp 2004/07/28 04:58:20 1423 +++ trunk/OOPSE-1.0/utils/sysbuilder/BaseLattice.hpp 2004/07/28 18:42:59 1427 @@ -2,13 +2,16 @@ #define _BASELATTICE_H_ #include +#include "Vector3d.hpp" using namespace std; class BaseLattice{ protected: BaseLattice(){ - setStart(0, 0, 0); + Vector3d zeroVector3d(0.0, 0.0, 0.0); + + setOrigin(zeroVector3d); } public: @@ -21,8 +24,9 @@ class BaseLattice{ int getNumSitesPerCell() {return nCellSites;} - void getLatticePoints(vector& latticePosX, vector& latticePosY, vector& latticePosZ, - int nx, int ny, int nz); + void getLatticePointsPos(vector& latticePos, int nx, int ny, int nz); + + vector getLatticePointsOrt() {return cellSitesOrt;} //get lattice constant of unit cell vector getLatticeConstant() =0; @@ -31,28 +35,21 @@ class BaseLattice{ void setLatticeConstant(const vector& lc)=0; //get origin of unit cell - void getStart(double& sx, double& sy, double& sz){ - sx = startX; - sy = startY; - sz = startZ; - } + Vector3d getOrigin( ) {return origin;} //set origin of unit cell - void setStart(double sx, double sy, double sz){ - startX = sx; - startY = sy; - startZ = sz; + void setOrigin(const Vector3d& newOrigin){ + this->origin = newOrigin; } protected: virtual void update() =0; - protected: int nCellSites; - double startX; - double startY; - double startZ; - + Vector3d origin; + vector cellSitesPos; + vector cellSitesOrt; + Vector3d cellLen; };