コード例 #1
0
        public int[] GetIndecies()
        {
            var indecies = new int[cone.PointCount * 6];

            TesselationToolbox.GetIndeciesForTriangeFan(0, 1, cone.PointCount, ref indecies, 0, true);
            TesselationToolbox.GetIndeciesForTriangeFan(cone.PointCount + 1, 1, cone.PointCount, ref indecies,
                                                        cone.PointCount * 3, false);

            return(indecies);
        }
コード例 #2
0
        public int[] GetIndecies()
        {
            var indecies = new int[frustrumOfCone.PointCount * 12];

            TesselationToolbox.GetIndeciesForTriangeFan(0, 1, frustrumOfCone.PointCount, ref indecies, 0, true);
            TesselationToolbox.GetIndeciesForTriangeFan(2 * frustrumOfCone.PointCount + 1,
                                                        frustrumOfCone.PointCount + 1, frustrumOfCone.PointCount,
                                                        ref indecies, frustrumOfCone.PointCount * 3, false);

            TesselationToolbox.GetIndeciesForTriangeStripBetweenTwoPointCircles(1, frustrumOfCone.PointCount + 1,
                                                                                frustrumOfCone.PointCount, ref indecies,
                                                                                frustrumOfCone.PointCount * 6);
            return(indecies);
        }
コード例 #3
0
        public int[] GetIndecies()
        {
            var indecies = new int[(sphere.PointsPerCircle * 2) * 3 + (sphere.CircleCount - 1) * (2 * sphere.PointsPerCircle) * 3];

            TesselationToolbox.GetIndeciesForTriangeFan(0, 1, sphere.PointsPerCircle, ref indecies, 0, true);
            TesselationToolbox.GetIndeciesForTriangeFan(sphere.CircleCount * sphere.PointsPerCircle + 1,
                                                        ((sphere.CircleCount - 1) * sphere.PointsPerCircle) + 1,
                                                        sphere.PointsPerCircle, ref indecies, sphere.PointsPerCircle * 3,
                                                        false);

            for (var i = 0; i < sphere.CircleCount - 1; i++)
            {
                TesselationToolbox.GetIndeciesForTriangeStripBetweenTwoPointCircles(i * sphere.PointsPerCircle + 1,
                                                                                    (i + 1) * sphere.PointsPerCircle + 1,
                                                                                    sphere.PointsPerCircle,
                                                                                    ref indecies,
                                                                                    sphere.PointsPerCircle * 6 +
                                                                                    i * sphere.PointsPerCircle * 6);
            }
            return(indecies);
        }