VR-Forces 4.7 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
vrvOsg
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
{
22
enum
DtCdbEffectTextureType
23
{
24
//The bump map and normal map is the same in CDB, they are both tangent-space normal map
25
CDB_ETT_NORMAL_MAP
,
26
CDB_ETT_NIGHT_MAP
,
27
CDB_ETT_LIGHT_MAP
,
28
CDB_ETT_CONTAMINANT_MAP
,
29
CDB_ETT_SKIDMARK_MAP
,
30
CDB_ETT_DETAIL_MAP
,
31
CDB_ETT_SPC_MAP
,
32
CDB_ETT_AO_MAP
,
33
CDB_ETT_CONFIGURABLE_MAP
,
34
CDB_ETT_UNSUPPORTED_MAP
,
35
CDB_ETT_INVALID
36
};
37
38
struct
DT_DLL_VRVOSG
DtCdbEffectTextureTuple
39
{
40
DtCdbEffectTextureTuple
();
41
bool
isEffectTexture()
const
;
42
DtCdbEffectTextureType
effectTextureType
;
43
std::string
effectTextureName
;
44
};
45
49
class
DtCdbEffectTextureCode
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
;
90
bool
myIsSupportedByCdb
;
91
std::string
myEffectTextureSuffix
;
92
};
93
94
class
DT_DLL_VRVOSG
DtCdbEffectTextureUtils
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
;
105
static
const
DtCdbEffectTextureTypeCodeMap
myEffectTextureTypeCodeMap
;
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
)