VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtEffectTextureUtils.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2017 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
15 
16 #include <osg/ExtendedMaterial>
17 
18 #include <string>
19 
20 namespace makVrv
21 {
23  {
24  public:
26  static bool isEffectTexture(const std::string& texName, const std::string& effectTypeCode);
27 
28 
30  static bool isEffectTexture(const osg::Texture* tex, const std::string& texName, const std::string& effectTypeCode);
31 
32  // get the name of the texture without path, extension,
33  // underScore(represent the original extension for meif texture)
34  // a/b/c_png.meif => c
35  // a.rgb=>a
36  static std::string getTextureNameLessExtension(const std::string& baseFileName);
37 
38  // find the extended name for a texture file.
39  static std::string getExtendedFileName(const std::string& baseFileName, const std::string& effectTypeCode);
40 
41  // get the effect texture type given the extended material type
42  static DtEffectTextureType effectTextureTypeFrom(osg::ExtendedMaterial::EffectTextureLayer extendedMaterialLayer);
43 
44  // Given the file name of a base texture, populate the output
45  // vector with possible file names for corresponding effect textures.
46  static void getPossibleEffectTextureFileNames(const std::string& baseFileName, std::vector<std::string>& output, const std::string& effectTypeCode);
47 
49  static std::string toString(DtEffectTextureType effectTextureType);
50 
52  static std::string getTextureArrayPattern(const std::string& effectUnitName);
53  static std::string getTextureArrayReplacement(const std::string& effectUnitName);
54 
55  //Check if this effect texture is supported by the flt extended material by it's type
56  static bool isSupportedByExtendedMaterial(int effectTextureType);
57 
60  static bool effectTextureInstalled(const std::string& baseTextureName, const osg::StateSet* stateSet, const std::string& effectTypeCode);
61 
62  // find the file path for a texture. do set the name if its empty
63  static std::string getTextureFilePathAndSetNameIfNotSet(const osg::Texture* texture, bool doSetName);
64 
65  static bool isRemoteTexture(const std::string& texturePath);
66 
67  };
68 }

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)