24 lines
660 B
C++
24 lines
660 B
C++
#pragma once
|
|
|
|
|
|
#include "LineSegment.hpp"
|
|
|
|
namespace J3ML::Geometry
|
|
{
|
|
class Line
|
|
{
|
|
public:
|
|
Vector3 Position; /// Specifies the origin of this line.
|
|
Vector3 Direction; /// The normalized direction vector of this ray.
|
|
public:
|
|
static void
|
|
ClosestPointLineLine(const Vector3 &v0, const Vector3 &v10, const Vector3 &v2, const Vector3 &v32, float &d,
|
|
float &d2);
|
|
|
|
Vector3 ClosestPoint(const J3ML::Geometry::LineSegment &other, float &d, float &d2) const;
|
|
|
|
Vector3 GetPoint(float d) const;
|
|
|
|
Vector3 ClosestPoint(const Vector3 &targetPoint, float &d) const;
|
|
};
|
|
} |