VR-Forces 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) 2025 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 
35  // initialize to default values
36  bool init_sensim(int win_w, int win_h);
37 
42  void applySensorEffects(GLuint inputTextureId, GLuint outputTextureId = 0);
43 
44  // resize the area of the frame buffer that SenSim is applied to
45  void resizeViewports(unsigned int inX, unsigned int inY,
46  unsigned int inWidth, unsigned int inHeight,
47  unsigned int outX, unsigned int outY,
48  unsigned int outWidth, unsigned int outHeight);
49 
50  // percentage of the frame size SenSim is using; should be set to 1.0 always
52 
53  //@name Setters for SenSim attributes
55  void toggleHalo(bool val);
56  void toggleIr(bool val);
57  void toggleFilter(bool val);
58  void toggleGain(bool val);
59  void toggleBlur(bool val);
60  void toggleNoise(bool val);
61  void toggleIrPolarity(bool val);
62  void setGain(float gain);
63  void setLevel(float level);
64  void setFilter(float filter);
65  void setNoise(float noise);
66  void setFullColor(bool fullColor);
67  void setSampling(float sampling);
69 
70  // Update SenSim rendering according to the current attribute state
71  //
72  // Must be called before changes made in the above setters take effect
73  void updateSettings();
74 
75  private:
76 
77  seSenSim *m_sensorEffects; //pointer to seSenSim object used for changing SenSim settings
78  bool m_filterOn;//is the filter on 'F'
79  bool m_noiseOn;//is noise on 'N'
80  bool m_blurOn;//is blur on
81  bool m_haloOn;//is halo on 'H'
82  bool m_agcOn;//is automatic gain control on 'A'
83  bool m_gainOn;
84  bool m_blackHotOn;//is polarity control on 'P'
85  bool m_IRsensorOn;//is ir/nvg sensor control on 'I'
87  float m_blurLevel;
91  int m_inWidth;
94  int m_inX;
95  int m_inY;
96  int m_outX;
97  int m_outY;
99  };
100 }
int m_outY
Definition: DtSenSim.h:97
void applySensorEffects(GLuint inputTextureId, GLuint outputTextureId=0)
call per frame to apply sensor effects
void setSampling(float sampling)
int m_inX
Definition: DtSenSim.h:94
bool m_noiseOn
Definition: DtSenSim.h:79
Contains DLL export macros.
float m_blurLevel
Definition: DtSenSim.h:87
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:78
void toggleHalo(bool val)
void toggleNoise(bool val)
bool m_blurOn
Definition: DtSenSim.h:80
unsigned int GLuint
Definition: DtGlTextureBufferObject.h:18
void toggleFilter(bool val)
int m_outWidth
Definition: DtSenSim.h:93
void toggleIrPolarity(bool val)
int m_outX
Definition: DtSenSim.h:96
This class provides the OSG-specific implementation of a DtChannel.
Definition: DtOsgChannel.h:58
float m_levelAdjustment
Definition: DtSenSim.h:88
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:82
void setFullColor(bool fullColor)
void toggleGain(bool val)
void toggleIr(bool val)
bool m_blackHotOn
Definition: DtSenSim.h:84
void setLevel(float level)
void setFilter(float filter)
seSenSim * m_sensorEffects
Definition: DtSenSim.h:77
bool m_fullColorOn
Definition: DtSenSim.h:86
bool m_gainOn
Definition: DtSenSim.h:83
bool m_haloOn
Definition: DtSenSim.h:81
void toggleBlur(bool val)
int m_outHeight
Definition: DtSenSim.h:92
bool m_IRsensorOn
Definition: DtSenSim.h:85
bool init_sensim(int win_w, int win_h)
int m_inHeight
Definition: DtSenSim.h:90
int m_inWidth
Definition: DtSenSim.h:91
DtOsgChannel & m_channel
Definition: DtSenSim.h:98
float m_gainAdjustment
Definition: DtSenSim.h:89
int m_inY
Definition: DtSenSim.h:95
float m_seScaleFactor
Definition: DtSenSim.h:51
void setNoise(float noise)

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)