vtkStandardNewMacro(VTKViewer_LineActor);
vtkCxxSetObjectMacro(VTKViewer_LineActor,LabelActor,VTKViewer_UnScaledActor);
-vtkCxxSetObjectMacro(VTKViewer_LineActor,ArrowActor,VTKViewer_UnScaledActor);
+vtkCxxSetObjectMacro(VTKViewer_LineActor,ArrowActor,vtkFollower);
/*!Adds Label and Arrow actors to \a theRenderer.*/
void VTKViewer_LineActor::Render(vtkRenderer *theRenderer)
/*! \li Initialize the Arrow pipe-line representation*/
myConeSource = vtkConeSource::New();
- myConeSource->SetResolution(2);
+ myConeSource->SetResolution(16);
myConeSource->SetAngle(10);
+ myConeSource->SetCenter(-0.5,0.0,0.0);
myMapper[1] = vtkPolyDataMapper::New();
myMapper[1]->SetInput(myConeSource->GetOutput());
- myArrowActor = VTKViewer_UnScaledActor::New();
+ myArrowActor = vtkFollower::New();
myArrowActor->SetMapper(myMapper[1]);
- static int aArrowActorSize = 24;
- myArrowActor->SetSize(aArrowActorSize);
+ static int aArrowActorSize = 16;
+ myArrowActor->SetScale(aArrowActorSize);
myArrowActor->PickableOff();
myLineActor->SetArrowActor(myArrowActor);
void VTKViewer_Axis::SetSize(vtkFloatingPointType theSize)
{
vtkFloatingPointType aPosition[3] = {myDir[0]*theSize, myDir[1]*theSize, myDir[2]*theSize};
- myLineSource->SetPoint2(aPosition);
+
+ vtkFloatingPointType aCoef = 0.99;
+ vtkFloatingPointType aLinePosition[3] = {aPosition[0]*aCoef, aPosition[1]*aCoef, aPosition[2]*aCoef};
+ myLineSource->SetPoint2(aLinePosition);
myArrowActor->SetPosition(0.0,0.0,0.0);
myArrowActor->AddPosition(aPosition);
myArrowActor->SetOrientation(myRot);
+ myArrowActor->SetScale(theSize / 10.);
myLabelActor->SetPosition(0.0,0.0,0.0);
myLabelActor->AddPosition(aPosition);
/*! Sets Arrow actor.
* \param theLabelActor - VTKViewer_UnScaledActor
*/
- void SetArrowActor(VTKViewer_UnScaledActor* theLabelActor);
+ void SetArrowActor(vtkFollower* theArrowActor);
virtual void Render(vtkRenderer *theRenderer);
VTKViewer_UnScaledActor* LabelActor;
/*!Arrow actor pointer*/
- VTKViewer_UnScaledActor* ArrowActor;
+ vtkFollower* ArrowActor;
};
/*!This class provide support trihedron object in vtk viewer.*/
/*! Get arrow actor.
* \retval Return myArrowActor
*/
- virtual VTKViewer_UnScaledActor* GetArrow() { return myArrowActor; }
+ virtual vtkFollower* GetArrow() { return myArrowActor; }
/*! Check if actor belongs to the axis object
* \param theActor - vtkActor pointer
*/
VTKViewer_LineActor *myLineActor;
- /*! VTKViewer_UnScaledActor actor pointer
+ /*! vtkFollower actor pointer
*/
- VTKViewer_UnScaledActor *myArrowActor;
+ vtkFollower *myArrowActor;
/*! VTKViewer_UnScaledActor actor pointer
*/