| 1 | // ISession_Curve.cpp: implementation of the ISession_Curve class. |
| 2 | // |
| 3 | ////////////////////////////////////////////////////////////////////// |
| 4 | |
| 5 | #include "stdafx.h" |
| 6 | #include "ISession_Curve.h" |
| 7 | #include <Prs3d_LineAspect.hxx> |
| 8 | #include <StdPrs_Curve.hxx> |
| 9 | #include <GeomAdaptor_Curve.hxx> |
| 10 | #include <Prs3d_Drawer.hxx> |
| 11 | #include <Prs3d_ArrowAspect.hxx> |
| 12 | |
| 13 | IMPLEMENT_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject) |
| 14 | |
| 15 | #ifdef _DEBUG |
| 16 | #undef THIS_FILE |
| 17 | static char THIS_FILE[]=__FILE__; |
| 18 | #endif |
| 19 | |
| 20 | ////////////////////////////////////////////////////////////////////// |
| 21 | // Construction/Destruction |
| 22 | ////////////////////////////////////////////////////////////////////// |
| 23 | |
| 24 | |
| 25 | ISession_Curve::ISession_Curve(const Handle(Geom_Curve)& aCurve) |
| 26 | :AIS_InteractiveObject(),myCurve(aCurve) |
| 27 | { |
| 28 | } |
| 29 | |
| 30 | ISession_Curve::~ISession_Curve() |
| 31 | { |
| 32 | |
| 33 | } |
| 34 | void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/, |
| 35 | const Handle(Prs3d_Presentation)& aPresentation, |
| 36 | const Standard_Integer /*aMode*/) |
| 37 | { |
| 38 | GeomAdaptor_Curve anAdaptorCurve(myCurve); |
| 39 | if (hasOwnColor) |
| 40 | myDrawer->LineAspect()->SetColor (myDrawer->Color()); |
| 41 | myDrawer->Link()->SetDiscretisation(100); |
| 42 | myDrawer->Link()->SetMaximalParameterValue(500); |
| 43 | |
| 44 | StdPrs_Curve::Add (aPresentation, anAdaptorCurve, myDrawer); |
| 45 | } |
| 46 | |
| 47 | void ISession_Curve::ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/, |
| 48 | const Standard_Integer /*aMode*/) |
| 49 | { |
| 50 | } |
| 51 | |
| 52 | |