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

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)