MeVisLab Toolbox Reference
SoArrow.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 #ifndef SO_ARROW_H
14 #define SO_ARROW_H
15 
16 #include "SoUtilsSystem.h"
17 #include <Inventor/nodes/SoSeparator.h>
18 
19 class SoCone;
20 class SoCalculator;
21 class SoCylinder;
22 class SoDrawStyle;
23 class SoFieldSensor;
24 
27 class SOUTILS_EXPORT SoArrow : public SoSeparator {
29  SO_NODE_HEADER(SoArrow);
30 
31 
32 public:
33 
36 
38  static void initClass();
39 
40  // ######## Fields ##############
42  SoSFVec3f position;
44  SoSFVec3f rotationRef;
46  SoSFFloat length;
48  SoSFFloat minDistance;
50  SoSFBool displayHead;
51 
52 protected:
53 
55  ~SoArrow() override;
56 
57 
58 private:
59 
62  SoSeparator *_root;
64  SoCalculator *_calcStiel, *_rotationCalc;
65 
67  SoCone* _spitzeSpitz;
69  SoCylinder* _spitzeStumpf;
70 
71  // ##### Die Funktionen #####
73  void initSoArrow();
74 
76  void displayHeadChangedCB(SoField*);
77 };
78 
79 #endif
#define SOUTILS_EXPORT
System dependent includes. Disables some compiler/linker warnings.
Definition: SoUtilsSystem.h:31
generates an arrow the arrow has a position and a reference point, from where he points at
Definition: SoArrow.h:27
SoSFVec3f rotationRef
von wo der Pfeil gedreht wird (wie beim Wetterhahn)
Definition: SoArrow.h:44
static void initClass()
must be called first to initialize the class in OpenInventor
SoSFFloat length
length of the arrow - default value is 10
Definition: SoArrow.h:46
SoArrow()
Constructor.
SoSFFloat minDistance
beneath this length teh arrow has no shaft
Definition: SoArrow.h:48
SoSFBool displayHead
display an arrowhead (true by default) or a cylinder
Definition: SoArrow.h:50
SoSFVec3f position
Position der Pfeilspitze.
Definition: SoArrow.h:42
~SoArrow() override
Destructor.