Free Electron
CurvaceousOp.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __oplab_CurvaceousOp_h__
8 #define __oplab_CurvaceousOp_h__
9 namespace fe
10 {
11 namespace ext
12 {
13 
14 /**************************************************************************//**
15  @brief Operator to interactively alter curves
16 
17  @ingroup oplab
18 *//***************************************************************************/
19 class FE_DL_EXPORT CurvaceousOp:
20  public OperatorState,
21  public Initialize<CurvaceousOp>
22 {
23  public:
24 
25  CurvaceousOp(void):
26  m_lastFrame(0.0),
27  m_brushed(FALSE),
28  m_dragging(FALSE),
29  m_pickId(-1),
30  m_pickVertex(-1),
31  m_pickU(0.0),
32  m_pickDistance(0.0) {}
33 
34 virtual ~CurvaceousOp(void) {}
35 
36  void initialize(void);
37 
38  //* As HandlerI
39 virtual void handleBind(sp<SignalerI> a_spSignalerI,
40  sp<Layout> a_spLayout);
41 virtual void handle(Record& a_rSignal);
42 
43  protected:
44 
45 virtual void setupState(void);
46 virtual BWORD loadState(const String& rBuffer);
47 
48  private:
49 
50  void movePicked(const SpatialVector& a_rDelta);
51  void combPicked(const SpatialVector& a_rTarget,
52  const SpatialVector& a_rDelta);
53 
54  sp<OperatorSurfaceI> m_spLengthCorrect;
55 
56  sp<SurfaceI> m_spOutput;
57  sp<SurfaceI> m_spDriver;
58  sp<SurfaceAccessorI> m_spInputIds;
59  sp<SurfaceAccessorI> m_spInputPoint;
60  sp<SurfaceAccessorI> m_spInputColor;
61  sp<SurfaceAccessorI> m_spInputRadius;
62  sp<SurfaceAccessorI> m_spOutputPoint;
63  sp<SurfaceAccessorI> m_spInputVertices;
64  sp<SurfaceAccessorI> m_spOutputVertices;
65  sp<SurfaceAccessorI> m_spOutputNormal;
66  WindowEvent m_event;
67 
68  sp<DrawMode> m_spSolid;
69  sp<DrawMode> m_spWideLine[5];
70 
71  sp< RecordMap<I32> > m_spEditMap;
72  Accessor<SpatialVector> m_aOffset;
73 
74  Real m_frame;
75  Real m_lastFrame;
76 
77  BWORD m_brushed;
78  BWORD m_dragging;
79 
80  I32 m_pickId;
81  I32 m_pickVertex;
82  Real m_pickU;
83  Real m_pickDistance;
84 
85  I32 m_lastX;
86  I32 m_lastY;
87 };
88 
89 } /* namespace ext */
90 } /* namespace fe */
91 
92 #endif /* __oplab_CurvaceousOp_h__ */
Operator base class to save and reload state.
Definition: OperatorState.h:20
kernel
Definition: namespace.dox:3
Per-class participation in the Initialized <> mechanism.
Definition: Initialized.h:117
The main data access class for the data system.
Definition: Accessor.h:128
Dense vector - size fixed by template.
Definition: Vector.h:19
Generalized windowing event.
Definition: WindowEvent.h:43
Automatically reference-counted string container.
Definition: String.h:128
Reference to an instance of a Layout.
Definition: RecordSB.h:35
Operator to interactively alter curves.
Definition: CurvaceousOp.h:19