ActiveLib
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Friends | List of all members
active::geometry::XPoint Class Reference

#include <XPoint.h>

Inheritance diagram for active::geometry::XPoint:
Inheritance graph
[legend]
Collaboration diagram for active::geometry::XPoint:
Collaboration graph
[legend]

Public Types

enum  Role { target = 0 , blade }
 
using Unique = std::unique_ptr<XPoint>
 Unique pointer.
 
using Shared = std::shared_ptr<XPoint>
 Shared pointer.
 
using Option = std::optional<XPoint>
 Optional.
 
- Public Types inherited from active::geometry::Point
using Unique = std::unique_ptr<Point>
 Unique pointer.
 
using Shared = std::shared_ptr<Point>
 Shared pointer.
 
using Option = std::optional<Point>
 Optional.
 

Public Member Functions

 XPoint (const Point &source=Point(), Position oPos=Point::undefined, Position bPos=Point::undefined)
 
PointclonePtr () const
 
XPointoperator= (const Point &source)
 
auto getInfo (Role role) const
 
auto getPos (Role role) const
 
vertOption getVertex (Role role) const
 
partOption getPart (Role role) const
 
void setInfo (Role role, const XInfo &info)
 
void setPos (Role role, Position pos)
 
void setVertex (Role role, vertOption vertexIndex)
 
void setPart (Role role, partOption partIndex)
 
void swapIntercept ()
 
- Public Member Functions inherited from active::geometry::Point
 Point ()
 
 Point (const double &x, const double &y, const double &z=0.0)
 
 Point (const Point &source2D, double z)
 
virtual ~Point ()=default
 
virtual bool operator== (const Point &ref) const
 
virtual bool operator!= (const Point &ref) const
 
virtual bool operator< (const Point &ref) const
 
Pointoperator= (const Point &source)
 
virtual Point operator+ (const Point &offset) const
 
virtual Pointoperator+= (const Point &offset)
 
virtual Point operator- (const Point &offset) const
 
virtual Pointoperator-= (const Point &offset)
 
virtual Point operator* (const double &mult) const
 
virtual Point operator* (const Matrix3x3 &matrix) const
 
virtual Point operator* (const Matrix4x4 &matrix) const
 
virtual Pointoperator*= (const double &mult)
 
virtual Pointoperator*= (const Matrix3x3 &matrix)
 
virtual Pointoperator*= (const Matrix4x4 &matrix)
 
virtual Point operator/ (const double &mult) const
 
virtual Pointoperator/= (const double &mult)
 
virtual bool isEqual2D (const Point &ref, double prec=math::eps) const
 
virtual bool isEqual3D (const Point &ref, double prec=math::eps) const
 
virtual double lengthFrom2D (const Point &ref) const
 
virtual double lengthFrom3D (const Point &ref) const
 
Point rounded2D (double prec=math::eps) const
 
Point rounded3D (double prec=math::eps) const
 
double azimuthAngleTo (const Point &ref) const
 
double altitudeAngleTo (const Point &ref) const
 
PointmovePolar (double len, double angle)
 
PointmovePolar (double len, double azim, double alt)
 
- Public Member Functions inherited from active::utility::Cloner
virtual ~Cloner ()=default
 

Friends

class XList
 

Additional Inherited Members

- Public Attributes inherited from active::geometry::Point
double x
 X coordinate.
 
double y
 Y coordinate.
 
double z
 Z coordinate.
 

Detailed Description

Class to represent an intersection point

NB: The word "intersection" is generally abbreviated to "X" in class names, e.g. XInfo, XList etc. An intersection in this context is always between just 2 geometric components, e.g. a line and arc. Each component is nominally considered to have a role in the intersection – as if one component is cutting the other – namely blade (the cutting component) and target (the component to be cut). Every function calculating an intersection will clearly identity the role of each component, as will the XList collecting the intersections. Every intersection point will contain 2 XInfo objects that describe its relationship to the blade and target (see the docs for XInfo).

Constructor & Destructor Documentation

◆ XPoint()

XPoint::XPoint ( const Point & source = Point(),
Position oPos = Point::undefined,
Position bPos = Point::undefined )

Constructor

Parameters
sourceThe intersection point
oPosThe relationship of the point to the target
bPosThe relationship of the point to the blade
Here is the caller graph for this function:

Member Function Documentation

◆ clonePtr()

Point * active::geometry::XPoint::clonePtr ( ) const
inlinevirtual

Clone method

Returns
A duplicate of this target

Reimplemented from active::geometry::Point.

Here is the call graph for this function:

◆ getInfo()

auto active::geometry::XPoint::getInfo ( Role role) const
inline

Get relationship of the intersecting point to the specified part

Parameters
roleThe object role
Returns
The relative point position

◆ getPart()

partOption active::geometry::XPoint::getPart ( Role role) const
inline

Get the part index of an intersecting object

Parameters
roleThe object role
Returns
The part index of an intersecting object

◆ getPos()

auto active::geometry::XPoint::getPos ( Role role) const
inline

Get the position of the intersection relative to the specified part

Parameters
roleThe object role
Returns
The position of the intersection relative to the specified part

◆ getVertex()

vertOption active::geometry::XPoint::getVertex ( Role role) const
inline

Get the vertex index of an intersecting object

Parameters
roleThe object role
Returns
The vertex index of an intersecting object

◆ operator=()

XPoint & XPoint::operator= ( const Point & source)

Assignment operator

Parameters
sourceThe object to copy
Returns
A reference to this
Here is the call graph for this function:

◆ setInfo()

void active::geometry::XPoint::setInfo ( Role role,
const XInfo & info )
inline

Set the target intersection specs

Parameters
roleThe target part
infoThe target intersection specs

◆ setPart()

void active::geometry::XPoint::setPart ( Role role,
partOption partIndex )
inline

Set the ID of the intersecting blade object

Parameters
roleThe object role
partIndexThe part index of an intersecting object
Here is the caller graph for this function:

◆ setPos()

void active::geometry::XPoint::setPos ( Role role,
Position pos )
inline

Set the position of the intersection relative to the target

Parameters
roleThe object role
posThe position of the intersection relative to the target
Here is the caller graph for this function:

◆ setVertex()

void active::geometry::XPoint::setVertex ( Role role,
vertOption vertexIndex )
inline

Set the ID of the intersecting target segment

Parameters
roleThe object role
vertexIndexThe vertex index of an intersecting object
Here is the caller graph for this function:

◆ swapIntercept()

void XPoint::swapIntercept ( )

Swap the blade and target intercepts


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