64 EGS_Vector(EGS_Float xx, EGS_Float yy, EGS_Float zz) : x(xx), y(yy), z(zz) {};
101 EGS_Vector operator*(
const EGS_Float f)
const {
113 EGS_Float operator*(
const EGS_Vector &v)
const {
114 return x*v.
x + y*v.
y + z*v.
z;
136 EGS_Float length()
const {
137 return sqrt(x*x+y*y+z*z);
139 EGS_Float length2()
const {
143 EGS_Float tmp = 1./length();
149 void rotate(EGS_Float cos_t, EGS_Float sin_t,
150 EGS_Float c_phi, EGS_Float s_phi) {
151 EGS_Float sin_z = x*x + y*y;
154 EGS_Float temp = sin_t/sin_z;
155 EGS_Float temp_phi = z*c_phi;
156 EGS_Float temp_x = x*cos_t;
157 register EGS_Float temp_y = y*cos_t;
158 EGS_Float temp_x1 = temp_phi*x-y*s_phi;
159 EGS_Float temp_y1 = temp_phi*y+x*s_phi;
160 x = temp*temp_x1+temp_x;
161 y = temp*temp_y1+temp_y;
162 z = z*cos_t-sin_z*sin_t*c_phi;
#define EGS_EXPORT
Export symbols from the egspp library.
A class representing 3D vectors.
Global egspp functions header file.
Attempts to fix broken math header files.
const EGS_Float epsilon
The epsilon constant for floating point comparisons.
Defines the EGS_EXPORT and EGS_LOCAL macros.