# Ray

Provide functions for the creation and manipulation of Rays.

A ray begins as a single point and extends infinitely in a direction.

The first vector is the origin of the ray. The second vector is the direction of the ray relative to the origin.

The following functions will normalize the ray direction to unit length. Some functions may work correctly with directions that are not unit length, but this may vary from function to function.

pyrr.ray.create(start, direction, dtype=None)

pyrr.ray.create_from_line(line, dtype=None)

  Converts a line or line segment to a ray.

pyrr.ray.direction(ray)

class pyrr.ray.index
  direction = 1

    The index of the direction vector within the ray

  position = 0

    The index of the start vector within the ray

pyrr.ray.invert(r)

pyrr.ray.position(ray)