diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2007-08-26 17:56:46 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2007-08-26 17:56:46 +0000 |
| commit | 59e792a6ebbacb1ddaba1d9825772a75805cc6ab (patch) | |
| tree | c808a8882712250463c67c7230d60bdd578b5f18 /src/line-geometry.h | |
| parent | Rewrite of z-order code for 3D boxes, first stage (hopefully this is finally ... (diff) | |
| download | inkscape-59e792a6ebbacb1ddaba1d9825772a75805cc6ab.tar.gz inkscape-59e792a6ebbacb1ddaba1d9825772a75805cc6ab.zip | |
Various small cleanups
(bzr r3587)
Diffstat (limited to 'src/line-geometry.h')
| -rw-r--r-- | src/line-geometry.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/line-geometry.h b/src/line-geometry.h index 72e0ae794..fc8f157e9 100644 --- a/src/line-geometry.h +++ b/src/line-geometry.h @@ -31,7 +31,7 @@ public: virtual ~Line() {} Line &operator=(Line const &line); virtual NR::Maybe<NR::Point> intersect(Line const &line); - void set_direction(NR::Point const &dir); // FIXME: Can we avoid this explicit assignment? + inline NR::Point direction () { return v_dir; } NR::Point closest_to(NR::Point const &pt); // returns the point on the line closest to pt @@ -43,6 +43,7 @@ public: return (pt + lambda * NR::unit_vector (v_dir)); } protected: + void set_direction(NR::Point const &dir); inline static bool pts_coincide (NR::Point const pt1, NR::Point const pt2) { return (NR::L2 (pt2 - pt1) < epsilon); @@ -56,6 +57,7 @@ protected: std::pair<double, double> coordinates (NR::Point const &v1, NR::Point const &v2, NR::Point const &w); bool lies_in_sector (NR::Point const &v1, NR::Point const &v2, NR::Point const &w); +bool lies_in_quadrangle (NR::Point const &A, NR::Point const &B, NR::Point const &C, NR::Point const &D, NR::Point const &pt); std::pair<NR::Point, NR::Point> side_of_intersection (NR::Point const &A, NR::Point const &B, NR::Point const &C, NR::Point const &D, NR::Point const &pt, NR::Point const &dir); |
