AMCAX Kernel 1.0.0.0
AMCAX::Plane Class Reference

Class of Plane. More...

#include <math/Plane.hpp>

Inheritance diagram for AMCAX::Plane:
Collaboration diagram for AMCAX::Plane:

Public Member Functions

 Plane ()=default
 Default constructor.
 
AMCAX_API Plane (const Frame3 &frame)
 Construct from a local frame, XOY plane. More...
 
AMCAX_API Plane (const Point3 &point, const Direction3 &dir)
 Construct from a point and a direction. More...
 
AMCAX_API Plane (double a, double b, double c, double d)
 Construct from an algebraic representation: ax + by + cz + d = 0. More...
 
AMCAX_API void Coefficients (double &a, double &b, double &c, double &d) const
 Get coefficients of algebraic representation: ax + by + cz + d = 0. More...
 
AMCAX_API void UReverse ()
 Reverse the u parameter.
 
AMCAX_API void VReverse ()
 Reverse the v parameter.
 
AMCAX_API double Distance (const Point3 &point) const
 Compute the distance from a point to the plane. More...
 
AMCAX_API double Distance (const Line3 &line) const
 Compute the distance from a line to the plane. More...
 
AMCAX_API double Distance (const Plane &plane) const
 Compute the distance from another plane to the plane. More...
 
AMCAX_API double SquaredDistance (const Point3 &point) const
 Compute the squared distance from a point to the plane. More...
 
AMCAX_API double SquaredDistance (const Line3 &line) const
 Compute the squared distance from a line to the plane. More...
 
AMCAX_API double SquaredDistance (const Plane &plane) const
 Compute the squared distance from another plane to the plane. More...
 
AMCAX_API bool Contains (const Point3 &point, double tol) const
 Determines whether the plane contains a point under a tolerance or not. More...
 
AMCAX_API bool Contains (const Line3 &line, double distol, double angtol) const
 Determines whether the plane contains a line under a distance tolerance and an angle tolerance. More...
 
- Public Member Functions inherited from AMCAX::SurfaceBase< Plane >
void SetLocation (const Point3 &p)
 Set the location. More...
 
void SetPosition (const Frame3 &frame)
 Set the local frame. More...
 
void SetAxis (const Axis3 &axis)
 Set the main axis (normal axis) of the local frame in 3D. More...
 
Axis3 Axis () const
 Get the main axis (normal axis) More...
 
const Point3Location () const
 Get the location point. More...
 
const Frame3Position () const
 Get the local frame. More...
 
Axis3 XAxis () const
 Get the x axis. More...
 
Axis3 YAxis () const
 Get the y axis. More...
 
bool IsDirect () const
 Determine whether the local frame is right-handed or not. More...
 
PlaneMirror (const Point3 &p)
 Mirror the surface by a point. More...
 
PlaneMirror (const Axis3 &axis)
 Mirror the surface by an axis. More...
 
PlaneMirror (const Frame3 &frame)
 Mirror the surface by a frame. More...
 
Plane Mirrored (const Point3 &p) const
 Get the surface mirrored by a point. More...
 
Plane Mirrored (const Axis3 &axis) const
 Get the surface mirrored by an axis. More...
 
Plane Mirrored (const Frame3 &frame) const
 Get the surface mirrored by a frame. More...
 
PlaneRotate (const Axis3 &axis, double angle)
 Rotate the surface around an axis with an angle in 3D. More...
 
Plane Rotated (const Axis3 &axis, double angle) const
 Get the surface rotated around an axis with an angle in 3D. More...
 
PlaneScale (const Point3 &point, double scale)
 Scale the surface by a center point. More...
 
Plane Scaled (const Point3 &point, double scale) const
 Get the surface scaled by a center point. More...
 
PlaneTransform (const Transformation3 &tr)
 Transform the surface. More...
 
Plane Transformed (const Transformation3 &tr) const
 Get the transformed surface. More...
 
PlaneTranslate (const Vector3 &vec)
 Translate the surface by a vector. More...
 
