0023776: Redesign of MFC samples after V2d viewer removing
[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 //////////////////////////////////////////////////////////////////////
18 // Construction/Destruction
19 //////////////////////////////////////////////////////////////////////
20
21 ISession_Surface::ISession_Surface(Handle(Geom_Surface)& aSurface)
22 :AIS_InteractiveObject(),mySurface(aSurface)
23 {
24 }
25
26 ISession_Surface::~ISession_Surface()
27 {
28
29 }
30 void ISession_Surface::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
31                              const Handle(Prs3d_Presentation)& aPresentation,
32                              const Standard_Integer aMode)
33 {
34
35     GeomAdaptor_Surface anAdaptorSurface(mySurface);
36     Handle(GeomAdaptor_HSurface) anAdaptorHSurface = new GeomAdaptor_HSurface(mySurface);
37
38     Handle(AIS_Drawer) aDrawer = new AIS_Drawer();
39     aDrawer->LineAspect()->SetColor(Quantity_NOC_YELLOW3);
40
41     switch (aMode)
42     {
43         case 2:
44               StdPrs_ShadedSurface::Add(aPresentation,anAdaptorSurface,myDrawer);
45         break;
46         case 1 :
47           StdPrs_WFPoleSurface::Add(aPresentation,anAdaptorSurface,aDrawer);
48         case 0 :
49           StdPrs_WFSurface::Add(aPresentation,anAdaptorHSurface,myDrawer);
50         break;
51     }
52
53 }
54
55 void ISession_Surface::Compute(const Handle(Prs3d_Projector)& aProjector,
56                              const Handle(Prs3d_Presentation)& aPresentation) 
57 {
58 }
59
60 void ISession_Surface::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
61                                       const Standard_Integer aMode) 
62
63 }