10 #ifndef vtk_m_Transform3D_h
11 #define vtk_m_Transform3D_h
73 vtkm::Vec<T, 4> homogeneousVector(vector[0], vector[1], vector[2], T(0));
75 return vtkm::Vec<T, 3>(homogeneousVector[0], homogeneousVector[1], homogeneousVector[2]);
89 scaleMatrix(0, 0) = scaleX;
90 scaleMatrix(1, 1) = scaleY;
91 scaleMatrix(2, 2) = scaleZ;
92 scaleMatrix(3, 3) = T(1);
101 template <
typename T>
112 template <
typename T>
120 template <
typename T>
125 translateMatrix(0, 3) = x;
126 translateMatrix(1, 3) = y;
127 translateMatrix(2, 3) = z;
128 return translateMatrix;
130 template <
typename T>
143 template <
typename T>
147 T angleRadians = vtkm::Pi_180<T>() * angleDegrees;
154 matrix(0, 0) = normAxis[0] * normAxis[0] * (1 - cosAngle) + cosAngle;
155 matrix(0, 1) = normAxis[0] * normAxis[1] * (1 - cosAngle) - normAxis[2] * sinAngle;
156 matrix(0, 2) = normAxis[0] * normAxis[2] * (1 - cosAngle) + normAxis[1] * sinAngle;
159 matrix(1, 0) = normAxis[1] * normAxis[0] * (1 - cosAngle) + normAxis[2] * sinAngle;
160 matrix(1, 1) = normAxis[1] * normAxis[1] * (1 - cosAngle) + cosAngle;
161 matrix(1, 2) = normAxis[1] * normAxis[2] * (1 - cosAngle) - normAxis[0] * sinAngle;
164 matrix(2, 0) = normAxis[2] * normAxis[0] * (1 - cosAngle) - normAxis[1] * sinAngle;
165 matrix(2, 1) = normAxis[2] * normAxis[1] * (1 - cosAngle) + normAxis[0] * sinAngle;
166 matrix(2, 2) = normAxis[2] * normAxis[2] * (1 - cosAngle) + cosAngle;
176 template <
typename T>
186 template <
typename T>
196 template <
typename T>
206 template <
typename T>
214 #endif //vtk_m_Transform3D_h