import { Vector3 } from "./Vector3";
import { Ray } from "./Ray";
import { Line, LineSegment } from "./Line";
import { Plane, PlaneSegment } from "./Plane";
/**
 * Get the intersection point of the ray and the plane if there is one
 * @param ray the ray
 * @param plane the plane
 * @returns WorldCoordinates or null if there is no intersection point, null if direction leads away
 */
export declare function getIntersectionPoint(ray: Ray, plane: Plane): Vector3 | null;
/**
 * Gets a factor t so that (ray.direction * t) is an intersection point on the plane.
 * If the ray is parallel to the plane or leads away from it, it returns null.
 * @param ray
 * @param plane
 */
export declare function factorOfDirectionFromRayToPlane(ray: Ray, plane: Plane): number | null;
/**
 * Projects the point to the plane, returning the point in the plane that is closest to the given point.
 * @param point
 * @param plane
 * @returns {vec3}
 */
export declare function projectToPlane(point: Vector3, plane: Plane): Vector3 | null;
/**
 * Determine if the given point is in the upper half space of the plane.
 * Note that this depends on the direction of the plane normal.
 * @param point
 * @param plane
 * @returns {boolean}
 */
export declare function isInUpperHalfSpace(point: Vector3, plane: Plane): boolean;
/**
 * Determine if the given point is in the lower half space of the plane.
 * Note that this depends on the direction of the plane normal.
 * @param point
 * @param plane
 * @returns {boolean}
 */
export declare function isInLowerHalfSpace(point: Vector3, plane: Plane): boolean;
/**
 * The distance of a point to the plane.
 * Calculated by the distance of the point to its projection on the plane.
 * @param point
 * @param plane
 * @returns {number}
 */
export declare function distanceToPlane(point: Vector3, plane: Plane): number;
/**
 * Finds the point on the line with minimal distance to the given point.
 * For this, use the direction of the line as a normal vector for a plane containing the point.
 * The closest point then is the projection of the line to this plane.
 * @param line
 * @param point
 * @returns {vec3}
 */
export declare function closestPointOnLine(line: Line, point: Vector3): Vector3 | null;
/**
 * Calulcates the distance a point has to the plane segment.
 * There are two cases:
 * 		- The point projected to the plane of the segment is inside the plane segment.
 * 		Then the distance is the distance the point has to its projection
 * 		- Otherwise the projection is not in the segment. Calculate the distance to the closest border of the segment.
 * 		Applying the pythagorean rule we obtain the distance.
 *
 * 		, .
 * 		, |\
 * 		, | \
 * 		a |  \  c
 * 		, |   \
 * 		, |    \
 * 		, p-----
 * 		, _______
 * 				b
 * 		. is the point in 3D space
 * 		p is the projection to the plane of the segment
 * 		_____ is the segment
 * 		Pythargoras: a^2 + b^2 = c^2
 * @param segment
 * @param point
 * @returns {number}
 */
export declare function distanceToPlaneSegment(segment: PlaneSegment, point: Vector3): number;
/**
 * Projects the point to the plane segment.
 * For this, we first project the point to the plane containing the plane segment.
 * Then there are two cases to consider:
 * 		a) the point is already inside the plane segment
 * 		b) the point is not in the plane segment
 *
 * 	In the first case the projection is the same as the projection to the plane.
 * 	In the second case we also have to consider the borders of the segment and project to them,
 * 	choosing the smallest distance line segment.
 * @param segment
 * @param point
 * @returns {vec3}
 */
export declare function projectToPlaneSegment(segment: PlaneSegment, point: Vector3): Vector3;
/**
 * Calculate the distance to the line segment.
 * This is either the closest point on the line containing the segment, or one of the border points.
 * @param segment
 * @param point
 * @returns {number}
 */
export declare function distanceToLineSegment(segment: LineSegment, point: Vector3): number;
/**
 * Check if point is on the line segment. Assumes that the point is already on the line containing the segment.
 * For this, effectively project the point to the line and check if the projection is between the two points.
 * This can be achieved by comparing innerProducts.
 * @param segment
 * @param point
 * @returns {boolean}
 */
export declare function isPointOnLineSegment(segment: LineSegment, point: Vector3): boolean;
/**
 * Find the closest point to the given point on a line segment.
 * @param segment
 * @param point
 * @returns {vec3}
 */
export declare function projectToLineSegment(segment: LineSegment, point: Vector3): Vector3;
/**
 * Checks if the point is contained in the plane segment. This assumes that the point is already in the plane of the segment!
 * @param segment
 * @param point
 * @returns {boolean}
 */
export declare function isInsidePlaneSegment(segment: PlaneSegment, point: Vector3): boolean;
/**
 * Get the line segments of the plane segment, e.g. the borders of the segment
 * @param segment
 * @returns {LineSegment[]}
 */
export declare function lineSegmentsOfPlaneSegment(segment: PlaneSegment): LineSegment[];
/**
 * Rotation of vector a around vector b considering c as axis and
 * @param vectorA
 * @param vectorB
 * @param normalVector
 * @param angle in Radians
 */
export declare function rotateVectorAAroundPointBByNormalCWithRadiantAngle(vectorA: Vector3, vectorB: Vector3, normalVector: Vector3, angle: number): Vector3;
/**
 * return -2 for negative factor + 2 for positive factor or null for parallel
 * @param ray Ray
 * @param plane Plane
 */
export declare function getOrderedIntersectionFactor(ray: Ray, plane: Plane): number | null;
export declare function intersectPlanes(p1: Plane, p2: Plane): Ray | null;
export declare function intersectionPoint(ray: Ray, plane: Plane): Vector3 | null;
