VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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 
15 #include <vrvOsg/DtOsgFileCache.h>
16 #include <osg/NodeVisitor>
17 namespace makVrv
18 {
19  class DtOsgFileCache::TextureCollection;
20 
24  class DT_DLL_VRVOSG DtMergeDuplicateTextureVisitor : public osg::NodeVisitor
25  {
26  public:
28 
31  TextureMap& textureMap,
32  const std::string& parentFilePath,
33  bool replaceTexturesWithLoadOnDemandImages,
34  bool compressTextures,
35  bool followProxyNodes);
36 
38  virtual void apply(osg::Geode& geode);
39 
41  virtual void apply(osg::Node& node);
42 
44  virtual void apply(osg::StateSet& stateset);
45 
47  virtual void apply(osg::ProxyNode& node);
48 
50  void clearTextures();
51 
52 
53  protected:
54 
55  //Attempt to find a duplicate texture. It looks up the texture
56  //Via the image in the map and returns a valid texture point to a new
57  //Texture object to replace the original with.
58  //If no duplicate texture is found the returned texture pointer is NULL.
59  osg::ref_ptr<osg::Texture> findDuplicateTexture(osg::Texture* texture);
60 
61 
62  protected:
63  std::string myFilePath;
68  };
69 }

Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)