private static object loadAppearance( ref DataInputStream @in, ref List <Object3D> objectList, ref List <Object3D> rootObjectList) { Appearance appearance = new Appearance(); Loader.loadObject3D((Object3D)appearance, ref @in, ref objectList, ref rootObjectList); sbyte num1 = (sbyte)@in.readUnsignedByte(); appearance.setLayer((int)num1); CompositingMode reference1 = (CompositingMode)Loader.getReference(ref @in, ref objectList, ref rootObjectList); appearance.setCompositingMode(reference1); Fog reference2 = (Fog)Loader.getReference(ref @in, ref objectList, ref rootObjectList); appearance.setFog(reference2); PolygonMode reference3 = (PolygonMode)Loader.getReference(ref @in, ref objectList, ref rootObjectList); appearance.setPolygonMode(reference3); Material reference4 = (Material)Loader.getReference(ref @in, ref objectList, ref rootObjectList); appearance.setMaterial(reference4); int num2 = Loader.readIntLE(ref @in); for (int index = 0; index < num2; ++index) { Texture2D reference5 = (Texture2D)Loader.getReference(ref @in, ref objectList, ref rootObjectList); appearance.setTexture(index, reference5); } return((object)appearance); }
private static object loadPolygonMode( ref DataInputStream @in, ref List <Object3D> objectList, ref List <Object3D> rootObjectList) { PolygonMode polygonMode = new PolygonMode(); Loader.loadObject3D((Object3D)polygonMode, ref @in, ref objectList, ref rootObjectList); int mode1 = @in.readUnsignedByte(); int mode2 = @in.readUnsignedByte(); int mode3 = @in.readUnsignedByte(); bool enable1 = @in.readBoolean(); bool enable2 = @in.readBoolean(); bool enable3 = @in.readBoolean(); polygonMode.setCulling(mode1); polygonMode.setShading(mode2); polygonMode.setWinding(mode3); polygonMode.setTwoSidedLightingEnable(enable1); polygonMode.setLocalCameraLightingEnable(enable2); polygonMode.setPerspectiveCorrectionEnable(enable3); return((object)polygonMode); }