MeVisLab Toolbox Reference
CSOPointDensity.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2016, 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 <SoCSOSystem.h>
16 
17 #include <Inventor/fields/SoSFEnum.h>
18 #include <Inventor/fields/SoSFFloat.h>
19 #include <SoPointerPosition.h>
20 
21 
23 {
27 };
28 
30 {
31 public:
33 
34  float getPointDensity(const SoPointerPosition& pos) const;
35 
36  SoSFEnum pointDensityMode;
37  SoSFFloat densityFactor;
38 };
39 
40 #define SO_NODE_ADD_POINT_DENSITY_FIELDS() \
41  SO_NODE_DEFINE_ENUM_VALUE(POINT_DENSITY, DENSITY_SCREEN_PIXEL); \
42  SO_NODE_DEFINE_ENUM_VALUE(POINT_DENSITY, DENSITY_MIN_VOXEL_EXTENT); \
43  SO_NODE_DEFINE_ENUM_VALUE(POINT_DENSITY, DENSITY_MILLIMETER); \
44  SO_NODE_SET_SF_ENUM_TYPE(pointDensityMode, POINT_DENSITY); \
45  SO_NODE_ADD_FIELD(pointDensityMode, (DENSITY_SCREEN_PIXEL)); \
46  SO_NODE_ADD_FIELD(densityFactor, (0.1f));
POINT_DENSITY
@ DENSITY_MILLIMETER
@ DENSITY_MIN_VOXEL_EXTENT
@ DENSITY_SCREEN_PIXEL
#define SOCSO_EXPORT
Header file for system independent resolution.
Definition: SoCSOSystem.h:21
SoSFEnum pointDensityMode
float getPointDensity(const SoPointerPosition &pos) const
SoSFFloat densityFactor
SoPointerPosition manages the current position of the mouse cursor.