PlaneTranslate (const Point3 &p1, const Point3 &p2)
 Translate the surface by a vector from a source point to a target point. More...
 
Plane Translated (const Vector3 &vec) const
 Get the surface translated by a vector. More...
 
Plane Translated (const Point3 &p1, const Point3 &p2) const
 Get the surface translated by a vector from a source point to a target point. More...
 

Additional Inherited Members

- Protected Member Functions inherited from AMCAX::SurfaceBase< Plane >
 SurfaceBase ()=default
 Default constructor.
 
 SurfaceBase (const Frame3 &frame)
 Construct from a frame. More...
 
Plane_derived ()
 Cast to derived class. More...
 
const Plane_derived () const
 Cast to derived class. More...
 
- Protected Attributes inherited from AMCAX::SurfaceBase< Plane >
Frame3 pos
 The local coordinate system.
 

Detailed Description

Class of Plane.

Constructor & Destructor Documentation

◆ Plane() [1/3]

AMCAX_API AMCAX::Plane::Plane ( const Frame3 frame)
explicit

Construct from a local frame, XOY plane.

Parameters
frameThe local frame

◆ Plane() [2/3]

AMCAX_API AMCAX::Plane::Plane ( const Point3 point,
const Direction3 dir 
)

Construct from a point and a direction.

Parameters
pointThe point
dirThe direction

◆ Plane() [3/3]

AMCAX_API AMCAX::Plane::Plane ( double  a,
double  b,
double  c,
double  d 
)

Construct from an algebraic representation: ax + by + cz + d = 0.

Parameters
a,b,c,dThe coefficients

Member Function Documentation

◆ Coefficients()

AMCAX_API void AMCAX::Plane::Coefficients ( double &  a,
double &  b,
double &  c,
double &  d 
) const

Get coefficients of algebraic representation: ax + by + cz + d = 0.

Parameters
[out]a,b,c,dThe coefficients

◆ Contains() [1/2]

AMCAX_API bool AMCAX::Plane::Contains ( const Line3 line,
double  distol,
double  angtol 
) const

Determines whether the plane contains a line under a distance tolerance and an angle tolerance.

Parameters
lineThe line
distolThe distance tolerance
angtolThe angle tolerance
Returns
True if the distance from the location point of the line to the plane is under the distance tolerance and the direction of the line is perpendicular to the normal direction of the plane

◆ Contains() [2/2]

AMCAX_API bool AMCAX::Plane::Contains ( const Point3 point,
double  tol 
) const

Determines whether the plane contains a point under a tolerance or not.

Parameters
pointThe point
tolThe distance tolerance
Returns
True if the distance between the point and the plane is under the distance tolerance

◆ Distance() [1/3]

AMCAX_API double AMCAX::Plane::Distance ( const Line3 line) const

Compute the distance from a line to the plane.

Parameters
lineThe line
Returns
The line-plane distance

◆ Distance() [2/3]

AMCAX_API double AMCAX::Plane::Distance ( const Plane plane) const

Compute the distance from another plane to the plane.

Parameters
planeThe other plane
Returns
The plane-plane distance

◆ Distance() [3/3]

AMCAX_API double AMCAX::Plane::Distance ( const Point3 point) const

Compute the distance from a point to the plane.

Parameters
pointThe point
Returns
The point-plane distance

◆ SquaredDistance() [1/3]

AMCAX_API double AMCAX::Plane::SquaredDistance ( const Line3 line) const

Compute the squared distance from a line to the plane.

Parameters
lineThe line
Returns
The squared line-plane distance

◆ SquaredDistance() [2/3]

AMCAX_API double AMCAX::Plane::SquaredDistance ( const Plane plane) const

Compute the squared distance from another plane to the plane.

Parameters
planeThe other plane
Returns
The squared plane-plane distance

◆ SquaredDistance() [3/3]

AMCAX_API double AMCAX::Plane::SquaredDistance ( const Point3 point) const

Compute the squared distance from a point to the plane.

Parameters
pointThe point
Returns
The squared point-plane distance

The documentation for this class was generated from the following file: