Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GeosphereGeometry

Hierarchy

Implements

Index

Constructors

constructor

  • new GeosphereGeometry(context: Context, identifier?: undefined | string, diameter?: number, textured?: boolean): GeosphereGeometry
  • Object constructor, requires a context and an identifier.

    Parameters

    • context: Context

      Valid context to create the object for.

    • Optional identifier: undefined | string

      Meaningful name for identification of this instance.

    • Default value diameter: number = 1

      Diameter of the sphere (default: 1.0)

    • Default value textured: boolean = true

      Is the box textured? (default: true)

    Returns GeosphereGeometry

Properties

Protected _buffers

_buffers: Buffer[] = new Array<Buffer>()

Various buffers required for this geometry (e.g., vertex buffer).

Protected _diameter

_diameter: number = 1

Diameter of the sphere

Protected _size

_size: number = 0

Protected _texCoordLocation

_texCoordLocation: GLuint

Attribute location of the texture coordinate

Protected _textured

_textured: boolean = false

Is the sphere textured?

Protected _vertexArray

_vertexArray: VertexArray

Vertex array used for binding the rectangle's buffer(s).

Protected _vertexLocation

_vertexLocation: GLuint

Attribute location of the vertex position

Accessors

buffers

  • get buffers(): Array<Buffer>

context

initialized

  • get initialized(): boolean

texCoordLocation

  • get texCoordLocation(): GLuint

vertexArray

vertexLocation

  • get vertexLocation(): GLuint

Methods

Protected assertInitialized

  • assertInitialized(): void
  • Asserts the objects initialization status to be true. Note that the implementation is cached and forwarded to either an empty function when initialized and to an acutal assert(false) otherwise.

    Returns void

Protected assertUninitialized

  • assertUninitialized(): undefined
  • Asserts the objects initialization status to be false. Note that the implementation is cached and forwarded to either an empty function when uninitialized and to an acutal assert(false) otherwise.

    Returns undefined

bind

  • bind(): void

Protected bindBuffers

  • bindBuffers(): void

draw

  • draw(): void

initialize

  • initialize(aVertex?: GLuint, aTexCoord?: GLuint): boolean
  • Creates the vertex buffer object (VBO) and creates and initializes the buffer's data store.

    Parameters

    • Default value aVertex: GLuint = 0

      Attribute binding point for vertices.

    • Default value aTexCoord: GLuint = 1

      Attribute binding point for texture coordinates.

    Returns boolean

unbind

  • unbind(): void

Protected unbindBuffers

  • unbindBuffers(): void

uninitialize

  • uninitialize(): void

Static Protected assertInitializedFalse

Static Protected assertUninitializedFalse

Static assert_initialized

Static assert_uninitialized

Static initialize

  • Method decorator for initialization of Initializable inheritors. This decorator asserts the initialization status of the instance that is to be initialized, invokes its initialization with arbitrary number of parameters, and sets the initialization status to the initialization success (either false or true). In order to encourage the use of assertInitialized and assertUninitialized they are dynamically bound to either a static, always-failing assert or an empty/undefined function.

    Returns MethodDecorator

Static uninitialize

  • Method decorator for uninitialization of Initializable inheritors. This decorator asserts the initialization status of the instance that is to be uninitialized, invokes its uninitialization, and falsifies the initialization status. In order to encourage the use of assertInitialized and assertUninitialized they are dynamically bound to a static, always-failing assert and an empty/undefined function respectively.

    Returns MethodDecorator