gophergfx
    Preparing search index...

    Class Camera

    Camera class that extends Node3.

    Hierarchy (View Summary)

    Index
    _localBoundingBox: BoundingBox3

    Bounding box in this transform's local coordinate space

    _localBoundingSphere: BoundingSphere

    Bounding circle in this transform's local coordinate space

    _position: Vector3

    The position of this node as a Vector3.

    _rotation: Quaternion

    The rotation of this transform represented as a quaternion.

    _scale: Vector3

    The scale of this node as a Vector3.

    _worldBoundingBox: BoundingBox3

    Bounding box in the world coordinate space

    _worldBoundingSphere: BoundingSphere

    Bounding box in the world coordinate space

    aspectRatio: number
    boundingBox: BoundingBox3

    The bounding box in vertex coordinate space

    boundingSphere: BoundingSphere

    The bounding sphere in vertex coordinate space

    children: Node3[]
    far: number
    fov: number
    left: number
    localBoundsDirty: boolean
    localMatrixDirty: boolean
    localMatrixNegScale: boolean
    localMatrixUpdated: boolean
    localToParentMatrix: Matrix4

    The local transformation matrix of this node.

    localToWorldMatrix: Matrix4

    The world transformation matrix of this node.

    near: number
    parent: Node3 | null

    The parent transform of this transform. Null if this transform has no parent.

    projectionMatrix: Matrix4

    The projection matrix of the camera.

    projectionMatrixDirty: boolean

    Indicates if the projection matrix needs to be updated.

    right: number
    viewMatrix: Matrix4

    The view matrix of the camera.

    visible: boolean

    Whether this transform is currently visible in the scene.

    worldBoundsDirty: boolean
    worldMatrixDirty: boolean
    • Adds a child Node3 to the current Node3

      Parameters

      • child: Node3

        The Node3 to be added

      Returns void

    • Draws this transform and all its children in the scene graph.

      Parameters

      • parent: Node3

        The parent transform of this transform.

      • camera: Camera

        The camera used to view the scene.

      • lightManager: LightManager

        The light manager used to manage the lights in the scene.

      Returns void

    • Gets the aspect ratio of the camera

      Returns number

      The aspect ratio of the camera

    • Gets the distance from the camera to the far clipping plane

      Returns number

      The distance from the camera to the far clipping plane

    • Gets the leftmost x position an orthographic camera's view frustum

      Returns number

      The leftmost x position for the camera's view frustum

    • Gets the distance from the camera to the near clipping plane

      Returns number

      The distance from the camera to the near clipping plane

    • Gets the rightmost x position for an orthographic camera's view frustum

      Returns number

      The rightmost x position for the camera's view frustum

    • Checks for intersection between this Node3 and another

      Parameters

      • other: Node3

        The other Node3 object

      • mode: IntersectionMode3 = IntersectionMode3.BOUNDING_SPHERE

        The IntersectionMode3 to use for the comparison (default: BOUNDING_SPHERE)

      • space: CoordinateSpace3 = CoordinateSpace3.LOCAL_SPACE

        The CoordinateSpace3 to use for the comparison (default: LOCAL_SPACE)

      Returns boolean

      Whether or not the two objects intersect

    • Rotates this Node3 object to look at the given target with the given up vector

      Parameters

      • target: Vector3

        The Vector3 representing the target in world space

      • up: Vector3 = Vector3.UP

        The Vector3 representing the up direction (defaults to Vector3.UP)

      • coordinateSpace: CoordinateSpace3 = CoordinateSpace3.LOCAL_SPACE

      Returns void

    • Removes the current Node3 from its parent Node3

      Returns boolean

      true if the Node3 was successfully removed, false otherwise

    • Removes the given child Node3 from the current Node3

      Parameters

      • child: Node3

        The Node3 to be removed

      Returns Node3 | null

      The removed Node3 if found, null otherwise

    • Sets the camera parameters for an orthographic view

      Parameters

      • left: number

        The left plane

      • right: number

        The right plane

      • bottom: number

        The bottom plane

      • top: number

        The top plane

      • near: number

        The near plane

      • far: number

        The far plane

      Returns void

    • Sets the camera parameters for a perspective view

      Parameters

      • fov: number

        The field of view

      • aspectRatio: number

        The aspect ratio

      • near: number

        The near plane

      • far: number

        The far plane

      Returns void

    • Traverses the scene graph starting from this Node3 object and updates the world matrices of all Node3 objects in the graph.

      Parameters

      • parentMatrixDirty: boolean = false

      Returns void