Explorar o código

Babylon Entities Cleanup

Clean up conversion syntax
MackeyK24 %!s(int64=8) %!d(string=hai) anos
pai
achega
d377983e0b

+ 2 - 2
Exporters/3ds Max/BabylonExport.Entities/BabylonAnimation.cs

@@ -47,8 +47,8 @@ namespace BabylonExport.Entities
 
         public BabylonAnimation()
         {
-            this.enableBlending = false;
-            this.blendingSpeed = 0.01f;
+            enableBlending = false;
+            blendingSpeed = 0.01f;
         }
     }
 }

+ 8 - 8
Exporters/3ds Max/BabylonExport.Entities/BabylonHDRCubeTexture.cs

@@ -25,18 +25,18 @@ namespace BabylonExport.Entities
 
         public BabylonHDRCubeTexture()
         {
-            this.SetCustomType("BABYLON.HDRCubeTexture");
-            this.size = 0;
-            this.isCube = true;
-            this.useInGammaSpace = false;
-            this.generateHarmonics = true;
-            this.usePMREMGenerator = false;
-            this.isBABYLONPreprocessed = false;
+            SetCustomType("BABYLON.HDRCubeTexture");
+            size = 0;
+            isCube = true;
+            useInGammaSpace = false;
+            generateHarmonics = true;
+            usePMREMGenerator = false;
+            isBABYLONPreprocessed = false;
         }
 
         public void SetCustomType(string type)
         {
-            this.customType = type;
+            customType = type;
         }
     }
 }

+ 28 - 28
Exporters/3ds Max/BabylonExport.Entities/BabylonPBRMaterial.cs

@@ -135,40 +135,40 @@ namespace BabylonExport.Entities
 
         public BabylonPBRMaterial() : base()
         {
-            this.SetCustomType("BABYLON.PBRMaterial");
-            this.directIntensity = 1.0f;
-            this.emissiveIntensity = 1.0f;
-            this.environmentIntensity = 1.0f;
-            this.specularIntensity = 1.0f;
-            this.cameraExposure = 1.0f;
-            this.cameraContrast = 1.0f;
-            this.indexOfRefraction = 0.66f;
-            this.twoSidedLighting = false;
-            this.maxSimultaneousLights = 4;
-            this.useRadianceOverAlpha = true;
-            this.useSpecularOverAlpha = true;
-            this.usePhysicalLightFalloff = true;
-            this.useEmissiveAsIllumination = false;
+            SetCustomType("BABYLON.PBRMaterial");
+            directIntensity = 1.0f;
+            emissiveIntensity = 1.0f;
+            environmentIntensity = 1.0f;
+            specularIntensity = 1.0f;
+            cameraExposure = 1.0f;
+            cameraContrast = 1.0f;
+            indexOfRefraction = 0.66f;
+            twoSidedLighting = false;
+            maxSimultaneousLights = 4;
+            useRadianceOverAlpha = true;
+            useSpecularOverAlpha = true;
+            usePhysicalLightFalloff = true;
+            useEmissiveAsIllumination = false;
 
             // Default Null Metallic Workflow
-            this.metallic = null;
-            this.roughness = null;
-            this.useRoughnessFromMetallicTextureAlpha = true;
-            this.useRoughnessFromMetallicTextureGreen = false;
-
-            this.microSurface = 0.9f;
-            this.useMicroSurfaceFromReflectivityMapAplha = false;
-
-            this.ambient = new[] { 0f, 0f, 0f };
-            this.albedo = new[] { 1f, 1f, 1f };
-            this.reflectivity = new[] { 1f, 1f, 1f };
-            this.reflection = new[] { 0.5f, 0.5f, 0.5f };
-            this.emissive = new[] { 0f, 0f, 0f };
+            metallic = null;
+            roughness = null;
+            useRoughnessFromMetallicTextureAlpha = true;
+            useRoughnessFromMetallicTextureGreen = false;
+
+            microSurface = 0.9f;
+            useMicroSurfaceFromReflectivityMapAplha = false;
+
+            ambient = new[] { 0f, 0f, 0f };
+            albedo = new[] { 1f, 1f, 1f };
+            reflectivity = new[] { 1f, 1f, 1f };
+            reflection = new[] { 0.5f, 0.5f, 0.5f };
+            emissive = new[] { 0f, 0f, 0f };
         }
 
         public void SetCustomType(string type)
         {
-            this.customType = type;
+            customType = type;
         }
     }
 }

+ 4 - 4
Exporters/3ds Max/BabylonExport.Entities/BabylonParticleSystem.cs

@@ -97,10 +97,10 @@ namespace BabylonExport.Entities
 
         public BabylonParticleSystem()
         {
-            this.preventAutoStart = true;
-            this.autoAnimate = false;
-            this.animations = null;
-            this.customShader = null;
+            preventAutoStart = true;
+            autoAnimate = false;
+            animations = null;
+            customShader = null;
         }
     }
 }

