VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtTritonHeightMapManager.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <osg/Camera>
13 #include <osg/Drawable>
14 #include <osg/Texture2D>
15 
17 
18 namespace makVrv
19 {
20  class DtTritonDrawable;
21  class DtDe;
22 
26  {
27  public:
29 
30  virtual ~DtTritonHeightMapManager();
31 
33  void setupHeightMap( void );
34 
36  void setHeightMapResolution(float resolution);
37 
39  float getHeightMapResolution() const;
40 
43  void setHeightMapTextureSize(int pixels);
44 
46  int heightMapTextureSize() const;
47 
50  bool updateHeightCamera( unsigned int frameNum,
51  const osg::Vec3& currentPosition, bool isGeocentric );
52 
54  void setHeightCameraAttachment(bool enabled);
55 
57  const osg::Matrix& getHeightMapMatrix()
58  {
59  return myHeightMapMatrix;
60  }
61 
63  const osg::ref_ptr<osg::Texture2D> getHeightMapTexture()
64  {
65  return myHeightMap;
66  }
67 
69  void forceUpdate()
70  {
71  myForceUpdate = true;
72  }
73 
74  protected:
75 
76  void cleanup( );
77 
79  unsigned int myHeightUpdateFrame;
82  float myResolution;
85 
86  osg::ref_ptr<osg::Texture2D> myHeightMap, myDepthTexture;
87  osg::Matrix myHeightMapMatrix;
89  osg::ref_ptr<osg::Camera> myHeightCamera;
90 
92 
94 
96  };
97 }

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)