VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtLineStyleGeometryManager.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
13 
14 #pragma once
15 
16 #include <vrvCore/vrvCore.h>
19 #include <boost/unordered_map.hpp>
20 #include <boost/function.hpp>
21 
22 #include <matrix/vlVector.h>
23 
24 namespace makVrv
25 {
26  class DtDe;
27  class DtCoordinateSystem;
28 
31  {
32  public:
34  typedef boost::function<bool (const DtCoordinateSystem&,
35  const DtVector&, const DtVector&, double,
36  std::vector<DtVector>&, std::vector<DtVector>&, const DtVector& offsetFromPoint)> ArrowCreateFunction;
37 
39  typedef boost::function<bool (const DtCoordinateSystem&,
40  const std::vector<DtVector>&, double, std::vector<DtVector>&,
41  std::vector<DtVector>&, std::vector<int>&, const DtVector& offsetFromPoint)> LineCreateFunction;
42 
44  typedef boost::unordered_map<int, LineCreateFunction> LineStyleGeometries;
45 
47  typedef boost::unordered_map<int, ArrowCreateFunction> ArrowStyleGeometries;
48 
49  public:
52 
54  virtual ~DtLineStyleGeometryManager();
55 
58  static DtLineStyleGeometryManager& instance(DtDe& de);
59 
61  static void registerInstance(DtDe& de, DtLineStyleGeometryManager* anInstance);
62 
65  virtual void add2DLineStyle(vrvTacticalGraphicUtilities::LineStyle, LineCreateFunction);
66 
69  virtual void add3DLineStyle(vrvTacticalGraphicUtilities::LineStyle, LineCreateFunction);
70 
73  virtual void add2DArrowStyle(vrvTacticalGraphicUtilities::ArrowStyle, ArrowCreateFunction);
74 
77  virtual void add3DArrowStyle(vrvTacticalGraphicUtilities::ArrowStyle, ArrowCreateFunction);
78 
79  // @{
91 
93  virtual bool create2DLineStyle(vrvTacticalGraphicUtilities::LineStyle,
94  const std::vector<DtVector>& linePoints, double size,
95  std::vector<DtVector>& result3DPositions, std::vector<DtVector>& resultOffsetPositions,
96  std::vector<int>& segmentsToErase, const DtVector& offsetFromPoint = DtVector::zero()) const;
97 
99  virtual bool create3DLineStyle(vrvTacticalGraphicUtilities::LineStyle,
100  const std::vector<DtVector>& linePoints, double size,
101  std::vector<DtVector>& result3DPositions, std::vector<DtVector>& resultOffsetPositions,
102  std::vector<int>& segmentsToErase, const DtVector& offsetFromPoint = DtVector::zero()) const;
103  // @}
104 
105  // @{
117 
119  virtual bool create2DArrowStyle(vrvTacticalGraphicUtilities::ArrowStyle,
120  const DtVector& start, const DtVector& end, double arrowSize,
121  std::vector<DtVector>& result3DPositions, std::vector<DtVector>& resultOffsetPositions,
122  const DtVector& offsetFromPoint = DtVector::zero()) const;
123 
125  virtual bool create3DArrowStyle(vrvTacticalGraphicUtilities::ArrowStyle,
126  const DtVector& start, const DtVector& end, double arrowSize,
127  std::vector<DtVector>& result3DPositions, std::vector<DtVector>& resultOffsetPositions,
128  const DtVector& offsetFromPoint = DtVector::zero()) const;
129  // @}
130 
131  protected:
134 
137 
138  protected:
141 
144 
146  };
147 }

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)