Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a Camera in the Scenegraph.

Hierarchy

  • CameraNode

Implements

Index

Constructors

constructor

  • Parameters

    • id: string
    • Default value transform: Matrix4 = Matrix4.Identity()
    • Default value fov: number = (Math.PI / 180) * 45

    Returns CameraNode

Properties

animations

animations: string[]

The animations attached to this node.

Readonly children

children: INode[]

Nodes after Camera. Empty since its a Leafnode.

fov

fov: number

Field of view of the camera in radians.

id

id: string

The id of the camera.

transform

transform: Matrix4

The initial transformation of the node without animations.

Accessors

transformation

  • get transformation(): Matrix4
  • set transformation(transform: Matrix4): void
  • Gets all transformations combined. The initial transformation multiplied with the animations in the order they are attached.

    Returns Matrix4

  • Sets the initial transformation without animations.

    Parameters

    Returns void

Methods

accept

  • Implementation of the accept part of the visitor pattern.

    Parameters

    • visitor: IVisitor

      Renderer to traverse the scenegraph.

    Returns void

addAnimation

  • addAnimation(animation: string): INode
  • Attaches a new animation to this node.

    Parameters

    • animation: string

      Key of the animation to attach.

    Returns INode

addChild

  • Throws error since the camera is a leaf node!

    Parameters

    • node: INode

      Child to add.

    Returns INode

removeChild

  • removeChild(node: INode): boolean
  • Returns static false cause there are no nodes to remove.

    Parameters

    • node: INode

      Node to remove.

    Returns boolean

Generated using TypeDoc