Integration of OCCT 6.5.0 from SVN
[occt.git] / samples / mfc / standard / 01_Geometry / src / ISession2D / ISession_Surface.cpp
1 // ISession_Surface.cpp: implementation of the ISession_Surface class.
2 //
3 //////////////////////////////////////////////////////////////////////
4
5 #include "stdafx.h"
6 #include "..\\GeometryApp.h"
7 #include "ISession_Surface.h"
8
9 #ifdef _DEBUG
10 #undef THIS_FILE
11 static char THIS_FILE[]=__FILE__;
12 //#define new DEBUG_NEW
13 #endif
14 IMPLEMENT_STANDARD_HANDLE(ISession_Surface,AIS_InteractiveObject)
15 IMPLEMENT_STANDARD_RTTIEXT(ISession_Surface,AIS_InteractiveObject)
16
17 #include "GeomAdaptor_Surface.hxx"
18 #include "StdPrs_WFSurface.hxx"
19 #include "StdPrs_WFPoleSurface.hxx"
20 #include "GeomAdaptor_HSurface.hxx"
21 #include "AIS_Drawer.hxx"
22 #include "Prs3d_IsoAspect.hxx"
23 #include "StdPrs_WFDeflectionShape.hxx"
24 #include "StdPrs_ShadedSurface.hxx"
25
26 //////////////////////////////////////////////////////////////////////
27 // Construction/Destruction
28 //////////////////////////////////////////////////////////////////////
29
30 ISession_Surface::ISession_Surface(Handle(Geom_Surface)& aSurface)
31 :AIS_InteractiveObject(),mySurface(aSurface)
32 {
33 }
34
35 ISession_Surface::~ISession_Surface()
36 {
37
38 }
39 void ISession_Surface::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
40                              const Handle(Prs3d_Presentation)& aPresentation,
41                              const Standard_Integer aMode)
42 {
43
44     GeomAdaptor_Surface anAdaptorSurface(mySurface);
45     Handle(GeomAdaptor_HSurface) anAdaptorHSurface = new GeomAdaptor_HSurface(mySurface);
46
47     Handle(AIS_Drawer) aDrawer = new AIS_Drawer();
48     aDrawer->LineAspect()->SetColor(Quantity_NOC_YELLOW3);
49
50     switch (aMode)
51     {
52         case 2:
53               StdPrs_ShadedSurface::Add(aPresentation,anAdaptorSurface,myDrawer);
54         break;
55         case 1 :
56           StdPrs_WFPoleSurface::Add(aPresentation,anAdaptorSurface,aDrawer);
57         case 0 :
58           StdPrs_WFSurface::Add(aPresentation,anAdaptorHSurface,myDrawer);
59         break;
60     }
61
62 }
63
64 void ISession_Surface::Compute(const Handle(Prs3d_Projector)& aProjector,
65                              const Handle(Prs3d_Presentation)& aPresentation) 
66 {
67 }
68
69 void ISession_Surface::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
70                                       const Standard_Integer aMode) 
71
72 }