VR-Forces 4.1.1 Class Documentation
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/vrvOsg.h>
16 #include <vrvOsg/DtOsgRibbon.h>
17 
18 namespace osg
19 {
20  class DrawElementsUInt;
21  class Texture;
22 }
23 
24 namespace makVrv
25 {
31  : public DtOsgRibbon
32  {
33  public:
35  DtOsgDecalRibbon(float segmentSpacing,
36  const osg::Vec4& color, osg::Texture* tex, float maxLength = 2000);
37 
40  virtual void setTextureRepeat(float textureRepeat);
41 
42  protected:
44  virtual ~DtOsgDecalRibbon();
45 
47  virtual void addParticle(const osg::Vec3d & left, const osg::Vec3d & right,
48  double simTime);
49 
51  virtual float currentSegmentLength();
52 
54  virtual void extendCurrentSegment(osg::Vec3d const& left,
55  osg::Vec3d const& right, double simTime);
56 
58  virtual osg::Drawable* getDrawable();
59 
61  virtual int particleIndexAtOffset(int offset);
62 
64  virtual void rotateDrawableIndices(int amount);
65 
67  virtual osg::Vec2 getTextureCoordinateFor(int pointIndex, float vScale);
68 
70  virtual osg::Geode* createGeode();
71 
72  private:
73  osg::ref_ptr<osg::Vec3Array> myPoints;
74  osg::ref_ptr<osg::Vec2Array> myTextureCoordinates;
75  osg::ref_ptr<osg::DrawElementsUInt> myRibbon;
76  osg::ref_ptr<osg::Geometry> myGeometry;
77  osg::ref_ptr<osg::Texture> myTexture;
78 
80  std::string myTextureFilename;
83  };
84 }
85 

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)