MeVisLab Toolbox Reference
SoView2DExtensionSampler.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2007, 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#pragma once
14
15#include "SoView2DExtension.h"
16
18
19#include <Inventor/fields/SoSFBool.h>
20#include <Inventor/fields/SoSFInt32.h>
21#include <Inventor/fields/SoSFTrigger.h>
22
24
25
27{
28 SO_NODE_HEADER(SoView2DExtensionSampler);
29
30public:
32
33 SoSFString overlayName;
34
36 SoSFTypedEnum<View2DTextureFilter> filterMode;
37
39 SoSFTypedEnum<View2DBlendMode> blendMode;
40
44 SoSFInt32 multiSampling;
45
47
49 static void initClass();
50
53
55 void draw(View2DSliceList *dsl, View2DSlice* dslice, int slice) override;
56
58 bool evaluateEvent(SoView2D *view2d, View2DEvent* ec) override;
59
61 void startDrawing(View2DSliceList* slicelist) override;
62
64 void endDrawing(View2DSliceList* slicelist) override;
65
66protected:
68
70 void doAction(SoAction *action) override;
71
72private:
74 SoNodeList _extensions;
75
77 SoView2DShaderOverlayInfo _overlayInfo;
78
79 ml::GLFrameBuffer _fbo;
80 View2DTexture _texture;
81 ml::GLFrameBuffer _msaaFbo;
82 ml::GLRenderBuffer _msaaColorBuffer;
83 int _usedMultiSampling;
84};
#define SOVIEW2D_API
File to resolve system dependencies in View2D library.
SoSFBool enableMultiSampling
enable MSAA multisampling (if supported by hardware)
void startDrawing(View2DSliceList *slicelist) override
reimplemented from SoView2DExtension
bool evaluateEvent(SoView2D *view2d, View2DEvent *ec) override
reimplemented from SoView2DExtension
SoSFTypedEnum< View2DTextureFilter > filterMode
filter mode for rendering
SoView2DExtensionSampler()
Constructor.
~SoView2DExtensionSampler() override
void draw(View2DSliceList *dsl, View2DSlice *dslice, int slice) override
reimplemented from SoView2DExtension
void doAction(SoAction *action) override
reimplemented from SoView2DExtension
SoSFTypedEnum< View2DBlendMode > blendMode
select the blend mode of the overlay
void endDrawing(View2DSliceList *slicelist) override
reimplemented from SoView2DExtension
SoSFInt32 multiSampling
number of multisampling samples
static void initClass()
inventor runtime type system
SoView2DExtension()
Constructor.
Stores information for each overlay to render.
SoView2D is a 2D viewer for image data.
Definition SoView2D.h:62
View2DEvent stores all information on an event on a SoView2D.
a list that holds all View2DSlice objects (lazily created) of a SoView2D
a single slice that is stored in a View2DSliceList, typically created by a View2DSliceList
Definition View2DSlice.h:48
A class to render images as OpenGL Textures.