| 170 | } |
| 171 | |
| 172 | Matrix3D Matrix3D::MakeRotation(float angle, const Bivector3D& axis) |
| 173 | { |
| 174 | float c, s; |
| 175 | |
| 176 | CosSin(angle, &c, &s); |
| 177 | float d = 1.0F - c; |
| 178 | |
| 179 | float x = axis.x * d; |
| 180 | float y = axis.y * d; |
| 181 | float z = axis.z * d; |
| 182 | float axay = x * axis.y; |
| 183 | float axaz = x * axis.z; |
| 184 | float ayaz = y * axis.z; |
| 185 | |
| 186 | return (Matrix3D(c + x * axis.x, axay - s * axis.z, axaz + s * axis.y, |
| 187 | axay + s * axis.z, c + y * axis.y, ayaz - s * axis.x, |
| 188 | axaz - s * axis.y, ayaz + s * axis.x, c + z * axis.z)); |
| 189 | } |
| 190 | |
| 191 | Matrix3D Matrix3D::MakeReflection(const Vector3D& a) |
| 192 | { |
nothing calls this directly
no test coverage detected