| | | 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 | | { |
| | 1888 | 13 | | public ObjMaterial() |
| | | 14 | | { |
| | 1888 | 15 | | this.ReflectionMap = new ObjMaterialReflectionMap(); |
| | | 16 | | |
| | 1888 | 17 | | this.IlluminationModel = 2; |
| | 1888 | 18 | | this.DissolveFactor = 1.0f; |
| | 1888 | 19 | | this.Sharpness = 60; |
| | 1888 | 20 | | this.OpticalDensity = 1.0f; |
| | 1888 | 21 | | } |
| | | 22 | | |
| | | 23 | | public ObjMaterial(string? name) |
| | 300 | 24 | | : this() |
| | | 25 | | { |
| | 300 | 26 | | this.Name = name; |
| | 300 | 27 | | } |
| | | 28 | | |
| | 3164 | 29 | | public string? Name { get; set; } |
| | | 30 | | |
| | 396 | 31 | | public ObjMaterialColor? AmbientColor { get; set; } |
| | | 32 | | |
| | 396 | 33 | | public ObjMaterialColor? DiffuseColor { get; set; } |
| | | 34 | | |
| | 396 | 35 | | public ObjMaterialColor? EmissiveColor { get; set; } |
| | | 36 | | |
| | 396 | 37 | | public ObjMaterialColor? SpecularColor { get; set; } |
| | | 38 | | |
| | 396 | 39 | | public ObjMaterialColor? TransmissionColor { get; set; } |
| | | 40 | | |
| | 2204 | 41 | | public int IlluminationModel { get; set; } |
| | | 42 | | |
| | 2216 | 43 | | public float DissolveFactor { get; set; } |
| | | 44 | | |
| | 316 | 45 | | public bool IsHaloDissolve { get; set; } |
| | | 46 | | |
| | 312 | 47 | | public float SpecularExponent { get; set; } |
| | | 48 | | |
| | 2204 | 49 | | public int Sharpness { get; set; } |
| | | 50 | | |
| | 2204 | 51 | | public float OpticalDensity { get; set; } |
| | | 52 | | |
| | 324 | 53 | | public bool IsAntiAliasingEnabled { get; set; } |
| | | 54 | | |
| | 2328 | 55 | | public ObjMaterialMap? AmbientMap { get; set; } |
| | | 56 | | |
| | 440 | 57 | | public ObjMaterialMap? DiffuseMap { get; set; } |
| | | 58 | | |
| | 440 | 59 | | public ObjMaterialMap? EmissiveMap { get; set; } |
| | | 60 | | |
| | 440 | 61 | | public ObjMaterialMap? SpecularMap { get; set; } |
| | | 62 | | |
| | 440 | 63 | | public ObjMaterialMap? SpecularExponentMap { get; set; } |
| | | 64 | | |
| | 440 | 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 | | |
| | 4296 | 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> |
| | 440 | 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> |
| | 440 | 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> |
| | 440 | 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> |
| | 440 | 128 | | public ObjMaterialMap? Norm { get; set; } |
| | | 129 | | } |
| | | 130 | | } |