Integration of OCCT 6.5.0 from SVN
[occt.git] / samples / mfc / standard / 01_Geometry / src / ISession2D / ISession_Point.cpp
1 // ISession_Point.cpp: implementation of the ISession_Point class.
2 //
3 //////////////////////////////////////////////////////////////////////
4
5 #include "stdafx.h"
6 #include "..\\GeometryApp.h"
7 #include "ISession_Point.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_Point,AIS_InteractiveObject)
15 IMPLEMENT_STANDARD_RTTIEXT(ISession_Point,AIS_InteractiveObject)
16
17 #include "Graphic2d_CircleMarker.hxx"
18 #include "StdPrs_Point.hxx"
19 #include "Geom_CartesianPoint.hxx"
20 //////////////////////////////////////////////////////////////////////
21 // Construction/Destruction
22 //////////////////////////////////////////////////////////////////////
23 ISession_Point::ISession_Point(Standard_Real X,Standard_Real Y ,Standard_Real Z)
24 :myPoint(gp_Pnt(X,Y,Z))
25 {
26
27 }
28
29 ISession_Point::ISession_Point(gp_Pnt2d& aPoint,Standard_Real Elevation)
30 :myPoint(gp_Pnt(aPoint.X(),aPoint.Y(),Elevation))
31 {
32
33 }
34
35 ISession_Point::ISession_Point(gp_Pnt& aPoint)
36 :myPoint(aPoint)
37 {
38
39 }
40
41 ISession_Point::~ISession_Point()
42 {
43
44 }
45
46 void ISession_Point::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
47                              const Handle(Prs3d_Presentation)& aPresentation,
48                              const Standard_Integer aMode)
49 {
50     Handle(Geom_CartesianPoint) aGeomPoint = new Geom_CartesianPoint(myPoint);
51
52     StdPrs_Point::Add(aPresentation,aGeomPoint,myDrawer);
53  }
54
55
56 void ISession_Point::Compute(const Handle(Prs3d_Projector)& aProjector,
57                              const Handle(Prs3d_Presentation)& aPresentation) 
58  {
59  }
60
61 void ISession_Point::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager, 
62                          const Handle(Graphic2d_GraphicObject)& aGrObj, 
63                          const Standard_Integer unMode)
64 {
65   Handle(Graphic2d_CircleMarker) aCircleMarker;
66   aCircleMarker = new Graphic2d_CircleMarker(aGrObj,myPoint.X(),myPoint.Y(),0,0,1);
67 }
68
69 void ISession_Point::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection, 
70                                       const Standard_Integer unMode)
71 {
72 }
73