Math::VectorPair<2> struct reference
[Core module]
Declaration
#include <Goptical/Math/VectorPair>
namespace Goptical {
namespace Math {
template <> struct VectorPair<2>;
};
};
This struct is a member of the Math namespace.
This struct is a specialization of VectorPair.
Description
This class hold two 2d vectors.
See also VectorPair2 typedef.
Members
See also the full member list section for this struct.
Functions
- VectorPair()
- VectorPair(const VectorPairBase<2> &vp)
- VectorPair(const Vector<2> &a, const Vector<2> &b)
- VectorPair(double ax, double ay, double bx, double by)
- template VectorPair(const VectorPairBase<N> &v, unsigned int c0, unsigned int c1)
- Vector<N> & direction()
- const Vector<N> & direction() const
- Vector<2> ln_intersect_ln(const VectorPair<2> &line) const
- double ln_intersect_ln_scale(const VectorPair<2> &line) const
- Vector<N> ln_pt_clst_pt(const Vector<N> &point) const
- double ln_pt_clst_pt_scale(const Vector<N> &point) const
- Vector<N> & normal()
- const Vector<N> & normal() const
- VectorPairBase<2> operator*(double factor)
- const VectorPairBase<2> & operator+=(const VectorPairBase<2> &p)
- const Vector<N> & operator[](int n) const
- Vector<N> & operator[](int n)
- Vector<N> & origin()
- const Vector<N> & origin() const
- template Vector<2> seg_intersect_seg(const VectorPair<2> &segment) const
- Vector<N> seg_pt_clst_pt(const Vector<N> &point) const
- double seg_pt_clst_pt_scale(const Vector<N> &point) const
- double x0() const
- double & x0()
- double x1() const
- double & x1()
- double y0() const
- double & y0()
- double y1() const
- double & y1()
Members detail
No documentation available
No documentation available
No documentation available
No documentation available
Create a 2d vector pair and initialize vectors from specified components of vectors from an other pair.
Vector<2> ln_intersect_ln(const VectorPair<2> &line) const
Consider the VectorPair as a line with origin and direction vectors and find the intersection point with an other line.
The return value is position of the intersection point. this function throws if lines are almost parallel.
See also ln_intersect_ln_scale function.
double ln_intersect_ln_scale(const VectorPair<2> &line) const
Consider the VectorPair as a line with origin and direction vectors and find the intersection point with an other line.
The return value is scale factor of the direction vector from line origin. this function throws if lines are almost parallel.
See also ln_intersect_ln function.
template <bool infinite_1st, bool infinite_2nd> Vector<2> seg_intersect_seg(const VectorPair<2> &segment) const
Consider the VectorPair as a segment with two point vectors and find the intersection point with an other segment.
The return value is position of the intersection point.
The infinite_1st and infinite_2nd template parameters can be used to disable point-in-segment tests for each segments. this template function throws if lines are almost parallel or if intersection point lies outside segment and associated test is enabled.
Get vector pair component
Get vector pair component
Get vector pair component
Get vector pair component
Get vector pair component
Get vector pair component
Get vector pair component
Get vector pair component