diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2007-08-06 00:07:25 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2007-08-06 00:07:25 +0000 |
| commit | ea6e0e4d2cd55a2b851a8504a68afff34fc6a683 (patch) | |
| tree | a5529ebcf86551413491b721ab9328d08c6ad1df /src/perspective3d.h | |
| parent | Filter effects dialog: (diff) | |
| download | inkscape-ea6e0e4d2cd55a2b851a8504a68afff34fc6a683.tar.gz inkscape-ea6e0e4d2cd55a2b851a8504a68afff34fc6a683.zip | |
Store a global list of existing perspectives; for each perspective hold a list of associated boxes; explicitly pass perspectives as arguments when creating PLs
(bzr r3380)
Diffstat (limited to 'src/perspective3d.h')
| -rw-r--r-- | src/perspective3d.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/perspective3d.h b/src/perspective3d.h index 007b02df1..fa9eda65f 100644 --- a/src/perspective3d.h +++ b/src/perspective3d.h @@ -14,26 +14,38 @@ #include "vanishing-point.h" -namespace Box3D { +class SP3DBox; -NR::Point perspective_intersection (NR::Point pt1, Box3D::Axis dir1, NR::Point pt2, Box3D::Axis dir2); -NR::Point perspective_line_snap (NR::Point pt, Box3D::Axis dir, NR::Point ext_pt); +namespace Box3D { class PerspectiveLine; class Perspective3D { public: Perspective3D(VanishingPoint const &pt_x, VanishingPoint const &pt_y, VanishingPoint const &pt_z); + ~Perspective3D(); VanishingPoint *get_vanishing_point (Box3D::Axis const dir); void set_vanishing_point (Box3D::Axis const dir, VanishingPoint const &pt); + void add_box (SP3DBox *box); + void remove_box (const SP3DBox *box); + bool has_box (const SP3DBox *box); + + static Perspective3D * current_perspective; // should current_perspective be moved to desktop.h? + + SPDesktop * desktop; // we need to store the perspective's desktop to be able to access it in the destructor private: VanishingPoint vp_x; VanishingPoint vp_y; VanishingPoint vp_z; + GSList * boxes; // holds a list of boxes sharing this specific perspective }; +Perspective3D * get_persp_of_box (const SP3DBox *box); + +NR::Point perspective_intersection (NR::Point pt1, Box3D::Axis dir1, NR::Point pt2, Box3D::Axis dir2, Perspective3D *persp); +NR::Point perspective_line_snap (NR::Point pt, Box3D::Axis dir, NR::Point ext_pt, Perspective3D *persp); } // namespace Box3D |
