VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtChannel.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 
12 #include <vrvCore/vrvCore.h>
13 
14 #include <vrvCore/DtIntersector.h>
15 
19 #include <vrvUtil/signalslib.h>
20 
21 #include <vrvMath/DtVector4.h>
22 
23 namespace makVrv
24 {
25  class DtDe;
26  class DtWindow;
27  class DtObserverObject;
28  class DtMouseEvent;
29  class DtKeyEvent;
30  class DtSensor;
31  class DtIntersectorResult;
32 
36  {
37  protected:
40 
41  public:
42 
44  virtual ~DtChannel();
45 
47  DtObserverObject* findObserver() const;
48 
50  DtModelSetId currentModelSet() const;
51 
53  virtual void setClearColor(float r,float g,float b, float a) = 0;
54 
56  virtual void setViewport(int x,int y,int width, int height) = 0;
57 
59  virtual void getViewport(int& x,int& y, int& width,int& height) const = 0;
60 
62  virtual void setWindow(DtWindow*) = 0;
63 
65  virtual void setCameraPosition(double x, double y, double z) = 0;
66 
68  virtual const DtWindow* window() const = 0;
69 
72  virtual void setChannelEnabled(bool enabled, bool partial=false) = 0;
73 
76  virtual bool channelEnabled() const = 0;
77 
79  virtual void update() = 0;
80 
82  const DtChannelConfiguration& configuration() const;
83 
86  virtual void updateProjection() = 0;
87 
89  virtual void setObserverName( const std::string& observerName );
90 
95  virtual void setSensorName( const std::string& sensorName ) = 0;
96 
99  virtual void setProjectionResizePolicy(
101 
105  projectionResizePolicy() const;
106 
108  virtual bool processMouseEvent( const DtMouseEvent& ev) = 0;
109 
111  virtual bool processKeyboardEvent( const DtKeyEvent& ev) = 0;
112 
115  virtual void projectToScreen( double dbX, double dbY, double dbZ,
116  double& screenX, double& screenY, double& screenZ ) const = 0;
117 
119  virtual void projectToWorld( double screenX, double screenY,
120  double& dbX, double& dbY, double& dbZ ) const = 0;
121 
128  virtual DtIntersectorResult findWorldIntersection(double screenX, double screenY,
130  std::vector<DtElementID>* ignoreList = 0) = 0;
131 
133  virtual void moveMouseToScreenLocation( float pixelX, float pixelY ) = 0;
134 
136  std::string& observerName();
137 
139  virtual void screenCapture() = 0;
140 
142  virtual void updateCameraFrustumPlanes( std::vector< DtVector4<double> >& planes ) = 0;
143 
146  virtual void updateAcquisitionBoxFrustumPlanes(const int& boxCenterX, const int& boxCenterY,
147  const int& boxWidth, const int& boxHeight, std::vector< DtVector4<double> >& planes ) = 0;
148 
155  virtual std::vector<DtElementID> entitiesInFrustum() = 0;
156 
159  virtual double lastEffectiveViewMagnification() const = 0;
160 
161  protected:
162  virtual void connectToObserver() = 0;
163 
165  virtual void observerAdded( const std::string& observerName );
167  virtual void observerRemoved( const std::string& observerName );
168 
169  protected:
170 
174 
177  std::string myObserverName;
179 
180  private:
181 
183  DtChannel();
184 
186  DtChannel(const DtChannel&);
187 
189  DtChannel &operator=(const DtChannel &);
190  };
191 
197  {
198 
199  public:
202  static DtChannelCreator& instance(DtDe& theIG);
203 
205  static void registerInstance(DtDe& de, DtChannelCreator* instance);
206 
208  virtual DtChannel* create(DtDe& de, DtWindow* window,
210  };
211 }
IntersectProperties
The IntersectProperties enum is a flag set that indicates the types of nodes to be considered for int...
Definition: DtIntersector.h:31
Abstract Base class.
Definition: DtWindow.h:25
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
This class encapsulates a Key event.
Definition: DtKeyEvent.h:16
Descriptor for a single intersection result.
Definition: DtIntersectorResult.h:21
DtDe & myDe
Definition: DtChannel.h:171
Contains makVrv::DtChannelConfiguration class.
The abstract channel creator for the abstract channel class.
Definition: DtChannel.h:196
4 dimensional vector
This class encapsulates a mouse button event.
Definition: DtMouseEvent.h:19
DtChannelConfiguration & myChannelConfiguration
Definition: DtChannel.h:172
DtObserverObject * myObserver
Definition: DtChannel.h:176
The abstract Channel Class.
Definition: DtChannel.h:35
Contains makVrv::DtVirtualBaseClass class.
Contains makVrv:DtIntersector class.
DtModelSetId myModelSet
Definition: DtChannel.h:175
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
This abstract base class defines the interface for OS-specific keyboard and mouse event listeners...
Definition: DtObserverObject.h:35
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
DtChannelConfiguration::ProjectionResizePolicy myProjectionResizePolicy
Definition: DtChannel.h:178
std::string myObserverName
Definition: DtChannel.h:177
Base class to provide boost signal/slot management.
Configuration for a single channel Serialized and sent to remote displays as necessary to configure r...
Definition: DtChannelConfiguration.h:24
DtSignalConnectionManager myConnections
Definition: DtChannel.h:173
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
DtModelSetId
Definition: DtModelSetEnums.h:19
Definition: DtIntersector.h:33
ProjectionResizePolicy
Definition: DtChannelConfiguration.h:44
Contains DLL export macros.

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)