+ 17 - 17
Exporters/3ds Max/BabylonExport.Entities/BabylonShaderMaterial.cs

@@ -56,27 +56,27 @@ namespace BabylonExport.Entities
 
         public BabylonShaderMaterial()
         {
-            this.SetCustomType("BABYLON.ShaderMaterial");
-            this.shaderPath = null;
-            this.options = new BabylonShaderOptions();
-            this.textures = new Dictionary<string, object>();
-            this.textureArrays = new Dictionary<string, object[]>();
-            this.floats = new Dictionary<string, object>();
-            this.floatArrays = new Dictionary<string, object[]>();
-            this.colors3 = new Dictionary<string, object>();
-            this.colors4 = new Dictionary<string, object>();
-            this.vectors2 = new Dictionary<string, object>();
-            this.vectors3 = new Dictionary<string, object>();
-            this.vectors4 = new Dictionary<string, object>();
-            this.matrices = new Dictionary<string, object>();
-            this.matrices2x2 = new Dictionary<string, object>();
-            this.matrices3x3 = new Dictionary<string, object>();
-            this.vectors3Arrays = new Dictionary<string, object[]>();
+            SetCustomType("BABYLON.ShaderMaterial");
+            shaderPath = null;
+            options = new BabylonShaderOptions();
+            textures = new Dictionary<string, object>();
+            textureArrays = new Dictionary<string, object[]>();
+            floats = new Dictionary<string, object>();
+            floatArrays = new Dictionary<string, object[]>();
+            colors3 = new Dictionary<string, object>();
+            colors4 = new Dictionary<string, object>();
+            vectors2 = new Dictionary<string, object>();
+            vectors3 = new Dictionary<string, object>();
+            vectors4 = new Dictionary<string, object>();
+            matrices = new Dictionary<string, object>();
+            matrices2x2 = new Dictionary<string, object>();
+            matrices3x3 = new Dictionary<string, object>();
+            vectors3Arrays = new Dictionary<string, object[]>();
         }
 
         public void SetCustomType(string type)
         {
-            this.customType = type;
+            customType = type;
         }
     }
 

+ 11 - 11
Exporters/3ds Max/BabylonExport.Entities/BabylonStandardMaterial.cs

@@ -79,21 +79,21 @@ namespace BabylonExport.Entities
 
         public BabylonStandardMaterial() : base()
         {
-            this.SetCustomType("BABYLON.StandardMaterial");
-            this.ambient = new[] {1.0f, 1.0f, 1.0f};
-            this.diffuse = new[] { 1.0f, 1.0f, 1.0f };
-            this.specular = new[] { 1.0f, 1.0f, 1.0f };
-            this.emissive = new[] { 0f, 0f, 0f };
-            this.specularPower = 64;
-            this.maxSimultaneousLights = 4;
-            this.useSpecularOverAlpha = true;
-            this.useEmissiveAsIllumination = false;
-            this.linkEmissiveWithDiffuse = false;
+            SetCustomType("BABYLON.StandardMaterial");
+            ambient = new[] {1.0f, 1.0f, 1.0f};
+            diffuse = new[] { 1.0f, 1.0f, 1.0f };
+            specular = new[] { 1.0f, 1.0f, 1.0f };
+            emissive = new[] { 0f, 0f, 0f };
+            specularPower = 64;
+            maxSimultaneousLights = 4;
+            useSpecularOverAlpha = true;
+            useEmissiveAsIllumination = false;
+            linkEmissiveWithDiffuse = false;
         }
 
         public void SetCustomType(string type)
         {
-            this.customType = type;
+            customType = type;
         }
     }
 }

+ 13 - 13
Exporters/3ds Max/BabylonExport.Entities/BabylonTexture.cs

@@ -76,19 +76,19 @@ namespace BabylonExport.Entities
 
         public BabylonTexture()
         {
-            this.level = 1.0f;
-            this.uOffset = 0;
-            this.vOffset = 0;
-            this.uScale = 1.0f;
-            this.vScale = 1.0f;
-            this.uAng = 0;
-            this.vAng = 0;
-            this.wAng = 0;
-            this.wrapU = 1;
-            this.wrapV = 1;
-            this.hasAlpha = false;
-            this.coordinatesIndex = 0;
-            this.samplingMode = 3;
+            level = 1.0f;
+            uOffset = 0;
+            vOffset = 0;
+            uScale = 1.0f;
+            vScale = 1.0f;
+            uAng = 0;
+            vAng = 0;
+            wAng = 0;
+            wrapU = 1;
+            wrapV = 1;
+            hasAlpha = false;
+            coordinatesIndex = 0;
+            samplingMode = 3;
         }
     }
 }

+ 1 - 1
Exporters/3ds Max/BabylonExport.Entities/BabylonUniversalCamera.cs

@@ -6,7 +6,7 @@ namespace BabylonExport.Entities
     {
         public BabylonUniversalCamera()
         {
-            this.type = "UniversalCamera";
+            type = "UniversalCamera";
         }
     }
 }