How to transform Coordinate System To World to Coordinate System To Display in activiz

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to transform Coordinate System To World to Coordinate System To Display in activiz

darkcminor
having a CoordinateSystemToWorld array like


int[] CoordinateSystemToWorld= {2, 4, 0};

How to get CoordinateSystemToDisplay  analog in array of doubles?

double[] display = ???


And how to get CoordinateSystemToWorld from CoordinateSystemToDisplay  ?

I was trying to use even  vtkTransformCoordinateSystems or

            vtkCoordinate coordinate = new vtkCoordinate();
            coordinate.SetCoordinateSystemToWorld();
            coordinate.SetValue(CoordinateSystemToWorld[0], CoordinateSystemToWorld[1], CoordinateSystemToWorld[2]);
            double ini = coordinate.GetComputedDoubleDisplayValue( Renderer );


but had no luck, do you have an example?
Reply | Threaded
Open this post in threaded view
|

Re: How to transform Coordinate System To World to Coordinate System To Display in activiz

chasank
This post has NOT been accepted by the mailing list yet.
you can use the following code;

double worldPoint[3] = {2, 4, 0};

double *displayPoint;

renderer->SetWorldPoint(worldPoint);
renderer->WorldToDisplay();
displayPoint = renderer->GetDisplayPoint();