VR-Vantage 2.8 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtChannel.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/vrvCore.h>
17 #include <vrvUtil/signalslib.h>
18 
19 namespace makVrv
20 {
21  class DtDe;
22  class DtWindow;
23  class DtObserverObject;
24  class DtMouseEvent;
25  class DtKeyEvent;
26  class DtSensor;
27 
31  {
32  protected:
35 
36  public:
37 
39  virtual ~DtChannel();
40 
42  DtObserverObject* findObserver() const;
43 
45  unsigned int currentModelSet() const;
46 
48  virtual void setClearColor(float r,float g,float b, float a) = 0;
49 
51  virtual void setViewport(int x,int y,int width, int height) = 0;
52 
54  virtual void getViewport(int& x,int& y, int& width,int& height) const = 0;
55 
57  virtual void setWindow(DtWindow*) = 0;
58 
60  virtual void setCameraPosition(double x, double y, double z) = 0;
61 
63  virtual const DtWindow* window() const = 0;
64 
67  virtual void setChannelEnabled(bool enabled) = 0;
68 
71  virtual bool channelEnabled() const = 0;
72 
74  virtual void update() = 0;
75 
77  const DtChannelConfiguration& configuration() const;
78 
81  virtual void updateProjection() = 0;
82 
84  virtual void setObserverName( const std::string& observerName );
85 
90  virtual void setSensorName( const std::string& sensorName ) = 0;
91 
94  virtual void setProjectionResizePolicy(
96 
100  projectionResizePolicy() const;
101 
103  virtual bool processMouseEvent( const DtMouseEvent& ev) = 0;
104 
106  virtual bool processKeyboardEvent( const DtKeyEvent& ev) = 0;
107 
110  virtual void projectToScreen( double dbX, double dbY, double dbZ,
111  double& screenX, double& screenY, double& screenZ ) = 0;
112 
114  virtual void projectToWorld( double screenX, double screenY,
115  double& dbX, double& dbY, double& dbZ ) = 0;
116 
118  virtual void moveMouseToScreenLocation( float pixelX, float pixelY ) = 0;
119 
121  std::string& observerName();
122 
124  virtual void screenCapture() = 0;
125 
127  virtual void updateCameraFrustumPlanes( std::vector< DtVector4<double> >& planes ) = 0;
128 
131  virtual void updateAcquisitionBoxFrustumPlanes(const int& boxCenterX, const int& boxCenterY,
132  const int& boxWidth, const int& boxHeight, std::vector< DtVector4<double> >& planes ) = 0;
133 
134  protected:
135  virtual void connectToObserver() = 0;
136 
138  virtual void observerAdded( const std::string& observerName );
140  virtual void observerRemoved( const std::string& observerName );
141 
142  protected:
143 
147 
152 
153  private:
154 
156  DtChannel();
157 
159  DtChannel(const DtChannel&);
160 
162  DtChannel &operator=(const DtChannel &);
163  };
164 
170  {
171 
172  public:
175  static DtChannelCreator& instance(DtDe& theIG);
176 
178  static void registerInstance(DtDe& de, DtChannelCreator* instance);
179 
181  virtual DtChannel* create(DtDe& de, DtWindow* window,
183  };
184 }


Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)