1 #ifndef GUARD_GGEMS_MATHS_GGEMSREFERENTIALTRANSFORMATION_HH
2 #define GUARD_GGEMS_MATHS_GGEMSREFERENTIALTRANSFORMATION_HH
36 #ifdef __OPENCL_C_VERSION__
58 GGfloat px = vector->x, py = vector->y, pz = vector->z;
59 vector->x = (u1*u3*px - u2*py) /up + u1*pz;
60 vector->y = (u2*u3*px + u1*py) /up + u2*pz;
61 vector->z = -up*px + u3*pz;
64 vector->x = -vector->x;
65 vector->z = -vector->z;
68 GGfloat3 tmp = {vector->x, vector->y, vector->z};
87 point->x - matrix->m0_[3],
88 point->y - matrix->m1_[3],
89 point->z - matrix->m2_[3]
92 return GGfloat33TransposeMultGGfloat3(matrix, &new_point);
108 return GGfloat44MultGGfloat3(matrix, point);
124 return normalize(GGfloat33TransposeMultGGfloat3(matrix, point));
140 return normalize(GGfloat33MultGGfloat3(matrix, point));
145 #endif // End of GUARD_GGEMS_MATHS_GGEMSREFERENTIALTRANSFORMATION_HH