CFx SDK Documentation  2020SP3
TrVisMaterialDef.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, Open Design Alliance (the "Alliance").
3 // All rights reserved.
4 //
5 // This software and its documentation and related materials are owned by
6 // the Alliance. The software may only be incorporated into application
7 // programs owned by members of the Alliance, subject to a signed
8 // Membership Agreement and Supplemental Software License Agreement with the
9 // Alliance. The structure and organization of this software are the valuable
10 // trade secrets of the Alliance and its suppliers. The software is also
11 // protected by copyright law and international treaty provisions. Application
12 // programs incorporating this software must include the following statement
13 // with their copyright notices:
14 //
15 // This application incorporates Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 by Open Design Alliance.
18 // All rights reserved.
19 //
20 // By use of this software, its documentation or related materials, you
21 // acknowledge and accept the above terms.
23 // GLES2 device material definition
24 
25 #ifndef ODTRVISMATERIALDEF
26 #define ODTRVISMATERIALDEF
27 
28 #include "TD_PackPush.h"
29 
30 #include "TrVisTextureDef.h"
31 
36 {
37  // Ambient color components
38  float m_ambientColor[3];
39  // Ambient color components for shading in non-realistic modes
41  // Diffuse color components
42  float m_diffuseColor[3];
43  // Diffuse color components for shading in non-realistic modes
45  // Specular color components
46  float m_specularColor[3];
47  // Specular color components for shading in non-realistic modes
49  // Emission color components
50  float m_emissionColor[3];
51  // Emission color components for shading in non-realistic modes
53  // Factor to blend between material diffuse color and vertex color [0 - full material color, 1 - full vertex color]
55  // Factor to blend between material diffuse color and vertex color for shading in non-realistic modes
57  // Material transparency [0 - completely transparent, 1 - opaque]
59  // Material transparency for shading in non-realistic modes
61  // Specular color (shininnes) component
63  // Factor to blend between texture and diffuse color [0 - full diffuse color, 1 - full texture color]
65  // Texture ID
67  // Texture tiling method
68  enum WrapType
69  {
75 
76  // Setup default material defaults
77  void setDefault()
78  {
79  m_ambientColor[0] = m_ambientColor[1] = m_ambientColor[2] = 0.0f;
81  m_diffuseColor[0] = m_diffuseColor[1] = m_diffuseColor[2] = 0.0f;
87  m_blendFactor = 1.0f;
88  m_shadingBlendFactor = 1.0f;
89  m_opacityLevel = 1.0f;
90  m_shadingOpacityLevel = 1.0f;
91  m_specularPower = 50.0f;
92  m_textureBlend = 0.0f;
96  m_bDefault = true;
97  }
98  // Material name
100  // Material "Default" flag
102 };
103 
104 #include "TD_PackPop.h"
105 
106 #endif // ODTRVISMATERIALDEF
OdTrVisMaterialDef::m_vWrap
enum OdTrVisMaterialDef::WrapType m_vWrap
OdTrVisMaterialDef::m_emissionColor
float m_emissionColor[3]
Definition: TrVisMaterialDef.h:50
OdString
Definition: OdString.h:95
OdTrVisMaterialDef::m_uWrap
enum OdTrVisMaterialDef::WrapType m_uWrap
OdTrVisMaterialDef::kWrapRepeat
@ kWrapRepeat
Definition: TrVisMaterialDef.h:70
OdTrVisMaterialDef::m_diffuseColor
float m_diffuseColor[3]
Definition: TrVisMaterialDef.h:42
OdTrVisMaterialDef::m_opacityLevel
float m_opacityLevel
Definition: TrVisMaterialDef.h:58
TD_PackPop.h
OdTrVisMaterialDef::m_shadingBlendFactor
float m_shadingBlendFactor
Definition: TrVisMaterialDef.h:56
OdTrVisMaterialDef::m_shadingDiffuseColor
float m_shadingDiffuseColor[3]
Definition: TrVisMaterialDef.h:44
OdTrVisMaterialDef::WrapType
WrapType
Definition: TrVisMaterialDef.h:69
OdTrVisMaterialDef::m_specularPower
float m_specularPower
Definition: TrVisMaterialDef.h:62
OdTrVisMaterialDef::m_shadingAmbientColor
float m_shadingAmbientColor[3]
Definition: TrVisMaterialDef.h:40
OdTrVisMaterialDef::setDefault
void setDefault()
Definition: TrVisMaterialDef.h:77
OdTrVisMaterialDef::m_shadingSpecularColor
float m_shadingSpecularColor[3]
Definition: TrVisMaterialDef.h:48
OdTrVisMaterialDef::m_bDefault
bool m_bDefault
Definition: TrVisMaterialDef.h:101
TrVisTextureDef.h
TD_PackPush.h
OdTrVisMaterialDef
Definition: TrVisMaterialDef.h:36
OdTrVisMaterialDef::kWrapClamp
@ kWrapClamp
Definition: TrVisMaterialDef.h:71
kTrVisNullId
const OdTrVisId kTrVisNullId
Definition: TrVisDefs.h:116
OdTrVisMaterialDef::m_blendFactor
float m_blendFactor
Definition: TrVisMaterialDef.h:54
OdTrVisMaterialDef::kWrapCrop
@ kWrapCrop
Definition: TrVisMaterialDef.h:72
OdTrVisMaterialDef::m_shadingOpacityLevel
float m_shadingOpacityLevel
Definition: TrVisMaterialDef.h:60
OdString::kEmpty
FIRSTDLL_EXPORT_STATIC static const OdString kEmpty
Definition: OdString.h:98
OdTrVisMaterialDef::m_specularColor
float m_specularColor[3]
Definition: TrVisMaterialDef.h:46
OdTrVisMaterialDef::m_name
OdString m_name
Definition: TrVisMaterialDef.h:99
OdTrVisMaterialDef::m_textureId
OdTrVisTextureId m_textureId
Definition: TrVisMaterialDef.h:66
OdTrVisMaterialDef::kWrapMirror
@ kWrapMirror
Definition: TrVisMaterialDef.h:73
OdTrVisMaterialDef::m_ambientColor
float m_ambientColor[3]
Definition: TrVisMaterialDef.h:38
OdTrVisMaterialDef::m_shadingEmissionColor
float m_shadingEmissionColor[3]
Definition: TrVisMaterialDef.h:52
OdTrVisMaterialDef::m_textureBlend
float m_textureBlend
Definition: TrVisMaterialDef.h:64
OdUInt64
Definition: Int64.h:137