Options
All
  • Public
  • Public/Protected
  • All
Menu

A Rasterizer that traverses the SceneGraph and uses the Rasterization Pipeline to render the scene.

Hierarchy

  • Rasterizer

Implements

Index

Constructors

constructor

  • Parameters

    Returns Rasterizer

Properties

Private camPos

camPos: Vector4

Saves the positions of the selected camera.

Private gl

gl: WebGL2RenderingContext

Private lightcolor

lightcolor: Vector4[]

Array to save the color of the LightSources.

Private lightpos

lightpos: Vector4[]

Array to save the positions of the LightSources.

Private lookat

lookat: Matrix4

Viewmatrix to use in the Shader.

Private mStack

mStack: MatrixStack

Local Matrixstack to help traversing the graph.

Private perspective

perspective: Matrix4

Saves the perspective Matrix used in the Shader.

Private sg

Methods

lightCamTraversal

  • lightCamTraversal(node: INode): void
  • Traverses the SceneGraph and sets up the Camera and the LightSources.

    Parameters

    • node: INode

      Node to traverse

    Returns void

startDraw

  • startDraw(delta: number): void
  • Starts setting up and rendering the scene.

    Parameters

    • delta: number

      Time delta since the last draw.

    Returns void

visitGeometryNode

  • Visits a GeometryNode and renders the corresponding geometry.

    Parameters

    Returns void

visitGroupNode

  • Vists a GroupNode.

    Parameters

    Returns void

visitNode

  • visitNode(node: INode): void
  • Determines which is visited and calls the appropriate method.

    Parameters

    • node: INode

      Node to visit.

    Returns void

visitRootNode

  • Sets up the WebGLContext.

    Parameters

    Returns void

Generated using TypeDoc