FLImaging 7.8.25.3
FLGeometry3DLine.h
1#pragma once
7
8#include "FLGeometry3DAxis.h"
9
11namespace FLImaging
12{
14 namespace Foundation
15 {
16 template <typename Ty>
17 class FL_EXPORT CMatrixFor3DTransform;
18
19 template <typename Ty>
20 class FL_EXPORT CFLGeometry3DDirection;
21
22 template <typename Ty>
23 class FL_EXPORT CFLPoint3;
24
30 template <typename Ty>
31 class FL_EXPORT CFLGeometry3DLine : public Base::CFLBase
32 {
33 public:
39
47
64
72 void Reverse();
73
84
97
109 void SetLocation(const CFLPoint3<Ty>& flp3Origin);
110
123
134
145
156
168 double GetAngle(const CFLGeometry3DLine<Ty>& rhs) const;
169
181 double GetAngleInRadian(const CFLGeometry3DLine<Ty>& rhs) const;
182
200 bool Contains(const CFLPoint3<Ty>& flp3, double f64LinearTolerance) const;
201
215 double GetDistance(const CFLPoint3<Ty>& flp3Point) const;
216
228 double GetDistance(const CFLGeometry3DLine<Ty>& rhs) const;
229
243 double GetSquareDistance(const CFLPoint3<Ty>& flp3) const;
244
256 double GetSquareDistance(const CFLGeometry3DLine<Ty>& rhs) const;
257
272
288 const CResult Reflect(const CFLPoint3<Ty>& flp3Pivot);
289
304
320 const CResult Reflect(const CFLGeometry3DAxis<Ty>& axisOfSymmetry);
321
336
353
368
386 const CResult Rotate(const CFLGeometry3DAxis<Ty>& axisOfRotation, double f64Angle);
387
403 CFLGeometry3DLine<Ty> GetRotated(const CFLGeometry3DAxis<Ty>& axisOfRotation, double f64Angle) const;
404
422 const CResult Scale(double f64Scale, const CFLPoint3<Ty>& flp3Pivot);
423
439 CFLGeometry3DLine<Ty> GetScaled(double f64Scale, const CFLPoint3<Ty>& flp3Pivot) const;
440
457
472
488 const CResult Translate(const CFLGeometry3DVector<Ty>& vecTranslate);
489
505
523 const CResult Translate(const CFLPoint3<Ty>& flp3From, const CFLPoint3<Ty>& flp3To);
524
541 CFLGeometry3DLine<Ty> GetTranslated(const CFLPoint3<Ty>& flp3From, const CFLPoint3<Ty>& flp3To) const;
542
543 SupportToDuplicateObject(CFLGeometry3DLine<Ty>, *this);
544 DeclareGetClassType();
545
546 protected:
547 CFLGeometry3DAxis<Ty> m_axisPos;
548 };
549 }
550}
Top-level base class of FLImaging.
Definition FLBase.h:36
FLImaging module execution result object.
Definition ResultsDef.h:1704
Represents a 3D axis defined by an origin point and a direction.
Definition FLGeometry3DAxis.h:38
A class that represents right-handed coordinate system in 3D space.
Definition FLGeometry3DCoordinateSystemRH.h:38
A class representing unit vector in 3D space.
Definition FLGeometry3DDirection.h:38
CFLGeometry3DLine< Ty > GetReflected(const CFLGeometry3DAxis< Ty > &axisOfSymmetry) const
Returns a reflected copy of the line about the specified axis of symmetry.
const CResult Scale(double f64Scale, const CFLPoint3< Ty > &flp3Pivot)
Scales the line about the specified pivot point.
double GetSquareDistance(const CFLPoint3< Ty > &flp3) const
Returns the squared distance between this line and the specified point.
double GetAngle(const CFLGeometry3DLine< Ty > &rhs) const
Returns the angle between this line and another line in degrees.
const CResult Reflect(const CFLGeometry3DCoordinateSystemRH< Ty > &planeOfSymmetry)
Reflects the line about the specified plane of symmetry.
const CResult Reflect(const CFLPoint3< Ty > &flp3Pivot)
Reflects the line about the specified pivot point.
void SetDirection(const CFLGeometry3DDirection< Ty > &dir)
Sets the direction of the line.
const CResult Translate(const CFLGeometry3DVector< Ty > &vecTranslate)
Translates the line by the specified vector.
CFLGeometry3DLine< Ty > GetTranslated(const CFLGeometry3DVector< Ty > &vecTranslate) const
Returns a translated copy of the line. The line is translated by the specified vector.
const CFLGeometry3DAxis< Ty > * GetPosition() const
Returns an axis containing the origin point and direction of the line.
bool Contains(const CFLPoint3< Ty > &flp3, double f64LinearTolerance) const
Returns true if the line contains the specified point. That is, if the distance between the point and...
double GetSquareDistance(const CFLGeometry3DLine< Ty > &rhs) const
Returns the squared distance between this line and another line.
const CFLPoint3< Ty > * GetLocation() const
Returns the origin point of the line.
void SetPosition(const CFLGeometry3DAxis< Ty > &axis)
Sets the origin point and direction of the line.
double GetAngleInRadian(const CFLGeometry3DLine< Ty > &rhs) const
Returns the angle between this line and another line in radians.
double GetDistance(const CFLGeometry3DLine< Ty > &rhs) const
Returns the distance between this line and another line.
CFLGeometry3DLine< Ty > GetRotated(const CFLGeometry3DAxis< Ty > &axisOfRotation, double f64Angle) const
Returns a rotated copy of the line about the specified axis of rotation.
CFLGeometry3DLine< Ty > GetReflected(const CFLGeometry3DCoordinateSystemRH< Ty > &planeOfSymmetry) const
Returns a reflected copy of the line about the specified plane of symmetry.
CFLGeometry3DLine< Ty > GetReflected(const CFLPoint3< Ty > &flp3Pivot) const
Returns a reflected copy of the line about the specified pivot point.
CFLGeometry3DLine< Ty > GetTranslated(const CFLPoint3< Ty > &flp3From, const CFLPoint3< Ty > &flp3To) const
Returns a translated copy of the line. The line is translated by the vector from the start point to t...
const CFLGeometry3DDirection< Ty > * GetDirection() const
Returns the direction of the line.
void Reverse()
Reverses the direction of the line.
const CResult Translate(const CFLPoint3< Ty > &flp3From, const CFLPoint3< Ty > &flp3To)
Translates the line by the vector from the start point to the end point.
CFLGeometry3DLine< Ty > GetScaled(double f64Scale, const CFLPoint3< Ty > &flp3Pivot) const
Returns a scaled copy of the line about the specified pivot point.
CFLGeometry3DLine< Ty > GetReversed() const
Returns a line whose direction is reversed.
const CResult Transform(const CMatrixFor3DTransform< Ty > &trsf)
Applies the specified transformation matrix to the line.
double GetDistance(const CFLPoint3< Ty > &flp3Point) const
Returns the distance between this line and the specified point.
const CResult Reflect(const CFLGeometry3DAxis< Ty > &axisOfSymmetry)
Reflects the line about the specified axis of symmetry.
void SetLocation(const CFLPoint3< Ty > &flp3Origin)
Sets the origin point of the line.
CFLGeometry3DLine(const CFLPoint3< Ty > &flp3Origin, const CFLGeometry3DDirection< Ty > &dir)
Constructs a line from an origin point and a direction.
CFLGeometry3DLine< Ty > GetNormalLine(const CFLPoint3< Ty > &flp3) const
Returns a line that is perpendicular to this line and passes through the specified point.
const CResult Rotate(const CFLGeometry3DAxis< Ty > &axisOfRotation, double f64Angle)
Rotates the line about the specified axis of rotation.
CFLGeometry3DLine< Ty > GetTransformed(const CMatrixFor3DTransform< Ty > &trsf) const
Returns a transformed copy of the line.
CFLGeometry3DLine(const CFLGeometry3DAxis< Ty > &axisPos)
A class representing vector in 3D space which has direction and magnitude.
Definition FLGeometry3DVector.h:33
A class representing a 3D point.
Definition FLPoint3.h:40
A matrix class for 3D transform.
Definition MatrixFor3DTransform.h:40
Definition AlgorithmBase.h:16