0023874: Converting OCCT MFC samples to CMake build system.
[occt.git] / samples / mfc / standard / 01_Geometry / src / ISession2D / ISession_Surface.cpp
CommitLineData
7fd59977 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"
234e52be 8#include <GeomAdaptor_HSurface.hxx>
9#include <StdPrs_ShadedSurface.hxx>
10#include <StdPrs_WFPoleSurface.hxx>
11#include <StdPrs_WFSurface.hxx>
7fd59977 12
13#ifdef _DEBUG
14#undef THIS_FILE
15static char THIS_FILE[]=__FILE__;
16//#define new DEBUG_NEW
17#endif
18IMPLEMENT_STANDARD_HANDLE(ISession_Surface,AIS_InteractiveObject)
19IMPLEMENT_STANDARD_RTTIEXT(ISession_Surface,AIS_InteractiveObject)
20
7fd59977 21//////////////////////////////////////////////////////////////////////
22// Construction/Destruction
23//////////////////////////////////////////////////////////////////////
24
25ISession_Surface::ISession_Surface(Handle(Geom_Surface)& aSurface)
26:AIS_InteractiveObject(),mySurface(aSurface)
27{
28}
29
30ISession_Surface::~ISession_Surface()
31{
32
33}
34void ISession_Surface::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
35 const Handle(Prs3d_Presentation)& aPresentation,
36 const Standard_Integer aMode)
37{
38
39 GeomAdaptor_Surface anAdaptorSurface(mySurface);
40 Handle(GeomAdaptor_HSurface) anAdaptorHSurface = new GeomAdaptor_HSurface(mySurface);
41
42 Handle(AIS_Drawer) aDrawer = new AIS_Drawer();
43 aDrawer->LineAspect()->SetColor(Quantity_NOC_YELLOW3);
44
45 switch (aMode)
46 {
47 case 2:
48 StdPrs_ShadedSurface::Add(aPresentation,anAdaptorSurface,myDrawer);
49 break;
50 case 1 :
51 StdPrs_WFPoleSurface::Add(aPresentation,anAdaptorSurface,aDrawer);
52 case 0 :
53 StdPrs_WFSurface::Add(aPresentation,anAdaptorHSurface,myDrawer);
54 break;
55 }
56
57}
58
59void ISession_Surface::Compute(const Handle(Prs3d_Projector)& aProjector,
60 const Handle(Prs3d_Presentation)& aPresentation)
61{
62}
63
64void ISession_Surface::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
65 const Standard_Integer aMode)
66{
67}