Integration of OCCT 6.5.0 from SVN
[occt.git] / samples / java / src / ISession / ISession_Curve.cxx
1 #include <ISession_Curve.ixx>
2 #include <GeomAdaptor_Curve.hxx>
3 #include <AIS_InteractiveObject.hxx>
4 #include <AIS_Drawer.hxx>
5 #include <StdPrs_PoleCurve.hxx>
6 #include <Prs3d_LineAspect.hxx>
7 #include <StdPrs_Curve.hxx>
8
9
10
11 ISession_Curve::ISession_Curve(const Handle(Geom_Curve)& aCurve)
12      :AIS_InteractiveObject(),myCurve(aCurve)
13 {
14 }
15
16  void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& ,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode) 
17 {
18   GeomAdaptor_Curve anAdaptorCurve(myCurve);
19   Handle(AIS_Drawer) aDrawer = new AIS_Drawer();
20   aDrawer->LineAspect()->SetColor(Quantity_NOC_RED);
21   
22   switch (aMode)
23   {
24     case 1 :
25       StdPrs_PoleCurve::Add(aPresentation, anAdaptorCurve,aDrawer);
26     case 0 :
27       StdPrs_Curve::Add( aPresentation, anAdaptorCurve ,myDrawer);
28       break;
29   }
30 }
31
32  void ISession_Curve::Compute(const Handle(Prs3d_Projector)& ,const Handle(Prs3d_Presentation)& ) 
33 {
34 }
35
36  void ISession_Curve::ComputeSelection(const Handle(SelectMgr_Selection)& ,const Standard_Integer ) 
37 {
38 }
39