/|\ y | | | ---------------> x (0, 0) 0 2 4 6 8 10 -------------------------- | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -------------------------- 1 3 5 7 9 11 side length is 1.
Inheritance: IBufferable
コード例 #1
0
        /// <summary>
        /// 彩色的色标带。
        /// </summary>
        /// <param name="anchor"></param>
        /// <param name="margin"></param>
        /// <param name="size"></param>
        /// <param name="zNear"></param>
        /// <param name="zFar"></param>
        public UIColorPaletteColoredBarRenderer(
            int maxMarkerCount,
            CodedColor[] codedColors,
            System.Windows.Forms.AnchorStyles anchor, System.Windows.Forms.Padding margin,
            System.Drawing.Size size, int zNear, int zFar)
            : base(anchor, margin, size, zNear, zFar)
        {
            this.codedColors = codedColors;

            var model = new QuadStripColoredModel(maxMarkerCount, codedColors.GetBitmap(1024));
            this.Renderer = QuadStripColoredRenderer.Create(model);
        }
コード例 #2
0
        /// <summary>
        /// 彩色的色标带。
        /// </summary>
        /// <param name="anchor"></param>
        /// <param name="margin"></param>
        /// <param name="size"></param>
        /// <param name="zNear"></param>
        /// <param name="zFar"></param>
        public UIColorPaletteColoredBarRenderer(
            int maxMarkerCount,
            CodedColor[] codedColors,
            System.Windows.Forms.AnchorStyles anchor, System.Windows.Forms.Padding margin,
            System.Drawing.Size size, int zNear, int zFar)
            : base(anchor, margin, size, zNear, zFar)
        {
            this.codedColors = codedColors;

            var model = new QuadStripColoredModel(maxMarkerCount, codedColors.GetBitmap(1024));

            this.Renderer = QuadStripColoredRenderer.Create(model);
        }
コード例 #3
0
        public static QuadStripColoredRenderer Create(QuadStripColoredModel model)
        {
            var shaderCodes = new ShaderCode[2];
            shaderCodes[0] = new ShaderCode(File.ReadAllText(@"shaders\QuadStripColor.vert"), ShaderType.VertexShader);
            shaderCodes[1] = new ShaderCode(File.ReadAllText(@"shaders\QuadStripColor.frag"), ShaderType.FragmentShader);
            var map = new AttributeMap();
            map.Add("in_Position", QuadStripColoredModel.position);
            map.Add("in_Color", QuadStripColoredModel.color);

            var renderer = new QuadStripColoredRenderer(model, shaderCodes, map);
            renderer.quadCount = model.quadCount;
            return renderer;
        }
コード例 #4
0
        public static QuadStripColoredRenderer Create(QuadStripColoredModel model)
        {
            var shaderCodes = new ShaderCode[2];

            shaderCodes[0] = new ShaderCode(File.ReadAllText(@"shaders\QuadStripColor.vert"), ShaderType.VertexShader);
            shaderCodes[1] = new ShaderCode(File.ReadAllText(@"shaders\QuadStripColor.frag"), ShaderType.FragmentShader);
            var map = new AttributeMap();

            map.Add("in_Position", QuadStripColoredModel.position);
            map.Add("in_Color", QuadStripColoredModel.color);

            var renderer = new QuadStripColoredRenderer(model, shaderCodes, map);

            renderer.quadCount = model.quadCount;
            return(renderer);
        }