--- 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 20:29:49 1429 @@ -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: @@ -17,42 +20,36 @@ class BaseLattice{ virtual ~BaseLattice() {} //get lattice type - virtual string getLatticeType() = 0; + virtual const string getLatticeType() = 0; 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; + virtual vector getLatticeConstant() =0; //set lattice constant of unit cell - void setLatticeConstant(const vector& lc)=0; + virtual 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; };