MeVisLab Toolbox Reference
EndpointDecorator.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2015, 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 #include <SoCSOSystem.h>
15 #include <mlTypeDefs.h>
16 #include <Inventor/SbLinear.h>
17 #include <SoCSODefines.h>
18 
20 {
22  ARROW = 1,
24 };
25 
27 {
33 };
34 
36 {
37  public:
38  EndpointDecorator(MLfloat pixelSize, int decorationType);
39 
40  void draw(const SbVec2f& origin, const SbVec2f& target);
41 
42  protected:
43  void drawArrowHead(const SbVec2f &origin, const SbVec2f &target);
44  void drawPerpendicularEnd(const SbVec2f &origin, const SbVec2f &target);
45 
48 };
DecorationLineStyleOverwriteModes
@ OVERWRITE_LINE_STYLE_SHORT_DASHED
@ OVERWRITE_LINE_STYLE_SOLID
@ OVERWRITE_LINE_STYLE_DOTTED
@ NO_OVERWRITE
@ OVERWRITE_LINE_STYLE_DASHED
DecorationTypes
@ ARROW
Renders an arrow tip at the endpoint.
@ NO_DECORATION
No decoration is rendered.
@ PERPENDICULAR
Renders a perpendicular line at the endpoint.
const unsigned short PATH_POINTS_PATTERN_SOLID
Definition: SoCSODefines.h:309
const unsigned short PATH_POINTS_PATTERN_SHORT_DASHED
Definition: SoCSODefines.h:312
const unsigned short PATH_POINTS_PATTERN_DASHED
Line pattern for a dashed line.
Definition: SoCSODefines.h:310
const unsigned short PATH_POINTS_PATTERN_DOTTED
Line pattern for a dotted line.
Definition: SoCSODefines.h:311
void drawPerpendicularEnd(const SbVec2f &origin, const SbVec2f &target)
void drawArrowHead(const SbVec2f &origin, const SbVec2f &target)
EndpointDecorator(MLfloat pixelSize, int decorationType)
void draw(const SbVec2f &origin, const SbVec2f &target)
float MLfloat
Definition: mlTypeDefs.h:207
boost::graph_traits< ml_graph_ptr >::vertex_descriptor target(graph_traits< ml_graph_ptr >::edge_descriptor e, const ml_graph_ptr)
Returns the vertex descriptor for v of the edge (u,v) represented by e.