73 [[nodiscard]]
const Point3D&
p0()
const {
return p0_; }
75 [[nodiscard]]
const Point3D&
p1()
const {
return p1_; }
103 template <
typename T>
Line3D()=default
默认构造:原点在 (0,0,0),方向沿 X 轴
Point3D point_at(T t) const
参数方程求点
const Vector3D & direction() const
获取单位方向向量
Line3D(const Point3D &origin, const Vector3D &direction)
从原点和方向构造直线
const Point3D & origin() const
获取直线上的一点(原点)
const Point3D & origin() const
获取射线起点
Point3D point_at(T t) const
参数方程求点(t ≥ 0)
Ray3D(const Point3D &origin, const Vector3D &direction)
从原点和方向构造射线
const Vector3D & direction() const
获取单位方向向量
Ray3D()=default
默认构造:原点在 (0,0,0),方向沿 X 轴
Segment3D()=default
默认构造:两个端点均在原点
Segment3D(const Point3D &p0, const Point3D &p1)
从两个端点构造线段
const Point3D & p1() const
获取终点
const Point3D & p0() const
获取起点
Vector3D direction() const
方向向量(未归一化)
foundation::Vector3D Vector3D
双精度三维向量(重新导出)
foundation::Point3D Point3D
双精度三维点(重新导出)