AngelCAD  1.5-00
Public Member Functions | List of all members
line3d Class Reference

3d line More...

#include <angelcad.h>

Public Member Functions

 line3d (const pos3d@ p1, const pos3d@ p2)
 Construct line segment from p1 to p2. More...
 
double length () const
 Compute length of line segment. More...
 
double project (pos3d@ point) const
 Project point onto line and return line parameter of projetion point. More...
 
pos3dend1 () const
 Return 1st end point on line segment. More...
 
pos3dend2 () const
 Return 2nd end point on line segment. More...
 
pos3dinterpolate (double par) const
 Compute point on (infinite) line given line segment parameter (0=end1, 1=end2) More...
 

Detailed Description

3d line

Constructor & Destructor Documentation

◆ line3d()

line3d::line3d ( const pos3d p1,
const pos3d p2 
)

Construct line segment from p1 to p2.

Parameters
p1pos3d@, start point on line segment, corresponding to parameter=0.0
p2pos3d@, end point on line segment, corresponding to parameter=1.0

Member Function Documentation

◆ end1()

pos3d@ line3d::end1 ( ) const

Return 1st end point on line segment.

Returns
pos3d@

◆ end2()

pos3d@ line3d::end2 ( ) const

Return 2nd end point on line segment.

Returns
pos3d@

◆ interpolate()

pos3d@ line3d::interpolate ( double  par) const

Compute point on (infinite) line given line segment parameter (0=end1, 1=end2)

Parameters
pardouble, Line parameter value
Returns
pos3d@

◆ length()

double line3d::length ( ) const

Compute length of line segment.

Returns
double

◆ project()

double line3d::project ( pos3d point) const

Project point onto line and return line parameter of projetion point.

Parameters
pointpos3d@, Point to be projected onto (infinite) line
Returns
double

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