Go to the documentation of this file.
32 mat3(
const T& a_00,
const T& a_01,
const T& a_02,
33 const T& a_10,
const T& a_11,
const T& a_12,
34 const T& a_20,
const T& a_21,
const T& a_22)
42 void set_matrix(
const T& a_00,
const T& a_01,
const T& a_02,
43 const T& a_10,
const T& a_11,
const T& a_12,
44 const T& a_20,
const T& a_21,
const T& a_22) {
54 void set_rotate(
const T& a_x,
const T& a_y,
const T& a_z,
const T& a_angle,T(*a_sin)(T),T(*a_cos)(T)) {
58 bool get_rotate(T& a_x,T& a_y,T& a_z,T& a_angle,T(*a_acos)(T),T(*a_sin)(T),T(*a_sqrt)(T)) {
65 if((cos_angle<T(-1))||(T(1)<cos_angle)) {
79 T one_minus_cos_angle = T(1)-cos_angle;
80 T x2 = (
pr::m_vec[0]-cos_angle)/one_minus_cos_angle;
92 a_angle = a_acos(cos_angle);
93 T sin_angle = a_sin(a_angle);
113 void mul_3(T& a_x,T& a_y,T& a_z)
const {
124 void mul_rotate(
const T& a_x,
const T& a_y,
const T& a_z,
const T& a_angle,T(*a_sin)(T),T(*a_cos)(T)) {
127 parent::_mul_mtx(rot);
130 void left_mul_rotate(
const T& a_x,
const T& a_y,
const T& a_z,
const T& a_angle,T(*a_sin)(T),T(*a_cos)(T)) {
133 parent::_left_mul_mtx(_m);
161 static void _set_scale(
const T& a_1,
const T& a_2,
const T& a_3,T v[]) {
162 v[0] = a_1;v[3] = 0;v[6] = 0;
163 v[1] = 0;v[4] = a_2;v[7] = 0;
164 v[2] = 0;v[5] = 0;v[8] = a_3;
167 static void _set_rotate(
const T& a_x,
const T& a_y,
const T& a_z,
const T& a_angle,T v[],T(*a_sin)(T),T(*a_cos)(T)) {
170 T si = a_sin(a_angle);
171 T co = a_cos(a_angle);
181 v[0] = x2+(1-x2)*co;v[3] = xy*(1-co)-z*si;v[6] = xz*(1-co)+y*si;
182 v[1] = xy*(1-co)+z*si;v[4] = y2+(1-y2)*co;v[7] = yz*(1-co)-x*si;
183 v[2] = xz*(1-co)-y*si;v[5] = yz*(1-co)+x*si;v[8] = z2+(1-z2)*co;
202 private:
static void check_instantiation() {
mat3<float> dummy;}
211 static const mat3<T> s_v(
false);
227 const T* v = a_mtx.data();
228 a_out << v[0] <<
"," << v[3] <<
"," << v[6] << std::endl
229 << v[1] <<
"," << v[4] <<
"," << v[7] << std::endl
230 << v[2] <<
"," << v[5] <<
"," << v[8] << std::endl;