VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtMultiLineModel.h
Go to the documentation of this file.
1 // /******************************************************************************
2 // ** Copyright (c) 2012 MAK Technologies, Inc.
3 // ** All rights reserved.
4 // ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/vrvCore.h>
13 #include <vrvCore/DtModel.h>
14 #include <boost/unordered_map.hpp>
15 
16 namespace makVrv
17 {
18  class DtSegmentedLineModel;
19 
23  {
24  public:
27 
30 
32  virtual void setSegmentColor(unsigned int segmentIndex,
33  float r, float g, float b, float a);
34 
37  virtual void setSegmentStipplePattern(unsigned int segmentIndex,
38  unsigned int stipplePattern);
39 
41  virtual void setSegmentWidth(unsigned int segmentIndex, double width);
42 
44  virtual void setPutOnOverlay(bool enabled);
45  bool putOnOverlay() const
46  {
47  return myPutOnOverlay;
48  }
49 
51  virtual void setVisible(bool);
52 
54 
56  virtual void setSegmentColor(int line, unsigned int segmentIndex,
57  float r, float g, float b, float a);
58 
61  virtual void setSegmentStipplePattern(int line, unsigned int segmentIndex,
62  unsigned int stipplePattern);
63 
65  virtual void setSegmentWidth(int line, unsigned int segmentIndex, double width);
66 
68  virtual void addLineModel();
69 
71  virtual void removeLineModel(int);
72 
74  virtual void removeAllLineModels();
75 
78  virtual void setLineModels(int numberOfLines);
79 
81  virtual void setVisible(int line, bool);
82 
84  virtual void setPosition(int line, int vtx, const DtVector&);
85 
86  protected:
89  virtual void addToScene( const DtUniqueID& sceneObjectId, int modelSet,
90  int visualizerType );
91 
93  virtual void removeFromScene();
94 
98  virtual void setIsSupportModel(bool isSupport);
99 
101  virtual DtSegmentedLineModel* createOverlayLineModel() = 0;
102  virtual DtSegmentedLineModel* createGeometryLineModel() = 0;
103 
104  protected:
105  typedef std::vector<DtSegmentedLineModel*> LineModels;
106 
108 
109  struct Segment
110  {
112  : width(1.)
113  , stipplePattern(0xFFFFFFFF)
114  {
115  color[0] = color[1] = color[2] = color[3] = 1.0f;
116  }
117 
118  float width;
120  float color[4];
121  };
122 
123  typedef boost::unordered_map<int, Segment> Segments;
126  };
127 }
128 

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)