------------------------------------------------------------------------------
| 34 | |
| 35 | //------------------------------------------------------------------------------ |
| 36 | vtkCompassRepresentation::vtkCompassRepresentation() |
| 37 | { |
| 38 | // The coordinates defining the compass |
| 39 | this->Point1Coordinate = vtkCoordinate::New(); |
| 40 | this->Point1Coordinate->SetCoordinateSystemToNormalizedViewport(); |
| 41 | this->Point1Coordinate->SetValue(0.80, 0.80, 0.0); |
| 42 | |
| 43 | this->Point2Coordinate = vtkCoordinate::New(); |
| 44 | this->Point2Coordinate->SetCoordinateSystemToNormalizedViewport(); |
| 45 | this->Point2Coordinate->SetValue(0.99, 0.99, 0.0); |
| 46 | |
| 47 | // Default configuration |
| 48 | this->OuterRadius = 0.9; |
| 49 | this->InnerRadius = 0.75; |
| 50 | |
| 51 | this->TiltRepresentation = vtkSmartPointer<vtkCenteredSliderRepresentation>::New(); |
| 52 | this->TiltRepresentation->GetPoint1Coordinate()->SetCoordinateSystemToViewport(); |
| 53 | this->TiltRepresentation->GetPoint2Coordinate()->SetCoordinateSystemToViewport(); |
| 54 | this->TiltRepresentation->SetMinimumValue(-90); |
| 55 | this->TiltRepresentation->SetMaximumValue(90); |
| 56 | this->TiltRepresentation->SetValue(0); |
| 57 | this->TiltRepresentation->SetTitleText("tilt"); |
| 58 | |
| 59 | this->DistanceRepresentation = vtkSmartPointer<vtkCenteredSliderRepresentation>::New(); |
| 60 | this->DistanceRepresentation->GetPoint1Coordinate()->SetCoordinateSystemToViewport(); |
| 61 | this->DistanceRepresentation->GetPoint2Coordinate()->SetCoordinateSystemToViewport(); |
| 62 | this->DistanceRepresentation->SetMinimumValue(0); |
| 63 | this->DistanceRepresentation->SetMaximumValue(2.0); |
| 64 | this->DistanceRepresentation->SetValue(1.0); |
| 65 | this->DistanceRepresentation->SetTitleText("dist"); |
| 66 | |
| 67 | // The points and the transformation for the points. There are a total of |
| 68 | // 73 points two rings of 340 degrees in increments of 10 plus three extra |
| 69 | // points |
| 70 | this->XForm = vtkTransform::New(); |
| 71 | this->Points = vtkPoints::New(); |
| 72 | this->Points->SetNumberOfPoints(73); |
| 73 | |
| 74 | this->BuildRing(); |
| 75 | |
| 76 | this->RingXForm = vtkTransformPolyDataFilter::New(); |
| 77 | this->RingXForm->SetInputData(this->Ring); |
| 78 | this->RingXForm->SetTransform(this->XForm); |
| 79 | |
| 80 | this->RingMapper = vtkPolyDataMapper2D::New(); |
| 81 | this->RingMapper->SetInputConnection(this->RingXForm->GetOutputPort()); |
| 82 | |
| 83 | this->RingProperty = vtkProperty2D::New(); |
| 84 | this->RingProperty->SetOpacity(0.5); |
| 85 | |
| 86 | this->RingActor = vtkActor2D::New(); |
| 87 | this->RingActor->SetMapper(this->RingMapper); |
| 88 | this->RingActor->SetProperty(this->RingProperty); |
| 89 | |
| 90 | this->SelectedProperty = vtkProperty2D::New(); |
| 91 | this->SelectedProperty->SetOpacity(0.8); |
| 92 | |
| 93 | this->LabelProperty = vtkTextProperty::New(); |
nothing calls this directly
no test coverage detected