Gjsify LogoGjsify Logo

A ray emitted from an origin in a given direction.

The contents of the graphene_ray_t structure are private, and should not be modified directly.

record

Hierarchy

  • Ray

Index

Constructors

Properties

name: string

Methods

  • equal(b: Ray): boolean
  • free(): void
  • get_distance_to_plane(p: Plane): number
  • Computes the distance of the origin of the given #graphene_ray_t from the given plane.

    If the ray does not intersect the plane, this function returns INFINITY.

    Parameters

    • p: Plane

      a #graphene_plane_t

    Returns number

  • get_distance_to_point(p: Point3D): number
  • Computes the distance of the closest approach between the given #graphene_ray_t r and the point p.

    The closest approach to a ray from a point is the distance between the point and the projection of the point on the ray itself.

    Parameters

    Returns number

  • get_position_at(t: number): Point3D
  • Initializes the given #graphene_ray_t using the origin and direction values of another #graphene_ray_t.

    Parameters

    • src: Ray

      a #graphene_ray_t

    Returns Ray

  • Checks whether the given #graphene_ray_t r intersects the given #graphene_box_t b.

    See also: graphene_ray_intersect_box()

    Parameters

    Returns boolean

  • intersects_sphere(s: Sphere): boolean
  • Checks if the given #graphene_ray_t r intersects the given #graphene_sphere_t s.

    See also: graphene_ray_intersect_sphere()

    Parameters

    • s: Sphere

      a #graphene_sphere_t

    Returns boolean

  • intersects_triangle(t: Triangle): boolean
  • Checks whether the given #graphene_ray_t r intersects the given #graphene_triangle_t b.

    See also: graphene_ray_intersect_triangle()

    Parameters

    Returns boolean

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method