Hello!
I want to create 3-2-1 alignment based on pane-line-point. I created plane, line and point based on user select point(best-fit algorithm). Now i want to transform my whole coordinate system, i tried to use vtktransformation but it only rotated my scene, without changing coordinate system. I also using vtkCameraOrientationWidget, so i also want to change this widget due to my calculation
Hello,
I believe you need to be more specific. What do you mean by “coordinate system transformation”? Do you mean from Cartesian to polar? Do you mean from local to global? Do you mean from Mercator to UTM? Do you mean from screen to model space?.
best,
PC
Ye, you are right. I want to turn my local coordiante system created by 3-2-1 into a global coordinate system.
What is 3-2-1?
3-2-1 is Plane Line Point. This method is require two direction and one point to lock all 6 degree of freedom. That is, we simply create a local coordinate system based on our actor using a plane, line and point and then transfer the global coordinate system to the part/actor coordinate system.
I see. What have you done so far in terms of code?
In short, I have a mini program in QT where it defines:
self.cam_orient_widget = vtkCameraOrientationWidget()
By clicking points I create:
Plane, Line and Point.
From these primitives using normals, direction, etc., I create a vtkTransform. After using the created transformation, my actor moves, but the global coordinate system remains the same. Now I would like it not the actor(s) on the renderer to be moved and rotated, I want the global coordinate system to change.
The global coordinate system, as its name suggests, doesn’t have a reference or datum. You can scale or change its handedness, but not move or rotate. If you don’t want to apply a transform to every actor, you can move the camera.
So, the best approach would be to create a vtkTransform that rotates my actor(s) and then when the vtkTransform exists, I need to use the transformation for each new actor loaded.
Well, try that and observe. Try not to worry too much about whether it’s the best approach.