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
  • Checks whether the two given #graphene_ray_t are equal.

    Parameters

    • b: Ray

      a #graphene_ray_t

    Returns boolean

  • free(): void
  • getDistanceToPlane(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

  • getDistanceToPoint(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

  • Retrieves the coordinates of a point at the distance t along the given #graphene_ray_t.

    Parameters

    • t: number

      the distance along the ray

    Returns Point3D

  • Initializes the given #graphene_ray_t using the given origin and direction values.

    Parameters

    Returns Ray

  • 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

  • intersectsSphere(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

  • intersectsTriangle(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

  • Allocates a new #graphene_ray_t structure.

    The contents of the returned structure are undefined.

    Returns Ray

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