private static FixedFunctionMaterial.TextureMappingType ToTextureMappingType(this W3dVertexMappingType value) { switch (value) { case W3dVertexMappingType.Uv: return(FixedFunctionMaterial.TextureMappingType.Uv); case W3dVertexMappingType.Environment: case W3dVertexMappingType.CheapEnvironment: return(FixedFunctionMaterial.TextureMappingType.Environment); case W3dVertexMappingType.LinearOffset: return(FixedFunctionMaterial.TextureMappingType.LinearOffset); case W3dVertexMappingType.Rotate: return(FixedFunctionMaterial.TextureMappingType.Rotate); case W3dVertexMappingType.SineLinearOffset: return(FixedFunctionMaterial.TextureMappingType.SineLinearOffset); case W3dVertexMappingType.Screen: return(FixedFunctionMaterial.TextureMappingType.Screen); case W3dVertexMappingType.Scale: return(FixedFunctionMaterial.TextureMappingType.Scale); case W3dVertexMappingType.Grid: return(FixedFunctionMaterial.TextureMappingType.Grid); default: throw new ArgumentOutOfRangeException(); } }
private static TextureMapping CreateTextureMapping(W3dVertexMappingType mappingType, W3dVertexMapperArgs args) { return(new TextureMapping { MappingType = mappingType.ToTextureMappingType(), UVPerSec = new Vector2 { X = args.UPerSec, Y = args.VPerSec }, UVScale = new Vector2 { X = args.UScale, Y = args.VScale, } }); }
private static TextureMappingType ToTextureMappingType(this W3dVertexMappingType value) { switch (value) { case W3dVertexMappingType.Uv: return(TextureMappingType.Uv); case W3dVertexMappingType.Environment: return(TextureMappingType.Environment); case W3dVertexMappingType.LinearOffset: return(TextureMappingType.LinearOffset); default: throw new ArgumentOutOfRangeException(); } }
private static FixedFunction.TextureMapping CreateTextureMapping(W3dVertexMappingType mappingType, W3dVertexMapperArgs args) { return(new FixedFunction.TextureMapping { MappingType = mappingType.ToTextureMappingType(), UVPerSec = new Vector2 { X = args.UPerSec, Y = args.VPerSec }, UVScale = new Vector2 { X = args.UScale, Y = args.VScale, }, UVCenter = new Vector2 { X = args.UCenter, Y = args.VCenter }, UVAmplitude = new Vector2 { X = args.UAmp, Y = args.VAmp }, UVFrequency = new Vector2 { X = args.UFreq, Y = args.VFreq }, UVPhase = new Vector2 { X = args.UPhase, Y = args.VPhase }, UVStep = new Vector2 { X = args.UStep, Y = args.VStep, }, Speed = args.Speed, Fps = args.FPS, Log2Width = args.Log2Width, StepsPerSecond = args.StepsPerSecond }); }