Lines 73-87
float IVtkTools_ShapePicker::GetTolerance( ) const
Link Here
|
73 |
// Method: convertDisplayToWorld |
73 |
// Method: convertDisplayToWorld |
74 |
// Purpose: Convert display coordinates to world coordinates |
74 |
// Purpose: Convert display coordinates to world coordinates |
75 |
//============================================================================ |
75 |
//============================================================================ |
76 |
bool IVtkTools_ShapePicker::convertDisplayToWorld (vtkRenderer *theRenderer, |
76 |
bool IVtkTools_ShapePicker::convertDisplayToWorld (vtkRenderer *theRenderer, |
77 |
vtkFloatingPointType theDisplayCoord[3], |
77 |
double theDisplayCoord[3], |
78 |
vtkFloatingPointType theWorldCoord[3]) |
78 |
double theWorldCoord[3]) |
79 |
{ |
79 |
{ |
80 |
// Convert the selection point into world coordinates. |
80 |
// Convert the selection point into world coordinates. |
81 |
theRenderer->SetDisplayPoint (theDisplayCoord[0], theDisplayCoord[1], theDisplayCoord[2]); |
81 |
theRenderer->SetDisplayPoint (theDisplayCoord[0], theDisplayCoord[1], theDisplayCoord[2]); |
82 |
theRenderer->DisplayToWorld(); |
82 |
theRenderer->DisplayToWorld(); |
83 |
|
83 |
|
84 |
vtkFloatingPointType* const aCoords = theRenderer->GetWorldPoint(); |
84 |
double* const aCoords = theRenderer->GetWorldPoint(); |
85 |
if (aCoords[3] == 0.0) |
85 |
if (aCoords[3] == 0.0) |
86 |
{ |
86 |
{ |
87 |
return false; |
87 |
return false; |