MeVisLab Resolution Independence API
SoPixelScaleAccess.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2013, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13#ifndef SO_PIXEL_SCALE_ACCESS_H
14#define SO_PIXEL_SCALE_ACCESS_H
15
16// Include the DSO specific header.
17#include "SoUtilsSystem.h"
18
19// Include base-class header.
20#include <Inventor/nodes/SoSubNode.h>
21// Include field headers.
22#include <Inventor/fields/SoSFFloat.h>
23
24// Forward declarations
25class SoGLRenderAction;
26
27// Declare SoPixelScaleAccess node being a subnode of a SoNode
29{
30 // Make a typedef of the parent type to allow easier adaptation of
31 // the sourcecode if the parent node should change.
32 typedef SoNode inherited;
33
34 // Insert sourcecode common to all subnodes of Open-Inventor.
35 SO_NODE_HEADER(SoPixelScaleAccess);
36
37 public:
38
41 SoSFFloat scaleFactorOut;
42
45
46 protected:
47
50
51 SoEXTENDER public:
52
54 void GLRender(SoGLRenderAction *action) override;
55
56 SoINTERNAL public:
57
59 static void initClass();
60
61 private:
62
63 float _prevScaleFactor;
64};
65
66#endif // __SoPixelScaleAccess_H
#define SOUTILS_EXPORT
System dependent includes. Disables some compiler/linker warnings.
void GLRender(SoGLRenderAction *action) override
Allow access to camer state.
SoPixelScaleAccess()
Constructor.
~SoPixelScaleAccess() override
Destructor.
static void initClass()
Register this node with the Open Inventor runtime system.
SoSFFloat scaleFactorOut
Ratio between physical pixels and device-independent pixels of the connected viewer.