1 // Copyright 2001-2018 Crytek GmbH / Crytek Group. All rights reserved.
5 #include "PolylineTool.h"
12 m_NumOfSubdivision(kDefaultSubdivisionNum
)
16 void Serialize(Serialization::IArchive
& ar
)
18 ar(SUBDIVISION_RANGE(m_NumOfSubdivision
), "SubdivisionCount", "Subdivision Count");
21 int m_NumOfSubdivision
;
24 class CurveTool
: public PolylineTool
28 CurveTool(EDesignerTool tool
) :
30 m_ArcState(eArcState_ChooseFirstPoint
)
34 virtual ~CurveTool(){}
37 bool OnLButtonDown(CViewport
* view
, UINT nFlags
, CPoint point
) { return true; }
38 bool OnLButtonUp(CViewport
* view
, UINT nFlags
, CPoint point
);
39 bool OnMouseMove(CViewport
* view
, UINT nFlags
, CPoint point
);
40 void Display(DisplayContext
& dc
);
41 bool OnKeyDown(CViewport
* view
, uint32 nChar
, uint32 nRepCnt
, uint32 nFlags
);
43 bool IsPhaseFirstStepOnPrimitiveCreation() const override
;
44 void Serialize(Serialization::IArchive
& ar
) override
;
47 void PrepareArcSpots(CViewport
* view
, UINT nFlags
, CPoint point
);
51 eArcState_ChooseFirstPoint
,
52 eArcState_ChooseLastPoint
,
53 eArcState_ControlMiddlePoint
56 ELineState m_LineState
;
57 EDrawingArcState m_ArcState
;
60 CurveParameter m_CurveParameter
;