VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtOsgDecalRibbon.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2008 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtOsgDecalRibbon.h,v $ $Revision: 1.13 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #pragma once
14 
15 #include <vrvOsg/DtOsgRibbon.h>
16 
17 namespace osg
18 {
19  class DrawElementsUInt;
20  class Texture;
21 }
22 
23 namespace makVrv
24 {
30  : public DtOsgRibbon
31  {
32  public:
34  DtOsgDecalRibbon(DtDe& de, float segmentSpacing,
35  const osg::Vec4& color, osg::Texture* tex, float maxLength = 2000);
36 
39  virtual void setTextureRepeat(float textureRepeat);
40 
41  protected:
43  virtual ~DtOsgDecalRibbon();
44 
46  virtual void addParticle(const osg::Vec3d & left, const osg::Vec3d & right,
47  double simTime);
48 
50  virtual float currentSegmentLength();
51 
53  virtual void extendCurrentSegment(osg::Vec3d const& left,
54  osg::Vec3d const& right, double simTime);
55 
57  virtual osg::Drawable* getDrawable();
58 
60  virtual int particleIndexAtOffset(int offset);
61 
63  virtual void rotateDrawableIndices(int amount);
64 
66  virtual osg::Vec2 getTextureCoordinateFor(int pointIndex, float vScale);
67 
69  virtual osg::Geode* createGeode();
70 
71  private:
72  osg::ref_ptr<osg::Vec3Array> myPoints;
73  osg::ref_ptr<osg::Vec2Array> myTextureCoordinates;
74  osg::ref_ptr<osg::DrawElementsUInt> myRibbon;
75  osg::ref_ptr<osg::Geometry> myGeometry;
76  osg::ref_ptr<osg::Texture> myTexture;
77 
79  std::string myTextureFilename;
82  };
83 }
84 

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)