| | 1 | | // <copyright file="ObjMaterial.cs" company="Jérémy Ansel"> |
| | 2 | | // Copyright (c) 2017, 2019 Jérémy Ansel |
| | 3 | | // </copyright> |
| | 4 | | // <license> |
| | 5 | | // Licensed under the MIT license. See LICENSE.txt |
| | 6 | | // </license> |
| | 7 | |
|
| | 8 | | namespace JeremyAnsel.Media.WavefrontObj |
| | 9 | | { |
| | 10 | | [System.Diagnostics.DebuggerDisplay("Material:{Name}")] |
| | 11 | | public class ObjMaterial |
| | 12 | | { |
| 1408 | 13 | | public ObjMaterial() |
| | 14 | | { |
| 1408 | 15 | | this.ReflectionMap = new ObjMaterialReflectionMap(); |
| | 16 | |
|
| 1408 | 17 | | this.IlluminationModel = 2; |
| 1408 | 18 | | this.DissolveFactor = 1.0f; |
| 1408 | 19 | | this.Sharpness = 60; |
| 1408 | 20 | | this.OpticalDensity = 1.0f; |
| 1408 | 21 | | } |
| | 22 | |
|
| | 23 | | public ObjMaterial(string? name) |
| 300 | 24 | | : this() |
| | 25 | | { |
| 300 | 26 | | this.Name = name; |
| 300 | 27 | | } |
| | 28 | |
|
| 2364 | 29 | | public string? Name { get; set; } |
| | 30 | |
|
| 572 | 31 | | public ObjMaterialColor? AmbientColor { get; set; } |
| | 32 | |
|
| 508 | 33 | | public ObjMaterialColor? DiffuseColor { get; set; } |
| | 34 | |
|
| 508 | 35 | | public ObjMaterialColor? EmissiveColor { get; set; } |
| | 36 | |
|
| 508 | 37 | | public ObjMaterialColor? SpecularColor { get; set; } |
| | 38 | |
|
| 508 | 39 | | public ObjMaterialColor? TransmissionColor { get; set; } |
| | 40 | |
|
| 1724 | 41 | | public int IlluminationModel { get; set; } |
| | 42 | |
|
| 1736 | 43 | | public float DissolveFactor { get; set; } |
| | 44 | |
|
| 316 | 45 | | public bool IsHaloDissolve { get; set; } |
| | 46 | |
|
| 312 | 47 | | public float SpecularExponent { get; set; } |
| | 48 | |
|
| 1724 | 49 | | public int Sharpness { get; set; } |
| | 50 | |
|
| 1724 | 51 | | public float OpticalDensity { get; set; } |
| | 52 | |
|
| 324 | 53 | | public bool IsAntiAliasingEnabled { get; set; } |
| | 54 | |
|
| 1084 | 55 | | public ObjMaterialMap? AmbientMap { get; set; } |
| | 56 | |
|
| 368 | 57 | | public ObjMaterialMap? DiffuseMap { get; set; } |
| | 58 | |
|
| 368 | 59 | | public ObjMaterialMap? EmissiveMap { get; set; } |
| | 60 | |
|
| 368 | 61 | | public ObjMaterialMap? SpecularMap { get; set; } |
| | 62 | |
|
| 368 | 63 | | public ObjMaterialMap? SpecularExponentMap { get; set; } |
| | 64 | |
|
| 368 | 65 | | public ObjMaterialMap? DissolveMap { get; set; } |
| | 66 | |
|
| 344 | 67 | | public ObjMaterialMap? DecalMap { get; set; } |
| | 68 | |
|
| 344 | 69 | | public ObjMaterialMap? DispMap { get; set; } |
| | 70 | |
|
| 320 | 71 | | public ObjMaterialMap? BumpMap { get; set; } |
| | 72 | |
|
| 3816 | 73 | | public ObjMaterialReflectionMap ReflectionMap { get; private set; } |
| | 74 | |
|
| | 75 | | /// <summary> |
| | 76 | | /// PBR Extension: Pr |
| | 77 | | /// </summary> |
| 316 | 78 | | public float Roughness { get; set; } |
| | 79 | |
|
| | 80 | | /// <summary> |
| | 81 | | /// PBR Extension: map_Pr |
| | 82 | | /// </summary> |
| 368 | 83 | | public ObjMaterialMap? RoughnessMap { get; set; } |
| | 84 | |
|
| | 85 | | /// <summary> |
| | 86 | | /// PBR Extension: Pm |
| | 87 | | /// </summary> |
| 316 | 88 | | public float Metallic { get; set; } |
| | 89 | |
|
| | 90 | | /// <summary> |
| | 91 | | /// PBR Extension: map_Pm |
| | 92 | | /// </summary> |
| 368 | 93 | | public ObjMaterialMap? MetallicMap { get; set; } |
| | 94 | |
|
| | 95 | | /// <summary> |
| | 96 | | /// PBR Extension: Ps |
| | 97 | | /// </summary> |
| 316 | 98 | | public float Sheen { get; set; } |
| | 99 | |
|
| | 100 | | /// <summary> |
| | 101 | | /// PBR Extension: map_Ps |
| | 102 | | /// </summary> |
| 368 | 103 | | public ObjMaterialMap? SheenMap { get; set; } |
| | 104 | |
|
| | 105 | | /// <summary> |
| | 106 | | /// PBR Extension: Pc |
| | 107 | | /// </summary> |
| 316 | 108 | | public float ClearCoatThickness { get; set; } |
| | 109 | |
|
| | 110 | | /// <summary> |
| | 111 | | /// PBR Extension: Pcr |
| | 112 | | /// </summary> |
| 316 | 113 | | public float ClearCoatRoughness { get; set; } |
| | 114 | |
|
| | 115 | | /// <summary> |
| | 116 | | /// PBR Extension: aniso |
| | 117 | | /// </summary> |
| 316 | 118 | | public float Anisotropy { get; set; } |
| | 119 | |
|
| | 120 | | /// <summary> |
| | 121 | | /// PBR Extension: anisor |
| | 122 | | /// </summary> |
| 316 | 123 | | public float AnisotropyRotation { get; set; } |
| | 124 | |
|
| | 125 | | /// <summary> |
| | 126 | | /// PBR Extension: norm |
| | 127 | | /// </summary> |
| 368 | 128 | | public ObjMaterialMap? Norm { get; set; } |
| | 129 | | } |
| | 130 | | } |