VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOsgDecalRibbon.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/DtOsgRibbon.h>
13 
15 
16 namespace osg
17 {
18  class DrawElementsUInt;
19  class Texture;
20 }
21 
22 namespace makVrv
23 {
29  : public DtOsgRibbon
30  {
31 
32  public:
33 
35  virtual ~DtOsgDecalRibbon();
36 
37  protected:
39  DtOsgDecalRibbon(DtDe& de, float segmentSpacing,
40  const osg::Vec4& color, osg::Texture* tex, float maxLength);
41 
43 
44  private:
46  DtOsgDecalRibbon() = delete;
48  DtOsgDecalRibbon(const DtOsgDecalRibbon&) = delete;
50  DtOsgDecalRibbon &operator=(const DtOsgDecalRibbon&) = delete;
51 
52  public:
55  virtual void setTextureRepeat(float textureRepeat);
56 
57  protected:
59  virtual void addParticle(const osg::Vec3d & left, const osg::Vec3d & right,
60  double simTime) override;
61 
63  virtual float currentSegmentLength() override;
64 
68  virtual void cleanupOldSegments(double simTime) override;
69 
71  virtual void extendCurrentSegment(osg::Vec3d const& left,
72  osg::Vec3d const& right, double simTime) override;
73 
75  virtual osg::Drawable* getDrawable() override;
76 
78  virtual osg::Geode* createGeode() override;
79 
81  virtual int particleIndexAtOffset(int offset);
82 
84  virtual void rotateDrawableIndices(int amount);
85 
87  virtual osg::Vec2 getTextureCoordinateFor(int pointIndex, float vScale) const;
88 
89 
90  protected:
96 
98  std::string myTextureFilename;
101  };
102 
103  //
104  // Creator for DtOsgDecalRibbons
105  //
107  {
108  public:
109 
112 
114  virtual ~DtOsgDecalRibbonCreator();
115 
118  static DtOsgDecalRibbonCreator& instance(DtDe& de);
119 
122  static void registerInstance(DtDe& de, DtOsgDecalRibbonCreator* creator);
123 
125  virtual DtOsgDecalRibbon* create(DtDe& de, float segmentSpacing,
126  const osg::Vec4& color, osg::Texture* tex, float maxLength = 2000);
127  };
128 }
129 
Diagonal crossing liens.
Definition: DtTacticalGraphicUtilities.h:93
Definition: DtOsgDecalRibbon.h:106
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
bool myWrappingVertices
Definition: DtOsgDecalRibbon.h:97
Contains makVrv::DtVirtualBaseClass class.
std::string myTextureFilename
Definition: DtOsgDecalRibbon.h:98
osg::ref_ptr< osg::Geometry > myGeometry
Definition: DtOsgDecalRibbon.h:94
int myParticleIndex
Definition: DtOsgDecalRibbon.h:99
Base class for OSG ribbon implementations.
Definition: DtOsgRibbon.h:25
float myTextureRepeat
Definition: DtOsgDecalRibbon.h:100
osg::ref_ptr< osg::Vec2Array > myTextureCoordinates
Definition: DtOsgDecalRibbon.h:92
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:70
Base class for ribbons.
osg::ref_ptr< osg::Vec3Array > myPoints
Definition: DtOsgDecalRibbon.h:91
osg::ref_ptr< osg::DrawElementsUInt > myRibbon
Definition: DtOsgDecalRibbon.h:93
voidpf uLong offset
Definition: ioapi.h:42
OpenSceneGraph implementation of a textured ribbon Used to draw effects like tread tracks that follow...
Definition: DtOsgDecalRibbon.h:28
osg::ref_ptr< osg::Texture > myTexture
Definition: DtOsgDecalRibbon.h:95

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)