VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtSenSim.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2018 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvSenSim/vrvSenSim.h>
13 
14 #include <GL/glew.h>
15 
16 #include <osg/Camera>
17 
18 class seSenSim;
19 
20 namespace makVrv
21 {
22  class DtOsgChannel;
23 
24  // Internal utility class to manage SenSim instances per channel/window
25  // Mostly adapted from JRM sample code
26  class DtSenSim
27  {
28  public:
29  //constructor
30  DtSenSim(DtOsgChannel& channel);
31 
32  //destructor
33  ~DtSenSim();
34 
39 
40  // initialize to default values
41  bool init_sensim(int win_w, int win_h);
42 
47  void applySensorEffects(GLuint inputTextureId, GLuint outputTextureId = 0);
48 
49  // resize the area of the frame buffer that SenSim is applied to
50  void resizeViewports(unsigned int inX, unsigned int inY,
51  unsigned int inWidth, unsigned int inHeight,
52  unsigned int outX, unsigned int outY,
53  unsigned int outWidth, unsigned int outHeight);
54 
55  // percentage of the frame size SenSim is using; should be set to 1.0 always
57 
58  //@name Setters for SenSim attributes
60  void toggleHalo(bool val);
61  void toggleIr(bool val);
62  void toggleFilter(bool val);
63  void toggleGain(bool val);
64  void toggleBlur(bool val);
65  void toggleNoise(bool val);
66  void toggleIrPolarity(bool val);
67  void setGain(float gain);
68  void setLevel(float level);
69  void setFilter(float filter);
70  void setBlur(float blur);
71  void setNoise(float noise);
72  void setFullColor(bool fullColor);
73  void setSampling(float sampling);
75 
76  // Update SenSim rendering according to the current attribute state
77  //
78  // Must be called before changes made in the above setters take effect
79  void updateSettings();
80 
81  private:
82 
83  seSenSim *m_sensorEffects; //pointer to seSenSim object used for changing SenSim settings
84  bool m_filterOn;//is the filter on 'F'
85  bool m_noiseOn;//is noise on 'N'
86  bool m_blurOn;//is blur on
87  bool m_haloOn;//is halo on 'H'
88  bool m_agcOn;//is automatic gain control on 'A'
89  bool m_gainOn;
90  bool m_blackHotOn;//is polarity control on 'P'
91  bool m_IRsensorOn;//is ir/nvg sensor control on 'I'
93  float m_blurLevel;
97  int m_inWidth;
100  int m_inX;
101  int m_inY;
102  int m_outX;
103  int m_outY;
106  };
107 }
int m_outY
Definition: DtSenSim.h:103
void applySensorEffects(GLuint inputTextureId, GLuint outputTextureId=0)
call per frame to apply sensor effects
void setSampling(float sampling)
int m_inX
Definition: DtSenSim.h:100
bool m_noiseOn
Definition: DtSenSim.h:85
Contains DLL export macros.
float m_blurLevel
Definition: DtSenSim.h:93
DT_DLL_VRVCORE DtTaitBryan level(const DtCoordinateSystem &cs, const DtVector &localOrigin, double topoHeading)
Returns a level orientation with the topographic heading.
bool m_filterOn
Definition: DtSenSim.h:84
void toggleHalo(bool val)
osg::Camera::DrawCallback * myCameraCallback
Definition: DtSenSim.h:105
void toggleNoise(bool val)
bool m_blurOn
Definition: DtSenSim.h:86
unsigned int GLuint
Definition: DtGlTextureBufferObject.h:17
osg::Camera::DrawCallback * postDrawCamera() const
void toggleFilter(bool val)
int m_outWidth
Definition: DtSenSim.h:99
void toggleIrPolarity(bool val)
int m_outX
Definition: DtSenSim.h:102
This class provides the OSG-specific implementation of a DtChannel.
Definition: DtOsgChannel.h:52
float m_levelAdjustment
Definition: DtSenSim.h:94
void setGain(float gain)
DtSenSim(DtOsgChannel &channel)
void resizeViewports(unsigned int inX, unsigned int inY, unsigned int inWidth, unsigned int inHeight, unsigned int outX, unsigned int outY, unsigned int outWidth, unsigned int outHeight)
Definition: DtSenSim.h:26
bool m_agcOn
Definition: DtSenSim.h:88
void setFullColor(bool fullColor)
void toggleGain(bool val)
void toggleIr(bool val)
bool m_blackHotOn
Definition: DtSenSim.h:90
void setLevel(float level)
void setFilter(float filter)
void setPostDrawCamera(osg::Camera::DrawCallback *camera)
seSenSim * m_sensorEffects
Definition: DtSenSim.h:83
void setBlur(float blur)
bool m_fullColorOn
Definition: DtSenSim.h:92
bool m_gainOn
Definition: DtSenSim.h:89
bool m_haloOn
Definition: DtSenSim.h:87
void toggleBlur(bool val)
int m_outHeight
Definition: DtSenSim.h:98
bool m_IRsensorOn
Definition: DtSenSim.h:91
bool init_sensim(int win_w, int win_h)
int m_inHeight
Definition: DtSenSim.h:96
int m_inWidth
Definition: DtSenSim.h:97
DtOsgChannel & m_channel
Definition: DtSenSim.h:104
float m_gainAdjustment
Definition: DtSenSim.h:95
int m_inY
Definition: DtSenSim.h:101
float m_seScaleFactor
Definition: DtSenSim.h:56
void setNoise(float noise)

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)