0025773: Visualization - remove AIS_Drawer class and transfer its Link() logic to...
[occt.git] / samples / mfc / occtdemo / Common / ISession / ISession_Curve.cpp
CommitLineData
7fd59977 1// ISession_Curve.cpp: implementation of the ISession_Curve class.
2//
3//////////////////////////////////////////////////////////////////////
4
5#include "stdafx.h"
6#include "ISession_Curve.h"
7#include <Prs3d_LineAspect.hxx>
8#include <StdPrs_Curve.hxx>
9#include <GeomAdaptor_Curve.hxx>
6262338c 10#include <Prs3d_Drawer.hxx>
7fd59977 11#include <Prs3d_ArrowAspect.hxx>
12
13
14IMPLEMENT_STANDARD_HANDLE(ISession_Curve,AIS_InteractiveObject)
15IMPLEMENT_STANDARD_RTTI(ISession_Curve,AIS_InteractiveObject)
16//
17// Foreach ancestors, we add a IMPLEMENT_STANDARD_SUPERTYPE and
18// a IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY macro.
19// We must respect the order: from the direct ancestor class
20// to the base class.
21//
22IMPLEMENT_STANDARD_TYPE(ISession_Curve)
23 IMPLEMENT_STANDARD_SUPERTYPE(AIS_InteractiveObject)
24 IMPLEMENT_STANDARD_SUPERTYPE(SelectMgr_SelectableObject)
25 IMPLEMENT_STANDARD_SUPERTYPE(PrsMgr_PresentableObject)
26 IMPLEMENT_STANDARD_SUPERTYPE(MMgt_TShared)
27 IMPLEMENT_STANDARD_SUPERTYPE(Standard_Transient)
28 IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
29 IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY(AIS_InteractiveObject)
30 IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY(SelectMgr_SelectableObject)
31 IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY(PrsMgr_PresentableObject)
32 IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY(MMgt_TShared)
33 IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_ENTRY(Standard_Transient)
34 IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
35IMPLEMENT_STANDARD_TYPE_END(ISession_Curve)
36
37#ifdef _DEBUG
38#undef THIS_FILE
39static char THIS_FILE[]=__FILE__;
40#endif
41
42//////////////////////////////////////////////////////////////////////
43// Construction/Destruction
44//////////////////////////////////////////////////////////////////////
45
46
47ISession_Curve::ISession_Curve(const Handle(Geom_Curve)& aCurve)
48:AIS_InteractiveObject(),myCurve(aCurve)
49{
50}
51
52ISession_Curve::~ISession_Curve()
53{
54
55}
56void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
57 const Handle(Prs3d_Presentation)& aPresentation,
58 const Standard_Integer /*aMode*/)
59{
60 GeomAdaptor_Curve anAdaptorCurve(myCurve);
61 if (hasOwnColor)
62 myDrawer->LineAspect()->SetColor(myOwnColor);
63 myDrawer->Link()->SetDiscretisation(100);
64 myDrawer->Link()->SetMaximalParameterValue(500);
65
66 StdPrs_Curve::Add (aPresentation, anAdaptorCurve, myDrawer);
67}
68
69void ISession_Curve::Compute(const Handle(Prs3d_Projector)& aProjector,
70 const Handle(Prs3d_Presentation)& aPresentation)
71 {
72
73 }
74
75void ISession_Curve::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
76 const Standard_Integer aMode)
77{
78}
79
80