VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtPickableWidget.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2023 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
13 
15 
16 #include <vrvUtil/signalslib.h>
17 
18 namespace makVrv
19 {
20 
21  class DtDe;
22  class DtQuadProxy;
23  class DtLineSegment;
24  class DtWidgetPicker;
25  class DtTriangleProxy;
26  class DtDecalProjectorComponentInterface;
27 
30 
33 
35  template <>
36  inline const char* creatorTypeName<DtPickableWidget>(void) { return "DtPickableWidgetCreator"; }
37 
41  {
43 
44  public:
45 
47  virtual ~DtPickableWidget() = 0;
48 
50  DtPickableWidget() = delete;
51 
54  const DtPickableWidget &other) = delete;
55 
57  DtPickableWidget &operator=(
58  const DtPickableWidget &other) = delete;
59 
60  public:
61 
63  static unsigned int idFromColor( unsigned int );
64 
66  virtual void setUserData( unsigned long long data );
67 
69  virtual unsigned long long userData() const;
70 
74  inline unsigned int id() const { return myId; };
75 
77  boost::signalslib::signal<void (int x, int y)> signal_mouseEnter;
78 
81  boost::signalslib::signal<void ()> signal_mouseLeave;
82 
84  boost::signalslib::signal<void (int x, int y)> signal_mouseMove;
85 
87  boost::signalslib::signal<void (int x, int y, int button)> signal_mousePress;
88 
90  boost::signalslib::signal<void (int x, int y, int button)> signal_mouseRelease;
91 
93  boost::signalslib::signal<void (int x, int y, int button)> signal_mouseDoubleClick;
94 
96  boost::signalslib::signal<void (int x, int y, int wheel)> signal_mouseWheel;
97 
98  protected:
99 
101  DtPickableWidget( DtDe& de, DtWidgetPicker& picker );
102 
103  protected:
104 
107  unsigned int myId;
108  unsigned long long myUserData;
109 
110  };
111 
114 
117 
119  template <>
120  inline const char* creatorTypeName<DtPickableQuad>(void) { return "DtPickableQuadCreator"; }
121 
122 
126  {
128 
129  public:
130 
132  virtual ~DtPickableQuad();
133 
135  DtPickableQuad() = delete;
136 
139  const DtPickableQuad &other) = delete;
140 
142  DtPickableQuad &operator=(
143  const DtPickableQuad &other) = delete;
144 
145  public:
146 
151  virtual void setPosition( float x, float y, float z, float w );
152 
154  virtual void setRotation( float angle );
155 
161  void setIsRotationInScreenSpace(bool isRotationInScreenSpace);
162 
167  void setMaximumWorldHeight(double worldHeightInMeters);
168 
173  void setMaximumWorldWidth(double worldWidthInMeters);
174 
177  virtual void setPoints( const float points[8] );
178 
181  virtual void setPointsByMinimumAltitude( const float points[8], double altitude );
182 
188  virtual void setIsForcedPointsByAltitudeEnabled(bool isEnabled);
189 
192  virtual void setAltitudeForForcedPoints(double altitude);
193 
195  virtual void clearAltitudeSpecificConfigurations();
196 
200  virtual void setLodOutAltitude(double lodOutAltitude);
201 
204  virtual void setIsLodOutAltitudeEnabled(bool isLodOutAltitudeEnabled);
205 
207  virtual void setGroup( float group );
208 
209  protected:
210 
212  DtPickableQuad( DtDe& de, DtWidgetPicker& picker );
213 
214  protected:
215 
217 
218  };
219 
222 
225 
227  template <>
228  inline const char* creatorTypeName<DtPickableLine>(void) { return "DtPickableLineCreator"; }
229 
234  {
236  public:
237 
239  virtual ~DtPickableLine();
240 
242  DtPickableLine() = delete;
243 
246  const DtPickableLine &other) = delete;
247 
249  DtPickableLine &operator=(
250  const DtPickableLine &other) = delete;
251 
252  public:
253 
258  virtual void set3DPosition( int index0or1, float x, float y, float z, float w );
259 
261  virtual void set2DPosition( int index0or1, float x, float y );
262 
264  virtual void set3DDirection( unsigned int vertexIndex, float x, float y, float z );
265 
267  virtual void setDirection2DLength( unsigned int vertexIndex, float length );
268 
270  virtual void setGroup( float group );
271 
276  virtual void setWidth( float w );
277 
278  protected:
279 
281  DtPickableLine( DtDe& de, DtWidgetPicker& picker );
282 
283  protected:
284 
286 
287  };
288 
291 
294 
296  template <>
297  inline const char* creatorTypeName<DtPickableTriangle>(void) { return "DtPickableTriangleCreator"; }
298 
303  {
305 
306  public:
307 
309  virtual ~DtPickableTriangle();
310 
312  DtPickableTriangle() = delete;
313 
316  const DtPickableTriangle &other) = delete;
317 
319  DtPickableTriangle &operator=(
320  const DtPickableTriangle &other) = delete;
321 
322  public:
323 
325  void set3DPosition( float x, float y, float z, float w );
326 
328  void set3DPosition( unsigned int index, float x, float y, float z, float w );
329 
332  void set2DPosition( unsigned int index, float x, float y );
333 
335  void setGroup( float order );
336 
337  protected:
338 
340  DtPickableTriangle( DtDe& de, DtWidgetPicker& picker );
341 
342  protected:
343 
345 
346  };
347 
348 
351 
354 
356  template <>
357  inline const char* creatorTypeName<DtPickableDecalProjector>(void) { return "DtPickableDecalProjectorCreator"; }
358 
363  {
365 
366  public:
367 
369  virtual ~DtPickableDecalProjector();
370 
372  DtPickableDecalProjector() = delete;
373 
376  const DtPickableDecalProjector& other) = delete;
377 
379  DtPickableDecalProjector& operator=(
380  const DtPickableDecalProjector& other) = delete;
381 
382  public:
383 
385  virtual bool pick(double sceneX, double sceneY, double sceneZ) const;
386 
387  protected:
388 
391 
392  protected:
393 
395  };
396 
397 }
DtDecalProjectorComponentInterface * myComponent
Definition: DtPickableWidget.h:394
friend DtPickableDecalProjectorCreator
Definition: DtPickableWidget.h:364
unsigned long long myUserData
Definition: DtPickableWidget.h:108
const char * creatorTypeName< DtPickableTriangle >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtPickableWidget.h:297
double length(const dvec3 &theVec)
Definition: DtVecUtils.h:20
friend DtPickableQuadCreator
Definition: DtPickableWidget.h:127
The DtPickableQuad is a pickable widget that matches the Quad interface.
Definition: DtPickableWidget.h:125
DtVirtualBaseClassCreator< DtPickableDecalProjector, DtWidgetPicker &, DtDecalProjectorComponentInterface *& > DtPickableDecalProjectorCreator
DtPickableTriangleCreator.
Definition: DtPickableWidget.h:350
boost::signalslib::signal< void()> signal_mouseLeave
Emitted whenever a mouse leaves over a widget, called before it enters another widget.
Definition: DtPickableWidget.h:81
unsigned int myId
Definition: DtPickableWidget.h:107
DtQuadProxy * myQuad
Definition: DtPickableWidget.h:216
The DtPickableLine is a pickable widget that matches the TriangleProxy interface. ...
Definition: DtPickableWidget.h:302
const char * creatorTypeName< DtPickableQuad >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtPickableWidget.h:120
A non-visible interactive widget.
Definition: DtPickableWidget.h:40
const char * creatorTypeName< DtPickableLine >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtPickableWidget.h:228
DtVirtualBaseClassCreator< DtPickableWidget, DtWidgetPicker & > DtPickableWidgetCreator
DtPickableWidgetCreator.
Definition: DtPickableWidget.h:29
The DtPickableDecalProjector is a pickable widget used to pick a decal projector interface.
Definition: DtPickableWidget.h:362
boost::signalslib::signal< void(int x, int y, int button)> signal_mouseDoubleClick
Emitted when a mouse button is doubled clicked over a widget.
Definition: DtPickableWidget.h:93
boost::signalslib::signal< void(int x, int y, int button)> signal_mousePress
Emitted whenever a mouse button is pressed over a widget. If a press.
Definition: DtPickableWidget.h:87
DtVirtualBaseClassCreator< DtPickableQuad, DtWidgetPicker & > DtPickableQuadCreator
DtPickableQuadCreator.
Definition: DtPickableWidget.h:113
A class which represents a component for a decal projector.
Definition: DtDecalProjectorComponentInterface.h:43
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:23
#define DT_DLL_VRVGRAPHICS
Contains DLL export macros.
Definition: vrvGraphics.h:19
A class which represents a single line segment.
Definition: DtLineSegment.h:23
A flyweight class for controlling a triangle owned by the triangle renderer.
Definition: DtTriangleRenderer.h:115
DT_DLL_vrfutil double angle(double vec1[3], double vec2[3])
DtVirtualBaseClassCreator< DtPickableLine, DtWidgetPicker & > DtPickableLineCreator
DtPickableLineCreator.
Definition: DtPickableWidget.h:221
The DtPickableLine is a pickable widget that matches the LineSegment interface.
Definition: DtPickableWidget.h:233
boost::signalslib::signal< void(int x, int y)> signal_mouseMove
Emitted whenever a mouse moves over a widget, including when it enters.
Definition: DtPickableWidget.h:84
DtLineSegment * myLine
Definition: DtPickableWidget.h:285
DtTriangleProxy * myProxy
Definition: DtPickableWidget.h:344
DtVirtualBaseClassCreator< DtPickableTriangle, DtWidgetPicker & > DtPickableTriangleCreator
DtPickableTriangleCreator.
Definition: DtPickableWidget.h:290
friend DtPickableTriangleCreator
Definition: DtPickableWidget.h:304
DtDe & myDe
Definition: DtPickableWidget.h:105
const char * creatorTypeName< DtPickableWidget >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtPickableWidget.h:36
A flyweight class for controlling a single quad owned by the DtQuadRenderer.
Definition: DtQuadProxy.h:26
boost::signalslib::signal< void(int x, int y, int wheel)> signal_mouseWheel
Emitted when a mouse wheel is scrolled over a widget.
Definition: DtPickableWidget.h:96
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
friend DtPickableLineCreator
Definition: DtPickableWidget.h:235
friend DtPickableWidgetCreator
Definition: DtPickableWidget.h:42
boost::signalslib::signal< void(int x, int y, int button)> signal_mouseRelease
Emitted whenever a mouse button is released over a widget.
Definition: DtPickableWidget.h:90
const char * creatorTypeName< DtPickableDecalProjector >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtPickableWidget.h:357
DtWidgetPicker & myPicker
Definition: DtPickableWidget.h:106
The picker class which allocates and does picking operations on widgets.
Definition: DtWidgetPicker.h:53

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)