diff --git a/src/vanishing-point.h b/src/vanishing-point.h
index cc11f9749e643a1be07e844ea2d01de3f801ee80..e6c106481f0063d625c8129a59245c5792a0dcee 100644 (file)
--- a/src/vanishing-point.h
+++ b/src/vanishing-point.h
#define SEEN_VANISHING_POINT_H
#include "libnr/nr-point.h"
-#include "line-geometry.h"
+#include "axis-manip.h"
+
+#include "line-geometry.h" // TODO: Remove this include as soon as we don't need create_canvas_(point|line) any more.
namespace Box3D {
VP_INFINITE // perspective lines are parallel
};
-// The X-/Y-/Z-axis corresponds to the first/second/third digit
-// in binary representation, respectively.
-enum Axis {
- X = 1,
- Y = 2,
- Z = 4,
- XY = 3,
- XZ = 5,
- YZ = 6,
- XYZ = 7,
- NONE = 0
-};
-
-
-inline bool is_single_axis_direction (Box3D::Axis dir) {
- // tests whether dir is nonzero and a power of 2
- return (!(dir & (dir - 1)) && dir);
-}
-
-/** Given two axis directions out of {X, Y, Z}, returns the remaining one */
-inline Box3D::Axis third_axis_direction (Box3D::Axis dir1, Box3D::Axis dir2) {
- return (Box3D::Axis) ((dir1 + dir2) ^ 0x7);
-}
-
-/* returns the first axis direction occuring in the (possibly compound) expression 'dirs' */
-inline Box3D::Axis extract_single_axis_direction (Box3D::Axis dirs) {
- if (dirs & Box3D::X) return Box3D::X;
- if (dirs & Box3D::Y) return Box3D::Y;
- if (dirs & Box3D::Z) return Box3D::Z;
- return Box3D::NONE;
-}
-
-/* returns an axis direction perpendicular to the ones occuring in the (possibly compound) expression 'dirs' */
-inline Box3D::Axis get_perpendicular_axis_direction (Box3D::Axis dirs) {
- if (!(dirs & Box3D::X)) return Box3D::X;
- if (!(dirs & Box3D::Y)) return Box3D::Y;
- if (!(dirs & Box3D::Z)) return Box3D::Z;
- return Box3D::NONE;
-}
-
-
// FIXME: Store the Axis of the VP inside the class
class VanishingPoint : public NR::Point {
public: