VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtCdbEffectTextureUtils.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2017 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #include <vrvOsg/vrvOsg.h>
11 #include <string>
12 #include <map>
13 #include <vector>
14 
15 namespace osg
16 {
17  class Texture;
18 }
19 
20 namespace makVrv
21 {
23  {
24  //The bump map and normal map is the same in CDB, they are both tangent-space normal map
36  };
37 
39  {
41  bool isEffectTexture() const;
43  std::string effectTextureName;
44  };
45 
50  {
51  public:
56  DtCdbEffectTextureCode(int CS1, int CS2Min, int CS2Max);
57 
64  DtCdbEffectTextureCode(const std::string& effectSuffix);
65 
67  int CS1();
68 
70  int CS2Min();
71 
73  int CS2Max();
74 
76  bool isSupportedbyCdb();
77 
80  const std::string& effectTextureSuffix() const;
81 
85  bool match(const std::string& texName) const;
86  private:
87  int myCS1;
88  int myCS2Min;
89  int myCS2Max;
91  std::string myEffectTextureSuffix;
92  };
93 
95  {
96  public:
97  //check if the texture matches the CDBEffectTextureCode
98  static DtCdbEffectTextureTuple isEffectTexture(const osg::Texture* tex);
99 
100  static DtCdbEffectTextureTuple isEffectTexture(const std::string & textureFileName);
101 
102  private:
103  //EffectTextureType-->a list of the cdb effect texture code for backwards compatibility
104  typedef std::map<DtCdbEffectTextureType, std::vector<DtCdbEffectTextureCode> > DtCdbEffectTextureTypeCodeMap;
106  static DtCdbEffectTextureTypeCodeMap initEffectTextureTypeCodeMap();
107  };
108 }

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)