CSharpGL.GeometryTypesHelper.GetVertexCount C# (CSharp) Method

GetVertexCount() public static method

Get vertex count of specified geometry's type.

returns -1 if type is PickingGeometryType.Polygon.

public static GetVertexCount ( this type ) : int
type this
return int
        public static int GetVertexCount(this PickingGeometryType type)
        {
            int result = -1;

            switch (type)
            {
                case PickingGeometryType.Point:
                    result = 1;
                    break;

                case PickingGeometryType.Line:
                    result = 2;
                    break;

                case PickingGeometryType.Triangle:
                    result = 3;
                    break;

                case PickingGeometryType.Quad:
                    result = 4;
                    break;

                case PickingGeometryType.Polygon:
                    result = -1;
                    break;

                default:
                    throw new NotImplementedException();
            }

            return result;
        }
GeometryTypesHelper