CFx SDK Documentation  2022 SP0
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
const OdTrVisId kTrVisNullId
Definition: TrVisDefs.h:116
FIRSTDLL_EXPORT_STATIC static const OdString kEmpty
Definition: OdString.h:98
enum OdTrVisMaterialDef::WrapType m_uWrap
float m_shadingEmissionColor[3]
float m_shadingAmbientColor[3]
OdTrVisTextureId m_textureId
enum OdTrVisMaterialDef::WrapType m_vWrap
float m_shadingSpecularColor[3]
float m_shadingDiffuseColor[3]