Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a simple plane in 3D space.

Hierarchy

  • Plane

Implements

Index

Constructors

constructor

  • new Plane(gl: WebGL2RenderingContext, colors?: Vector4[], width?: number, height?: number): Plane
  • Parameters

    • gl: WebGL2RenderingContext
    • Default value colors: Vector4[] = ColorHelper.CreateColorArray(new Vector3(1, 0, 0), 4)
    • Default value width: number = 1
    • Default value height: number = 1

    Returns Plane

Properties

Private colorbuffer

colorbuffer: WebGLBuffer

The buffer containing the plane's colors.

colors

colors: Vector4[]

Colors used to color the Plane.

Private gl

gl: WebGL2RenderingContext

height

height: number

The height of the plane.

Private normalbuffer

normalbuffer: WebGLBuffer

The buffer containing the plane's normals.

Readonly shader

shader: string = "pvmcolor"

Key of the corresponding Shader in the Shadermanager.

Private vertexbuffer

vertexbuffer: WebGLBuffer

The buffer containing the plane's vertices.

width

width: number

The width of the plane.

Methods

intersect

  • Used for drawing with the raytracer.

    Ignored by the Raytracer

    Parameters

    • ray: Ray

      Ray to intersect with.

    • transformation: Matrix4

      Transformation of the object into worldspace.

    Returns Intersection

render

  • render(shader: Shader): void
  • Method to used for drawing with rasterizer.

    Parameters

    • shader: Shader

      Shader used for rendering.

    Returns void

Static WhiteSquare

  • WhiteSquare(gl: WebGL2RenderingContext): Plane
  • Returns a WhiteSqare with the length 1.

    Parameters

    • gl: WebGL2RenderingContext

      WebGlContext for generating the buffers.

    Returns Plane

Generated using TypeDoc