VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOsgWindowLineGroupInstance.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
15 
17 
18 #include <osg/Vec2>
19 #include <osg/Matrix>
20 
21 namespace makVrv
22 {
23  class DtDe;
24  class DtFilledPolygon;
25  class DtSegmentedLine;
26 
35  {
36  public:
39 
42 
44  struct Line
45  {
46  unsigned int stipplePattern;
47  float lineWidth;
48  osg::Vec2 vertex0;
49  osg::Vec2 vertex1;
50  };
51 
54  virtual void setLineCount( unsigned int count );
55 
58  virtual void addLine( float lineWidth, unsigned int stipplePattern,
59  float xVertex0, float yVertex0, float xVertex1, float yVertex1 );
60 
66  virtual void updateLine( unsigned int index, float lineWidth, unsigned int stipplePattern,
67  float xVertex0, float yVertex0, float xVertex1, float yVertex1 );
68 
70  virtual void setVisible( bool isVisible );
71 
76  virtual void setChannelOverlay( const std::string& displayName,
77  const std::string& windowName, const std::string& channelName ) override;
78  protected:
82  virtual void updateGeometry();
83 
85  virtual void deleteAllLines();
86 
88  virtual DtSegmentedLine* createAdditionalLine();
89 
90  protected:
91 
92  struct LineStruct
93  {
96  };
97  std::vector< LineStruct > myLines;
98 
99  unsigned int myLineCount;
100  };
101 
104  {
105  public:
108 
111 
113  static DtOsgWindowLineGroupInstanceCreator& instance( DtDe& de );
114 
116  static void registerInstance( DtDe& de, DtOsgWindowLineGroupInstanceCreator* instance );
117 
119  virtual DtOsgWindowLineGroupInstance* create();
120 
121  protected:
123  };
124 }
unsigned int myLineCount
Definition: DtOsgWindowLineGroupInstance.h:99
float lineWidth
Definition: DtOsgWindowLineGroupInstance.h:47
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
DtDe & myDe
Definition: DtOsgWindowLineGroupInstance.h:122
OSG Implementation of a DtWindowLineInstance. Uses a vrvGraphics DtSegmentedLine to draw a 2D Line...
Definition: DtOsgWindowLineInstance.h:33
Creator for DtOsgWindowLineInstance.
Definition: DtOsgWindowLineGroupInstance.h:103
Contains makVrv::DtOsgWindowLineInstance class.
Contains makVrv::DtVirtualBaseClass class.
osg::Vec2 vertex0
Definition: DtOsgWindowLineGroupInstance.h:48
Definition: DtOsgWindowLineGroupInstance.h:92
osg::Vec2 vertex1
Definition: DtOsgWindowLineGroupInstance.h:49
This class updates vertices for each line added via addLine. They are stored in a vector of LineStruc...
Definition: DtOsgWindowLineGroupInstance.h:34
unsigned int stipplePattern
Definition: DtOsgWindowLineGroupInstance.h:46
Contains makVrv::DtOsgWindowLineGroup class.
std::vector< LineStruct > myLines
Definition: DtOsgWindowLineGroupInstance.h:97
Container for lines.
Definition: DtOsgWindowLineGroupInstance.h:44
DtSegmentedLine * segmentedLine
Definition: DtOsgWindowLineGroupInstance.h:95
Contains DLL export macros.
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:72
A convex polygon drawn using lines.
Definition: DtSegmentedLine.h:28
Line lineInfo
Definition: DtOsgWindowLineGroupInstance.h:94

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)