Math
VTK – Rotate Vector To Special Direction
I take notes about how to rotate vector to a special direction. #include “./tool.h” #define vtkSPtr vtkSmartPointer #define vtkSPtrNew(Var, Type) vtkSPtr<Type> Var = vtkSPtr<Type>::New(); int main(int, char *[]) { PointStruct vec0( 1, 1, 0 ); PointStruct vec1( -1, 1, 0 ); PointStruct vecZ( 0, 0, 1 ); double radian = Read more…