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  

Members detail  

VectorPair()  

No documentation available

VectorPair(const VectorPairBase<2> &vp)  

No documentation available

VectorPair(const Vector<2> &a, const Vector<2> &b)  

No documentation available

VectorPair(double ax, double ay, double bx, double by)  

No documentation available

template <int N> VectorPair(const VectorPairBase<N> &v, unsigned int c0, unsigned int c1)  

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.

double x0() const  

Get vector pair component

double & x0()  

Get vector pair component

double x1() const  

Get vector pair component

double & x1()  

Get vector pair component

double y0() const  

Get vector pair component

double & y0()  

Get vector pair component

double y1() const  

Get vector pair component

double & y1()  

Get vector pair component

Valid XHTML 1.0 StrictGenerated by diaxen on Sun Jan 8 00:47:24 2012 using MkDoc