import * as geom from './index'; import { Shape } from './Shape'; /** * Class representing a ray (a half-infinite line). */ export declare class Ray extends Shape { pt: geom.Point; norm: geom.Vector; /** * Ray may be constructed by setting an *origin* point and a *normal* vector, so that any point *p* * on a ray fit an equation: * (p - origin) * vector = 0 * Ray defined by constructor is a right semi-infinite line with respect to the normal vector * If normal vector is omitted ray is considered horizontal (normal vector is (0,1)). * Don't be confused: direction of the normal vector is orthogonal to the ray */ constructor(pt?: geom.Point, norm?: geom.Vector); /** * Return new cloned instance of ray */ clone(): geom.Ray; get tag(): geom.ShapeTag; get name(): string; get center(): geom.Point; /** * Slope of the ray - angle in radians between ray and axe x from 0 to 2PI */ get slope(): number; /** * Returns half-infinite bounding box of the ray */ get box(): geom.Box; /** * Return start point */ get start(): geom.Point; /** * Ray has no end point */ get end(): any; /** * Return positive infinity number as length */ get length(): number; /** * Return coordinate of the point that lies on the ray in the transformed * coordinate system where center is the projection of the point(0,0) to * the line containing this ray and axe y is collinear to the normal vector.
* This method assumes that point lies on the ray */ coord(pt: geom.Point): number; /** * Returns true if point belongs to ray */ contains(pt: geom.Point): boolean; /** * Split ray with point and return array of segment and new ray */ split(pt: geom.Point): (geom.Segment | geom.Ray)[]; /** * Returns array of intersection points between ray and another shape */ intersect(shape: geom.Shape): geom.Point[]; /** * Return new line rotated by angle. */ rotate(angle: number, center?: Readonly): geom.Ray; /** * Return new ray transformed by affine transformation matrix */ transform(m: geom.Matrix): geom.Ray; } export declare const ray: (pt?: geom.Point, norm?: geom.Vector) => geom.Ray; //# sourceMappingURL=Ray.d.ts.map