0028060: Samples - Objects in Geometry/Viewer2d have incorrect color
[occt.git] / samples / mfc / standard / 01_Geometry / src / ISession2D / ISession_Curve.cpp
CommitLineData
7fd59977 1// ISession_Curve.cpp: implementation of the ISession_Curve class.
2//
3//////////////////////////////////////////////////////////////////////
4
5#include "stdafx.h"
6#include "..\\GeometryApp.h"
7#include "ISession_Curve.h"
234e52be 8#include <StdPrs_PoleCurve.hxx>
7fd59977 9
7fd59977 10IMPLEMENT_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject)
11
7fd59977 12#ifdef _DEBUG
13#undef THIS_FILE
14static char THIS_FILE[]=__FILE__;
15#endif
16
0e5ef926 17void ISession_Curve::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
18 const Handle(Prs3d_Presentation)& thePrs,
19 const Standard_Integer theMode)
7fd59977 20{
0e5ef926 21 GeomAdaptor_Curve anAdaptorCurve (myCurve);
22 switch (theMode)
23 {
24 case 1:
7fd59977 25 {
0e5ef926 26 Handle(Prs3d_Drawer) aPoleDrawer = new Prs3d_Drawer();
27 aPoleDrawer->SetLineAspect (new Prs3d_LineAspect (Quantity_NOC_RED, Aspect_TOL_SOLID, 1.0));
28 StdPrs_PoleCurve::Add (thePrs, anAdaptorCurve, aPoleDrawer);
7fd59977 29 }
0e5ef926 30 case 0:
31 {
32 StdPrs_Curve::Add (thePrs, anAdaptorCurve, myDrawer);
33 break;
34 }
35 }
7fd59977 36}