Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Geom::Ray Class Reference

Straight ray from a specific point to infinity. More...

#include <ray.h>

Public Member Functions

 Ray ()
 
 Ray (Point const &origin, Coord angle)
 
 Ray (Point const &A, Point const &B)
 
Point origin () const
 
Point vector () const
 
Point versor () const
 
void setOrigin (Point const &o)
 
void setVector (Point const &v)
 
Coord angle () const
 
void setAngle (Coord a)
 
void setPoints (Point const &a, Point const &b)
 
bool isDegenerate () const
 
Point pointAt (Coord t) const
 
Coord valueAt (Coord t, Dim2 d) const
 
std::vector< Coordroots (Coord v, Dim2 d) const
 
Coord nearestTime (Point const &point) const
 
Ray reverse () const
 
Curveportion (Coord f, Coord t) const
 
LineSegment segment (Coord f, Coord t) const
 
Ray transformed (Affine const &m) const
 

Private Attributes

Point _origin
 
Point _vector
 

Detailed Description

Straight ray from a specific point to infinity.

Rays are "half-lines" - they begin at some specific point and extend in a straight line to infinity.

Definition at line 53 of file ray.h.

Constructor & Destructor Documentation

◆ Ray() [1/3]

Geom::Ray::Ray ( )
inline

Definition at line 59 of file ray.h.

Referenced by transformed().

◆ Ray() [2/3]

Geom::Ray::Ray ( Point const &  origin,
Coord  angle 
)
inline

Definition at line 60 of file ray.h.

References _vector, angle(), Geom::sincos(), Geom::X, and Geom::Y.

◆ Ray() [3/3]

Geom::Ray::Ray ( Point const &  A,
Point const &  B 
)
inline

Definition at line 65 of file ray.h.

References setPoints().

Member Function Documentation

◆ angle()

◆ isDegenerate()

bool Geom::Ray::isDegenerate ( ) const
inline

Definition at line 83 of file ray.h.

References _vector, Geom::X, and Geom::Y.

Referenced by nearestTime(), and wrap_ray().

◆ nearestTime()

Coord Geom::Ray::nearestTime ( Point const &  point) const
inline

Definition at line 102 of file ray.h.

References _origin, _vector, Geom::dot(), and isDegenerate().

Referenced by Geom::distance(), and wrap_ray().

◆ origin()

Point Geom::Ray::origin ( ) const
inline

◆ pointAt()

Point Geom::Ray::pointAt ( Coord  t) const
inline

Definition at line 86 of file ray.h.

References _origin, and _vector.

Referenced by Geom::distance(), draw_ray(), portion(), segment(), SPMeshNodeArray::side_arc(), and wrap_ray().

◆ portion()

Curve * Geom::Ray::portion ( Coord  f,
Coord  t 
) const
inline

Definition at line 114 of file ray.h.

References pointAt().

◆ reverse()

Ray Geom::Ray::reverse ( ) const
inline

Definition at line 108 of file ray.h.

References _origin, _vector, result, and setOrigin().

Referenced by Geom::make_angle_bisector_ray(), and wrap_ray().

◆ roots()

std::vector< Coord > Geom::Ray::roots ( Coord  v,
Dim2  d 
) const
inline

Definition at line 92 of file ray.h.

References _origin, _vector, and result.

Referenced by wrap_ray().

◆ segment()

LineSegment Geom::Ray::segment ( Coord  f,
Coord  t 
) const
inline

Definition at line 117 of file ray.h.

References pointAt().

Referenced by wrap_ray().

◆ setAngle()

void Geom::Ray::setAngle ( Coord  a)
inline

Definition at line 74 of file ray.h.

References _vector, Geom::sincos(), Geom::X, and Geom::Y.

◆ setOrigin()

void Geom::Ray::setOrigin ( Point const &  o)
inline

Definition at line 71 of file ray.h.

References _origin.

Referenced by Geom::Line::ray(), and reverse().

◆ setPoints()

◆ setVector()

void Geom::Ray::setVector ( Point const &  v)
inline

Definition at line 72 of file ray.h.

References _vector.

◆ transformed()

Ray Geom::Ray::transformed ( Affine const &  m) const
inline

Definition at line 120 of file ray.h.

References _origin, _vector, and Ray().

Referenced by wrap_ray().

◆ valueAt()

Coord Geom::Ray::valueAt ( Coord  t,
Dim2  d 
) const
inline

Definition at line 89 of file ray.h.

References _origin, and _vector.

Referenced by wrap_ray().

◆ vector()

◆ versor()

Point Geom::Ray::versor ( ) const
inline

Definition at line 70 of file ray.h.

References _vector, and Geom::Point::normalized().

Member Data Documentation

◆ _origin

Point Geom::Ray::_origin
private

Definition at line 55 of file ray.h.

Referenced by nearestTime(), origin(), pointAt(), reverse(), roots(), setOrigin(), setPoints(), transformed(), and valueAt().

◆ _vector

Point Geom::Ray::_vector
private

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