120: m_point1(0.0, 0.0, 0.0)
121, m_point2(1.0, 0.0, 0.0)
135 return m_point1 == m_point2;
171 return (m_point2 - m_point1).
GetLength();
177 return (m_point2 - m_point1).GetLength2();
183 return m_point1 + (m_point2 - m_point1) * t;
189 return m_point1 == line.m_point1 && m_point2 == line.m_point2;
195 return !(*
this == line);
Definition of a line in 3D space.
const CVector3d & GetPoint2() const
Get second point of the line.
CVector3d GetPointAt(double t) const
Get point at parameter t.
void SetPoint1(const CVector3d &point)
Set first point of the line.
double GetDistance(const CVector3d &point) const
Calculate distance from point to line segment.
CLine3d()
Default constructor.
const CVector3d & GetPoint1() const
Get first point of the line.
double GetLength() const
Get length of the line segment.
bool Serialize(iser::IArchive &archive)
Serialize this line to specified archive.
CVector3d GetClosestPoint(const CVector3d &point) const
Get closest point on line to given point.
double GetDistanceSq(const CVector3d &point) const
Calculate squared distance from point to line segment (faster).
bool IsNull() const
Returns true if the line has zero length.
CVector3d GetDirection() const
Get direction vector of the line (normalized).
bool operator==(const CLine3d &line) const
bool operator!=(const CLine3d &line) const
double GetClosestParameter(const CVector3d &point) const
Get parameter value t for closest point on line to given point.
void SetPoint2(const CVector3d &point)
Set second point of the line.
double GetLengthSq() const
Get squared length of the line segment (faster than GetLength).
Represents a position or mathematical vector in 3D space with double precision.
CVector3d GetNormalized(double length=1.0) const
Return normalized vector with the same direction and specified length.
Element GetLength() const
Calculates the Euclidean length (magnitude) of the vector.
Represents an input/output persistence archive for object serialization.