Back to class index
Ray[Class Summary]
pos
dir
ctor (+3 overloads)
IsFinite()[const]
GetPoint(distance)[const]
Translate(offset)
Transform(transform) (+3 overloads)
Contains(...)[const] (+1 overload)
Equals(otherRay,epsilon)[const]
BitEquals(other)[const]
Distance(point)[const] (+12 overloads)
ClosestPoint(targetPoint)[const] (+10 overloads)
Intersects(...)[const] (+13 overloads)
IntersectsDisc(disc)[const]
ToLine()[const]
ToLineSegment(d)[const]
ProjectToAxis(...)[const]
ToLineSegment(dStart,dEnd)[const]
ToString()[const]
SerializeToString()[const]
SerializeToCodeString()[const]
FromString(str,outEndStr)[static] (+1 overload)

Ray::Distance

Syntax

float Ray::Distance(const float4 &point) const; [1 line of code]
float Ray::Distance(const float4 &point, float &d) const; [4 lines of code]
float Ray::Distance(const Ray &other) const; [1 lines of code]
float Ray::Distance(const Ray &other, float &d) const; [1 lines of code]
float Ray::Distance(const Ray &other, float &d, float &d2) const; [5 lines of code]
float Ray::Distance(const Line &other) const; [1 lines of code]
float Ray::Distance(const Line &other, float &d) const; [1 lines of code]
float Ray::Distance(const Line &other, float &d, float &d2) const; [5 lines of code]
float Ray::Distance(const LineSegment &other) const; [1 lines of code]
float Ray::Distance(const LineSegment &other, float &d) const; [1 lines of code]
float Ray::Distance(const LineSegment &other, float &d, float &d2) const; [5 lines of code]
float Ray::Distance(const Sphere &sphere) const; [4 lines of code]
float Ray::Distance(const Capsule &capsule) const; [4 lines of code]

Computes the distance between this ray and the given object.

This function finds the nearest pair of points on this and the given object, and computes their distance. If the two objects intersect, or one object is contained inside the other, the returned distance is zero.

See Also

Contains(), Intersects(), ClosestPoint(), GetPoint().