feat: add CKLight support and apply BMap changes to Python and CSharp bindings.
- add CKLight and CKTargetLight in BMap bindings - apply BMap changes, for example, the rename of BM3dObject_ prefix to BM3dEntity_, to BMap bindings.
This commit is contained in:
		@ -21,7 +21,7 @@ namespace BMapSharpTestbench {
 | 
			
		||||
            Console.ReadKey(true);
 | 
			
		||||
 | 
			
		||||
            // Start testbench
 | 
			
		||||
            string file_name = "Level_02.NMO";
 | 
			
		||||
            string file_name = "LightCameraTest.nmo";
 | 
			
		||||
            string temp_folder = "Temp";
 | 
			
		||||
            string texture_folder = "F:\\Ballance\\Ballance\\Textures";
 | 
			
		||||
            string[] encodings = ["cp1252", "gb2312"];
 | 
			
		||||
@ -66,38 +66,38 @@ namespace BMapSharpTestbench {
 | 
			
		||||
            //     Console.WriteLine($"\tMaterial Slot Count: {mesh.GetMaterialSlotCount()}");
 | 
			
		||||
            // }
 | 
			
		||||
 | 
			
		||||
            Console.WriteLine("===== Materials =====");
 | 
			
		||||
            foreach (var mtl in reader.GetMaterials()) {
 | 
			
		||||
                Console.WriteLine(mtl.GetName());
 | 
			
		||||
            // Console.WriteLine("===== Materials =====");
 | 
			
		||||
            // foreach (var mtl in reader.GetMaterials()) {
 | 
			
		||||
            //     Console.WriteLine(mtl.GetName());
 | 
			
		||||
 | 
			
		||||
                Console.WriteLine($"\tDiffuse: {mtl.GetDiffuse().ToManagedRGBA()}");
 | 
			
		||||
                Console.WriteLine($"\tAmbient: {mtl.GetAmbient().ToManagedRGBA()}");
 | 
			
		||||
                Console.WriteLine($"\tSpecular: {mtl.GetSpecular().ToManagedRGBA()}");
 | 
			
		||||
                Console.WriteLine($"\tEmissive: {mtl.GetEmissive().ToManagedRGBA()}");
 | 
			
		||||
            //     Console.WriteLine($"\tDiffuse: {mtl.GetDiffuse().ToManagedRGBA()}");
 | 
			
		||||
            //     Console.WriteLine($"\tAmbient: {mtl.GetAmbient().ToManagedRGBA()}");
 | 
			
		||||
            //     Console.WriteLine($"\tSpecular: {mtl.GetSpecular().ToManagedRGBA()}");
 | 
			
		||||
            //     Console.WriteLine($"\tEmissive: {mtl.GetEmissive().ToManagedRGBA()}");
 | 
			
		||||
 | 
			
		||||
                Console.WriteLine($"\tSpecular Power: {mtl.GetSpecularPower()}");
 | 
			
		||||
            //     Console.WriteLine($"\tSpecular Power: {mtl.GetSpecularPower()}");
 | 
			
		||||
 | 
			
		||||
                Console.WriteLine($"\tTexture Border Color: {mtl.GetTextureBorderColor().ToManagedRGBA()}");
 | 
			
		||||
            //     Console.WriteLine($"\tTexture Border Color: {mtl.GetTextureBorderColor().ToManagedRGBA()}");
 | 
			
		||||
 | 
			
		||||
                Console.WriteLine($"\tTexture Blend Mode: {mtl.GetTextureBlendMode()}");
 | 
			
		||||
                Console.WriteLine($"\tTexture Min Mode: {mtl.GetTextureMinMode()}");
 | 
			
		||||
                Console.WriteLine($"\tTexture Mag Mode: {mtl.GetTextureMagMode()}");
 | 
			
		||||
                Console.WriteLine($"\tSource Blend: {mtl.GetSourceBlend()}");
 | 
			
		||||
                Console.WriteLine($"\tDest Blend: {mtl.GetDestBlend()}");
 | 
			
		||||
                Console.WriteLine($"\tFill Mode: {mtl.GetFillMode()}");
 | 
			
		||||
                Console.WriteLine($"\tShade Mode: {mtl.GetShadeMode()}");
 | 
			
		||||
            //     Console.WriteLine($"\tTexture Blend Mode: {mtl.GetTextureBlendMode()}");
 | 
			
		||||
            //     Console.WriteLine($"\tTexture Min Mode: {mtl.GetTextureMinMode()}");
 | 
			
		||||
            //     Console.WriteLine($"\tTexture Mag Mode: {mtl.GetTextureMagMode()}");
 | 
			
		||||
            //     Console.WriteLine($"\tSource Blend: {mtl.GetSourceBlend()}");
 | 
			
		||||
            //     Console.WriteLine($"\tDest Blend: {mtl.GetDestBlend()}");
 | 
			
		||||
            //     Console.WriteLine($"\tFill Mode: {mtl.GetFillMode()}");
 | 
			
		||||
            //     Console.WriteLine($"\tShade Mode: {mtl.GetShadeMode()}");
 | 
			
		||||
 | 
			
		||||
                Console.WriteLine($"\tAlpha Test Enabled: {mtl.GetAlphaTestEnabled()}");
 | 
			
		||||
                Console.WriteLine($"\tAlpha Blend Enabled: {mtl.GetAlphaBlendEnabled()}");
 | 
			
		||||
                Console.WriteLine($"\tPerspective Correction Enabled: {mtl.GetPerspectiveCorrectionEnabled()}");
 | 
			
		||||
                Console.WriteLine($"\tZ Write Enabled: {mtl.GetZWriteEnabled()}");
 | 
			
		||||
                Console.WriteLine($"\tTwo Sided Enabled: {mtl.GetTwoSidedEnabled()}");
 | 
			
		||||
            //     Console.WriteLine($"\tAlpha Test Enabled: {mtl.GetAlphaTestEnabled()}");
 | 
			
		||||
            //     Console.WriteLine($"\tAlpha Blend Enabled: {mtl.GetAlphaBlendEnabled()}");
 | 
			
		||||
            //     Console.WriteLine($"\tPerspective Correction Enabled: {mtl.GetPerspectiveCorrectionEnabled()}");
 | 
			
		||||
            //     Console.WriteLine($"\tZ Write Enabled: {mtl.GetZWriteEnabled()}");
 | 
			
		||||
            //     Console.WriteLine($"\tTwo Sided Enabled: {mtl.GetTwoSidedEnabled()}");
 | 
			
		||||
 | 
			
		||||
                Console.WriteLine($"\tAlpha Ref: {mtl.GetAlphaRef()}");
 | 
			
		||||
            //     Console.WriteLine($"\tAlpha Ref: {mtl.GetAlphaRef()}");
 | 
			
		||||
 | 
			
		||||
                Console.WriteLine($"\tAlpha Func: {mtl.GetAlphaFunc()}");
 | 
			
		||||
                Console.WriteLine($"\tZ Func: {mtl.GetZFunc()}");
 | 
			
		||||
            }
 | 
			
		||||
            //     Console.WriteLine($"\tAlpha Func: {mtl.GetAlphaFunc()}");
 | 
			
		||||
            //     Console.WriteLine($"\tZ Func: {mtl.GetZFunc()}");
 | 
			
		||||
            // }
 | 
			
		||||
 | 
			
		||||
            // Console.WriteLine("===== Textures =====");
 | 
			
		||||
            // foreach (var tex in reader.GetTextures()) {
 | 
			
		||||
@ -108,6 +108,24 @@ namespace BMapSharpTestbench {
 | 
			
		||||
            //     Console.WriteLine($"\tVideo Format: {tex.GetVideoFormat()}");
 | 
			
		||||
            // }
 | 
			
		||||
 | 
			
		||||
            Console.WriteLine("===== Target Lights =====");
 | 
			
		||||
            foreach (var lit in reader.GetTargetLights()) {
 | 
			
		||||
                Console.WriteLine(lit.GetName());
 | 
			
		||||
 | 
			
		||||
                Console.WriteLine($"\tVisibility: {lit.GetVisibility()}");
 | 
			
		||||
                Console.WriteLine($"\tMatrix: {lit.GetWorldMatrix().ToManaged()}");
 | 
			
		||||
 | 
			
		||||
                Console.WriteLine($"Type: {lit.GetLightType()}");
 | 
			
		||||
                Console.WriteLine($"Color: {lit.GetColor().ToManagedRGBA()}");
 | 
			
		||||
                Console.WriteLine($"Constant Attenuation: {lit.GetConstantAttenuation()}");
 | 
			
		||||
                Console.WriteLine($"Linear Attenuation: {lit.GetLinearAttenuation()}");
 | 
			
		||||
                Console.WriteLine($"Quadratic Attenuation: {lit.GetQuadraticAttenuation()}");
 | 
			
		||||
                Console.WriteLine($"Range: {lit.GetRange()}");
 | 
			
		||||
                Console.WriteLine($"Hot Spot: {lit.GetHotSpot()}");
 | 
			
		||||
                Console.WriteLine($"Falloff: {lit.GetFalloff()}");
 | 
			
		||||
                Console.WriteLine($"Falloff Shape: {lit.GetFalloffShape()}");
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            Console.WriteLine("===== END =====");
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user