summaryrefslogtreecommitdiffstats
path: root/src/persp3d.h
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2008-01-08 22:39:39 +0000
committercilix42 <cilix42@users.sourceforge.net>2008-01-08 22:39:39 +0000
commit99a24a7bc1bf68cbbe68059516e9da805788c883 (patch)
treeb44f6800207c5f3083f9d7b3c700a1ffe3e2a82a /src/persp3d.h
parentFix LP #181020: When snapping a guide, now only the part of the guide near th... (diff)
downloadinkscape-99a24a7bc1bf68cbbe68059516e9da805788c883.tar.gz
inkscape-99a24a7bc1bf68cbbe68059516e9da805788c883.zip
Enable 3D box toolbar
(bzr r4436)
Diffstat (limited to 'src/persp3d.h')
-rw-r--r--src/persp3d.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/persp3d.h b/src/persp3d.h
index c74af2e29..ce4587f62 100644
--- a/src/persp3d.h
+++ b/src/persp3d.h
@@ -23,8 +23,9 @@
#include <map>
#include "sp-item.h"
#include "transf_mat_3x4.h"
+#include "document.h"
+#include "inkscape.h"
-class SPDocument;
class SPBox3D;
class Box3DContext;
@@ -49,7 +50,12 @@ struct Persp3DClass {
GType persp3d_get_type (void);
// FIXME: Make more of these inline!
-inline Proj::Pt2 persp3d_get_VP (Persp3D *persp, Proj::Axis axis) { return persp->tmat.column(axis); }
+inline Persp3D * persp3d_get_from_repr (Inkscape::XML::Node *repr) {
+ return SP_PERSP3D(SP_ACTIVE_DOCUMENT->getObjectByRepr(repr));
+}
+inline Proj::Pt2 persp3d_get_VP (Persp3D *persp, Proj::Axis axis) {
+ return persp->tmat.column(axis);
+}
NR::Point persp3d_get_PL_dir_from_pt (Persp3D *persp, NR::Point const &pt, Proj::Axis axis); // convenience wrapper around the following two
NR::Point persp3d_get_finite_dir (Persp3D *persp, NR::Point const &pt, Proj::Axis axis);
NR::Point persp3d_get_infinite_dir (Persp3D *persp, Proj::Axis axis);