1 // ISession_Direction.cpp: implementation of the ISession_Direction class.
3 //////////////////////////////////////////////////////////////////////
6 #include "ISession_Direction.h"
10 static char THIS_FILE[]=__FILE__;
13 IMPLEMENT_STANDARD_HANDLE(ISession_Direction,AIS_InteractiveObject)
14 IMPLEMENT_STANDARD_RTTIEXT(ISession_Direction,AIS_InteractiveObject)
16 #include "DsgPrs_LengthPresentation.hxx"
17 #include "Prs3d_ArrowAspect.hxx"
18 #include "AIS_Drawer.hxx"
19 //////////////////////////////////////////////////////////////////////
20 // Construction/Destruction
21 //////////////////////////////////////////////////////////////////////
24 ISession_Direction::ISession_Direction(gp_Pnt& aPnt,gp_Pnt& aPnt2)
25 :myStartPnt(aPnt),myEndPnt(aPnt2)
28 ISession_Direction::ISession_Direction(gp_Pnt& aPnt,gp_Vec& aVec)
31 myEndPnt = myStartPnt.Translated(aVec);
35 void ISession_Direction::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
36 const Handle(Prs3d_Presentation)& aPresentation,
37 const Standard_Integer aMode)
39 Handle(Prs3d_ArrowAspect) anArrowAspect = myDrawer->ArrowAspect();
40 anArrowAspect->SetLength(myStartPnt.Distance(myEndPnt));
41 myDrawer->SetArrowAspect(anArrowAspect);
43 DsgPrs_LengthPresentation::Add(aPresentation,myDrawer,