Class Geometry

Class representing some Geometry.

Hierarchy (view full)

Constructors

Properties

The WTCGL attribute collection that describes this geometry.

bounds: WTCGLBounds

An object defining the boundary of the geometry

drawRange: {
    count: number;
    start: number;
}

The range of supplied elements to draw.

The WTCGL rendering context.

An object defining all of the rendering state properties.

id: number

The unique ID of the Geometry.

instancedCount: number

The number of instances to draw.

isInstanced: boolean

A boolean indicating whether the geometry is an instanced geometry or not.

transformFeedbackIndex: number = 0
transformFeedbacks: TransformFeedback

Any supplied transform feedback objects

VAOs: {
    [key: string]: WebGLVertexArrayObject;
}

An array of vertex array objects that represent the different attributes.

Methods

  • Binds all attributes as derived from the program to attribute objects supplied to the geometry

    Parameters

    • program: Program

      The program to use to determine attribute locations

    Returns void

  • Computes the bounding box of the geometry. If no attribute is provided to compue with, try to use the position attribute array by default.

    Parameters

    Returns void

  • Computes the bounding sphere of the geometry. If no attribute is provided to compue with, try to use the position attribute array by default.

    Parameters

    Returns void

  • Create a new vertex array object bind Attributes to it

    Parameters

    • program: Program

      The program to use to determine attribute locations

    Returns void

  • Draw the geometry

    Parameters

    • __namedParameters: {
          mode: number;
          program: Program;
      }

      The parameters to be used for the draw command

    Returns void

  • Sets up the draw range, used to determined which properties are drawn

    Parameters

    • start: number

      The start of the range

    • count: number

      The number of properties to draw

    Returns void

  • Sets up the number of instances to draw

    Parameters

    • value: number

      The number of geometry instances to draw

    Returns void