LibreCAD
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
lc::geo::BezierBase Class Referenceabstract

#include <geobezierbase.h>

Inheritance diagram for lc::geo::BezierBase:
Collaboration diagram for lc::geo::BezierBase:

Public Member Functions

 BezierBase ()
 
virtual ~BezierBase ()
 
virtual const Area boundingBox () const =0
 boundingBox of the bezier More...
 
virtual Coordinate nearestPointOnPath (const Coordinate &coord) const =0
 nearestPointOnPath of the bezier More...
 
virtual Coordinate nearestPointOnEntity (const Coordinate &coord) const =0
 nearestPointOnEntity of the bezier More...
 
virtual Coordinate CasteljauAt (std::vector< Coordinate > points, double t) const =0
 CasteljauAt Coordinate of bezier at time t. More...
 
virtual const std::vector
< Coordinate
getCP () const =0
 getCP Returns the control points of the bezier More...
 
virtual Coordinate DirectValueAt (double t) const =0
 DirectValueAt Coordinate of bezier at time t calculated numerically. More...
 
virtual const std::vector
< Coordinate
Curve (double precession)=0
 Curve Creates a bezier curve for drawing with some precession value. More...
 
virtual const double length () const =0
 length of the Bezier More...
 
virtual const Coordinate tangent (double t) const =0
 tangent of the bezeir More...
 
virtual const Coordinate normal (double t) const =0
 normal of the bezier at time t More...
 
virtual std::vector< BB_CSPtrsplitHalf () const =0
 splitHalf Splits the bezier into two halves. More...
 
virtual BB_CSPtr splitAtT (double t) const =0
 splitAtT Splits bezier at specific time. More...
 
virtual BB_CSPtr offset (const geo::Coordinate &offset) const =0
 offset offsets the bezier. More...
 
virtual BB_CSPtr rotate (const geo::Coordinate &center, double angle) const =0
 rotate the bezier at specific center and some angle More...
 
virtual BB_CSPtr scale (const geo::Coordinate &center, const geo::Coordinate &factor) const =0
 scale the bezier at specific center by some factor More...
 
virtual BB_CSPtr move (const geo::Coordinate &offset) const =0
 move the bezeir by some offset More...
 
virtual BB_CSPtr mirror (const geo::Coordinate &axis1, const geo::Coordinate &axis2) const =0
 mirror a bezier around a line More...
 
virtual void accept (GeoEntityVisitor &v) const override
 
virtual std::vector< double > nearestPointTValue (const Coordinate &coord) const =0
 
virtual const lc::geo::Coordinate returnCasesForNearestPoint (double min_distance, const lc::geo::Coordinate &coord, const Coordinate &ret) const =0
 
- Public Member Functions inherited from lc::geo::Base
virtual ~Base ()=default
 
- Public Member Functions inherited from lc::Visitable
virtual ~Visitable ()=default
 

Detailed Description

Definition at line 18 of file geobezierbase.h.

Constructor & Destructor Documentation

lc::geo::BezierBase::BezierBase ( )
inline

Definition at line 21 of file geobezierbase.h.

21 {}
virtual lc::geo::BezierBase::~BezierBase ( )
inlinevirtual

Definition at line 22 of file geobezierbase.h.

22 {}

Member Function Documentation

virtual void lc::geo::BezierBase::accept ( GeoEntityVisitor v) const
inlineoverridevirtual

Implements lc::Visitable.

Definition at line 143 of file geobezierbase.h.

143 { v.visit(*this); }
virtual const Area lc::geo::BezierBase::boundingBox ( ) const
pure virtual

boundingBox of the bezier

Returns
Area of the bounding box

Implemented in lc::geo::Bezier, and lc::geo::CubicBezier.

virtual Coordinate lc::geo::BezierBase::CasteljauAt ( std::vector< Coordinate points,
double  t 
) const
pure virtual

CasteljauAt Coordinate of bezier at time t.

Parameters
pointsVector of CP of bezier
tTime t
Returns
Coordinate at time t

Implemented in lc::geo::Bezier, and lc::geo::CubicBezier.

virtual const std::vector<Coordinate> lc::geo::BezierBase::Curve ( double  precession)
pure virtual

Curve Creates a bezier curve for drawing with some precession value.

Parameters
precessionof the curve
Returns
Vector of Coordinates to be joined.

Implemented in lc::geo::Bezier, and lc::geo::CubicBezier.

virtual Coordinate lc::geo::BezierBase::DirectValueAt ( double  t) const
pure virtual

