gophergfx
    Preparing search index...

    Class Geometry2Factory

    This is a factory class for creating a variety of common geometries that can be drawn in a 2D scene. Most of these geometries are Mesh2s, meaning they are constructed from triangles, but there are also a few Line2 objects. This factory is for creating simple 2D geometries (e.g., rectangles, circles) that are easily described by a mathematical function.

    Index
    • Creates a pie slice (technically a sector) that spans the arc from startAngle moving counter-clockwise to stopAngle.

      Parameters

      • radius: number = 0.5

        Radius of the circle the pie slice is cut from

      • startAngle: number = 0

        The starting angle for the pie slice

      • stopAngle: number = Math.PI

        The stopping angle

      • radiansPerSegment: number = ...

        Controls the tesselation of the triangle fan, defaults to the same resolution as Geometry2Factory.createCircle(), 50 segments per 2*PI.

      Returns Mesh2

      A Mesh2 triangle fan to represent the sector