Free Electron
PickPoint.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 __viewer_PickPoint_h__
8 #define __viewer_PickPoint_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 /**************************************************************************//**
16  @brief Interactive specification of a 3D point
17 
18  @ingroup viewer
19 
20  PickPoint expects WindowEvent, but it checks safely.
21 
22  The fourth element is non-zero when the point is valid.
23 *//***************************************************************************/
24 class FE_DL_EXPORT PickPoint: virtual public HandlerI,
25  virtual public PointI
26 {
27  public:
28  PickPoint(void);
29 virtual ~PickPoint(void) {}
30 
31  //* As HandlerI
32 virtual void handle(Record& record);
33 
34  //* As PointI
35 virtual SpatialVector& point(const WindowEvent::Mask& mask);
36 virtual
37 const SpatialVector& point(const WindowEvent::Mask& mask) const;
38 
39 virtual U32 flags(void) const { return m_flags; }
40 
41 virtual void setView(sp<ViewI> spViewI) { m_spViewI=spViewI; }
42 virtual void drawFeedback(sp<DrawI> spDrawI) const;
43 
44  private:
45  U32 itemIndex(const WindowEvent::Mask& mask) const;
46 
47  WindowEvent m_event;
48  sp<ViewI> m_spViewI;
49  I32 m_mouseState[2];
50  U32 m_flags;
51  Real m_zValue;
52  SpatialVector m_feedback;
53  SpatialVector m_point[3][2];
54  sp<DrawMode> m_spHalo;
55 };
56 
57 } /* namespace ext */
58 } /* namespace fe */
59 
60 #endif /* __viewer_PickPoint_h__ */
kernel
Definition: namespace.dox:3
virtual void setView(sp< ViewI > spViewI)
Associate with a ViewI for anything screen-based.
Definition: PickPoint.h:41
Interface to handle signals from an SignalerI.
Definition: HandlerI.h:22
Generalized windowing event.
Definition: WindowEvent.h:43
Reference to an instance of a Layout.
Definition: RecordSB.h:35
Interactive specification of a 3D point.
Definition: PickPoint.h:24
A location in 3D space.
Definition: PointI.h:20