DirectValueAt Coordinate of bezier at time t calculated numerically.

Parameters
tTime t
Returns
Coordinate at time t

Implemented in lc::geo::Bezier, and lc::geo::CubicBezier.

virtual const std::vector<Coordinate> lc::geo::BezierBase::getCP ( ) const
pure virtual

getCP Returns the control points of the bezier

Returns
Vector of Coordinates.

Implemented in lc::geo::Bezier, and lc::geo::CubicBezier.

virtual const double lc::geo::BezierBase::length ( ) const
pure virtual

length of the Bezier

Returns
double length

Implemented in lc::geo::Bezier, and lc::geo::CubicBezier.

virtual BB_CSPtr lc::geo::BezierBase::mirror ( const geo::Coordinate axis1,
const geo::Coordinate axis2 
) const
pure virtual

mirror a bezier around a line

Parameters
axis1first coordinate of line to be mirrored about
axis2second coordinate of line to be mirrored about
Returns
mirrored bezier

Implemented in lc::geo::Bezier, and lc::geo::CubicBezier.

virtual BB_CSPtr lc::geo::BezierBase::move ( const geo::Coordinate offset) const
pure virtual

move the bezeir by some offset

Parameters
offsetcoordinate of move
Returns
moved bezier

Implemented in lc::geo::Bezier, and lc::geo::CubicBezier.

virtual Coordinate lc::geo::BezierBase::nearestPointOnEntity ( const Coordinate coord) const
pure virtual

nearestPointOnEntity of the bezier

Parameters
coordCoordinate to be compared with
Returns
Coordinate of nearest point

Implemented in lc::geo::Bezier, and lc::geo::CubicBezier.

virtual Coordinate lc::geo::BezierBase::nearestPointOnPath ( const Coordinate coord) const
pure virtual

nearestPointOnPath of the bezier

Parameters
coordCoordinate to be compared with
Returns
Coordinate of nearest point

Implemented in lc::geo::Bezier, and lc::geo::CubicBezier.

virtual std::vector<double> lc::geo::BezierBase::nearestPointTValue ( const Coordinate coord) const
pure virtual

Implemented in lc::geo::Bezier, and lc::geo::CubicBezier.

virtual const Coordinate lc::geo::BezierBase::normal ( double  t) const
pure virtual

normal of the bezier at time t

Parameters
ttime t
Returns
Coordinate of normal

Implemented in lc::geo::Bezier, and lc::geo::CubicBezier.

virtual BB_CSPtr lc::geo::BezierBase::offset ( const geo::Coordinate offset) const
pure virtual

offset offsets the bezier.

Parameters
offsetoffsect coordinate
Returns
offsetted bezier

Implemented in lc::geo::Bezier, and lc::geo::CubicBezier.

virtual const lc::geo::Coordinate lc::geo::BezierBase::returnCasesForNearestPoint ( double  min_distance,
const lc::geo::Coordinate coord,
const Coordinate ret 
) const
pure virtual

Implemented in lc::geo::Bezier, and lc::geo::CubicBezier.

virtual BB_CSPtr lc::geo::BezierBase::rotate ( const geo::Coordinate center,
double  angle 
) const
pure virtual

rotate the bezier at specific center and some angle

Parameters
centerof rotation
angleof rotation
Returns
rotated bezier

Implemented in lc::geo::Bezier, and lc::geo::CubicBezier.

virtual BB_CSPtr lc::geo::BezierBase::scale ( const geo::Coordinate center,
const geo::Coordinate factor 
) const
pure virtual

scale the bezier at specific center by some factor

Parameters
centerof scale
factorof scale
Returns
Scaled bezier

Implemented in lc::geo::Bezier, and lc::geo::CubicBezier.

virtual BB_CSPtr lc::geo::BezierBase::splitAtT ( double  t) const
pure virtual

splitAtT Splits bezier at specific time.

Parameters
tTime t
Returns
Split bezier.

Implemented in lc::geo::Bezier, and lc::geo::CubicBezier.

virtual std::vector<BB_CSPtr> lc::geo::BezierBase::splitHalf ( ) const
pure virtual

splitHalf Splits the bezier into two halves.

Returns
Vector of two beziers.

Implemented in lc::geo::Bezier, and lc::geo::CubicBezier.

virtual const Coordinate lc::geo::BezierBase::tangent ( double  t) const
pure virtual

tangent of the bezeir

Parameters
ttime T
Returns
Coordinate of tangent

Implemented in lc::geo::Bezier, and lc::geo::CubicBezier.


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