summaryrefslogtreecommitdiffstats
path: root/src/perspective3d.cpp
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2007-08-26 17:56:46 +0000
committercilix42 <cilix42@users.sourceforge.net>2007-08-26 17:56:46 +0000
commit59e792a6ebbacb1ddaba1d9825772a75805cc6ab (patch)
treec808a8882712250463c67c7230d60bdd578b5f18 /src/perspective3d.cpp
parentRewrite of z-order code for 3D boxes, first stage (hopefully this is finally ... (diff)
downloadinkscape-59e792a6ebbacb1ddaba1d9825772a75805cc6ab.tar.gz
inkscape-59e792a6ebbacb1ddaba1d9825772a75805cc6ab.zip
Various small cleanups
(bzr r3587)
Diffstat (limited to 'src/perspective3d.cpp')
-rw-r--r--src/perspective3d.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/perspective3d.cpp b/src/perspective3d.cpp
index 9f79d25bd..8b1b3863d 100644
--- a/src/perspective3d.cpp
+++ b/src/perspective3d.cpp
@@ -331,6 +331,17 @@ Perspective3D::update_z_orders ()
}
}
+/* the direction from a point pt towards the specified vanishing point of the perspective */
+NR::Point
+Perspective3D::direction (NR::Point pt, Box3D::Axis axis)
+{
+ Box3D::VanishingPoint *vp = this->get_vanishing_point (axis);
+ if (!vp->is_finite()) {
+ return vp->v_dir;
+ }
+ return (vp->get_pos() - pt);
+}
+
// swallow the list of boxes from the other perspective and delete it
void
Perspective3D::absorb (Perspective3D *other)
@@ -385,9 +396,11 @@ Perspective3D::print_debugging_info ()
if (j != NULL) {
g_print ("%d", SP_3DBOX (j->data)->my_counter);
}
+ g_print ("\n");
}
+ g_print ("\n");
}
- g_print ("\n====================================================\n");
+ g_print ("====================================================\n");
}
} // namespace Box3D