summaryrefslogtreecommitdiffstats
path: root/src/box3d-face.cpp
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2007-07-03 18:32:33 +0000
committercilix42 <cilix42@users.sourceforge.net>2007-07-03 18:32:33 +0000
commitc8d37a3237bab10c1e5fbc8c248857063b4907e2 (patch)
tree040f0739f5c52b142f83b2373d79301717ae718b /src/box3d-face.cpp
parentSwap axis directions Y and Z (for consistency) (diff)
downloadinkscape-c8d37a3237bab10c1e5fbc8c248857063b4907e2.tar.gz
inkscape-c8d37a3237bab10c1e5fbc8c248857063b4907e2.zip
Make 3D axes correspond to places in binary representation (allows for more generic code)
(bzr r3168)
Diffstat (limited to 'src/box3d-face.cpp')
-rw-r--r--src/box3d-face.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/box3d-face.cpp b/src/box3d-face.cpp
index 13e19d769..8b3b5d968 100644
--- a/src/box3d-face.cpp
+++ b/src/box3d-face.cpp
@@ -30,13 +30,7 @@ void Box3DFace::set_shape(NR::Point const ul, NR::Point const lr,
corners[2] = lr;
} else {
if (align_along_PL) {
- Box3D::PerspDir dir3;
- if (dir1 == Box3D::X && dir2 == Box3D::Z) dir3 = Box3D::Y;
- if (dir1 == Box3D::X && dir2 == Box3D::Y) dir3 = Box3D::Z;
- if (dir1 == Box3D::Z && dir2 == Box3D::X) dir3 = Box3D::Y;
- if (dir1 == Box3D::Z && dir2 == Box3D::Y) dir3 = Box3D::X;
- if (dir1 == Box3D::Y && dir2 == Box3D::X) dir3 = Box3D::Z;
- if (dir1 == Box3D::Y && dir2 == Box3D::Z) dir3 = Box3D::X;
+ Box3D::PerspDir dir3 = Box3D::third_axis_direction (dir1, dir2);
Box3D::Line line1(*SP3DBoxContext::current_perspective->get_vanishing_point(dir1), lr);
Box3D::Line line2(*pt_align, *SP3DBoxContext::current_perspective->get_vanishing_point(dir3));
corners[2] = *line1.intersect(line2);