VR-Forces 4.6.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtMergeDuplicateTextureVisitor.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2008 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtMergeDuplicateTextureVisitor.h,v $ $Revision: 1.7 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #pragma once
14 
17 
18 #include <osg/NodeVisitor>
19 namespace makVrv
20 {
21  class DtTextureCollection;
22 
26  class DT_DLL_VRVOSG DtMergeDuplicateTextureVisitor : public osg::NodeVisitor
27  {
28  public:
30 
33  TextureMap& textureMap,
34  const std::string& parentFilePath,
35  bool replaceTexturesWithLoadOnDemandImages,
36  bool compressTextures,
37  bool followProxyNodes);
38 
40  virtual void apply(osg::Geode& geode);
41 
43  virtual void apply(osg::Node& node);
44 
46  virtual void apply(osg::StateSet& stateset);
47 
49  virtual void apply(osg::ProxyNode& node);
50 
52  void clearTextures();
53 
54 
55  protected:
56 
57  //Attempt to find a duplicate texture. It looks up the texture
58  //Via the image in the map and returns a valid texture point to a new
59  //Texture object to replace the original with.
60  //If no duplicate texture is found the returned texture pointer is NULL.
61  osg::ref_ptr<osg::Texture> findDuplicateTexture(osg::Texture* texture);
62 
63 
64  protected:
65  std::string myFilePath;
70  };
71 }

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)