///////////////////////////////////////////////////////////////////////////////////////////////////// // // FileName: FracOrth.h // Author : Michael Y. Polyakov // email : myp@andrew.cmu.edu or mikepolyakov@hotmail.com // Website : www.angelfire.com/linux/myp // Date : 7/30/2002 // // class FracOrth: converts between fractional and orthonormal coordinates. This is very small and basic // class. For a full Crystallographic C++ library written by Vincent Favre-Nicolin see this link: // http://objcryst.sourceforge.net/ ////////////////////////////////////////////////////////////////////////////////////////////////////// #ifndef FRACORTH_H_ #define FRACORTH_H_ class FracOrth { public: FracOrth(float a, float b, float c); FracOrth(float a, float b, float c, float alpha, float beta, float gamma); //mutators void SetDim(float a, float b, float c); void SetAngles(float alpha, float beta, float gamma); //accessors void FracToOrth(float &x, float &y, float &z); void OrthToFrac(float &x, float &y, float &z); void GetDim(float &a, float &b, float &c); void GetAngles(float &alpha, float &beta, float &gamma); float GetVolume(); float* GetFracToOrthM(); float* GetOrthToFracM(); private: float dim[3], ang[3]; float M[3][3], Min[3][3]; float V; void Init(float a, float b, float c, float alpha, float beta, float gamma); }; #endif