VR-Forces 4.2 Class Documentation
pathDataOsgObjects.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2011 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
6 #pragma once
7 
9 #include "kyruntime.h"
10 #include "matrix/vlVector.h"
11 #include <osg/Geode>
12 #include <osg/Geometry>
13 #include <deque>
14 #include "osg/LOD"
15 #include <string>
16 
20 
21 namespace BHAVE
22 {
24  {
27  };
28 
33  {
34  public:
35  DtBhaveOsgGeometry(bool transparent = false);
36  virtual ~DtBhaveOsgGeometry();
37 
39  virtual bool pushTriangle(const DtVector&, const DtVector&, const DtVector&, const Kaim::VisualColor&);
40 
42  virtual osg::Geometry* geometry() const;
43 
45  virtual bool pushLine(const DtVector&, const DtVector&, const Kaim::VisualColor&);
46  protected:
49  virtual void setTransparency(const Kaim::VisualColor&);
50 
51  osg::Geometry* myGeometry;
52  osg::Vec3Array* myVertexArray;
53  osg::Vec4Array* myColorArray;
54  unsigned int myArrayIndex;
56  };
57 
61  {
62  public:
64  virtual ~DtBhaveOsgGeode();
65 
67  virtual osg::Geode* geode();
68 
70  virtual void addTriangle(const DtVector&, const DtVector&, const DtVector&, const Kaim::VisualColor&);
71 
73  virtual void addLine(const DtVector&, const DtVector&, const Kaim::VisualColor&);
74  protected:
75  osg::Geode* myGeode;
76  std::deque<Kaim::VisualColor> myColorIndeces;
77  std::deque<DtBhaveOsgGeometry*> myGeometries;
79  };
80 
83  {
84  public:
85  DtBhaveOsgLOD();
86  virtual ~DtBhaveOsgLOD();
87 
89  virtual osg::LOD* lod();
90 
92  virtual void addGeode(DtBhaveOsgGeode* geode);
93 
95  virtual DtBhaveOsgGeode* lastAddedGeode();
96 
98  virtual void setVisibleRange(float min, float max);
99 
101  virtual void setName(const std::string& name);
102 
103  protected:
104  osg::LOD* myLOD;
105  std::deque<DtBhaveOsgGeode*> myGeodes;
108  };
109 }

Document ID: Generated on Sun Nov 24 19:49:21 EST 2013 from SVN revision 133924
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)