MCPcopy Create free account
hub / github.com/Kitware/VTK / ComputeDisplayToWorld

Method ComputeDisplayToWorld

Rendering/Core/vtkInteractorObserver.cxx:246–259  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Description: Transform from display to world coordinates. WorldPt has to be allocated as 4 vector

Source from the content-addressed store, hash-verified

244// Transform from display to world coordinates.
245// WorldPt has to be allocated as 4 vector
246void vtkInteractorObserver::ComputeDisplayToWorld(
247 vtkRenderer* ren, double x, double y, double z, double worldPt[4])
248{
249 ren->SetDisplayPoint(x, y, z);
250 ren->DisplayToWorld();
251 ren->GetWorldPoint(worldPt);
252 if (worldPt[3])
253 {
254 worldPt[0] /= worldPt[3];
255 worldPt[1] /= worldPt[3];
256 worldPt[2] /= worldPt[3];
257 worldPt[3] = 1.0;
258 }
259}
260
261//------------------------------------------------------------------------------
262// Description:

Callers 15

OnMouseMoveMethod · 0.80
OnMouseMoveMethod · 0.80
OnMouseMoveMethod · 0.80
OnMouseMoveMethod · 0.80
OnMouseMoveMethod · 0.80
OnMouseMoveMethod · 0.80
SizeHandlesMethod · 0.80
OnMouseMoveMethod · 0.80
OnMouseMoveMethod · 0.80
OnMouseMoveMethod · 0.80
OnMouseMoveMethod · 0.80
PanMethod · 0.80

Calls 2

GetWorldPointMethod · 0.80
DisplayToWorldMethod · 0.45

Tested by 1

getMotionFunction · 0.64