VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtMultiLineModel.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2022 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 
29  virtual ~DtMultiLineModel();
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 
73  virtual void setLineOverlayGroup(int line, int group);
74 
76  virtual void addLineModel();
77 
79  virtual void removeLineModel(int);
80 
82  virtual void removeAllLineModels();
83 
86  virtual void setLineModels(int numberOfLines);
87 
89  virtual void setVisible(int line, bool);
90 
92  virtual void setPosition(int line, int vtx, const DtVector&);
93 
94  protected:
97  virtual void addToScene( const DtUniqueID& sceneObjectId, DtModelSetId modelSet,
98  int visualizerType );
99 
101  virtual void removeFromScene();
102 
106  virtual void setIsSupportModel(bool isSupport);
107 
109  virtual DtSegmentedLineModel* createOverlayLineModel() = 0;
110  virtual DtSegmentedLineModel* createGeometryLineModel() = 0;
111 
112  protected:
113  typedef std::vector<DtSegmentedLineModel*> LineModels;
114 
116 
117  struct Segment
118  {
120  : width(1.)
121  , stipplePattern(0xFFFFFFFF)
122  {
123  color[0] = color[1] = color[2] = color[3] = 1.0f;
124  }
125 
126  float width;
128  float color[4];
129  };
130 
131  typedef boost::unordered_map<int, Segment> Segments;
134  };
135 }
136 
bool putOnOverlay() const
Definition: DtMultiLineModel.h:45
Segments mySegments
Definition: DtMultiLineModel.h:132
Definition: DtMultiLineModel.h:117
boost::unordered_map< int, Segment > Segments
Definition: DtMultiLineModel.h:131
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
bool myPutOnOverlay
Definition: DtMultiLineModel.h:133
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
Contains makVrv::DtModel class.
int stipplePattern
Definition: DtMultiLineModel.h:127
Segment()
Definition: DtMultiLineModel.h:119
A model which owns a single model instance. A DtModel is a managing container for a single DtModelIns...
Definition: DtModel.h:56
float width
Definition: DtMultiLineModel.h:126
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
Implementation of class that will manage a collection of line models.
Definition: DtMultiLineModel.h:22
DtModelSetId
Definition: DtModelSetEnums.h:19
std::vector< DtSegmentedLineModel * > LineModels
Definition: DtMultiLineModel.h:113
LineModels myLineModels
Definition: DtMultiLineModel.h:115
This class is a virtual class that all segmented line models must implement.
Definition: DtSegmentedLineModel.h:20
Contains DLL export macros.

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)