Options
All
  • Public
  • Public/Protected
  • All
Menu

Class representing a ray

Hierarchy

  • Ray

Index

Constructors

Properties

Methods

Constructors

constructor

  • Creates a new ray with origin and direction

    Parameters

    • origin: Vector4

      The origin of the Ray

    • direction: Vector4

      The direction of the Ray

    Returns Ray

Properties

direction

direction: Vector4

The direction of the Ray

origin

origin: Vector4

The origin of the Ray

Methods

Static makeRay

  • makeRay(xpos: number, ypos: number, width: number, height: number, camera: Camera): Ray
  • Creates a ray from the camera through the image plane.

    Parameters

    • xpos: number

      The pixel's x-position in the canvas

    • ypos: number

      The pixel's y-position in the canvas

    • width: number
    • height: number
    • camera: Camera

      The Camera

    Returns Ray

    The resulting Ray

Static makeRayCameraNode

  • makeRayCameraNode(x: number, y: number, width: number, height: number, fov: number, transform: Matrix4): Ray
  • Creates a Ray with data from a CameraNode.

    Parameters

    • x: number

      The pixel's x-position in the canvas

    • y: number

      The pixel's y-position in the canvas

    • width: number

      The width of the canvas

    • height: number

      The height if the canvas

    • fov: number

      The field of view of the camera.

    • transform: Matrix4

      The transformation of the CameraNode.

    Returns Ray

Generated using TypeDoc