diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2007-06-21 13:01:57 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2007-06-21 13:01:57 +0000 |
| commit | cf233ff5bbc68bd598ef4b81c7b4063548f2eff9 (patch) | |
| tree | 56d48726d21ad368509a945bf7df91966115cc9c /src/box3d-face.h | |
| parent | Fix function plotter for the most common case where there are no transforms a... (diff) | |
| download | inkscape-cf233ff5bbc68bd598ef4b81c7b4063548f2eff9.tar.gz inkscape-cf233ff5bbc68bd598ef4b81c7b4063548f2eff9.zip | |
First (very limited) version of the 3D box tool; allows for drawing of new boxes in a fixed perspective without any live interaction.
(bzr r3084)
Diffstat (limited to 'src/box3d-face.h')
| -rw-r--r-- | src/box3d-face.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/box3d-face.h b/src/box3d-face.h new file mode 100644 index 000000000..123d4cbbc --- /dev/null +++ b/src/box3d-face.h @@ -0,0 +1,59 @@ +#ifndef __SP_3DBOX_FACE_H__ +#define __SP_3DBOX_FACE_H__ + +/* + * Face of a 3D box ('perspectivic rectangle') + * + * Authors: + * Maximilian Albert <Anhalter42@gmx.de> + * + * Copyright (C) 2007 Authors + * + * Released under GNU GPL, read the file 'COPYING' for more information + */ + +#include "perspective-line.h" +#include "display/curve.h" +#include "sp-path.h" +#include "sp-object.h" +#include "inkscape.h" +#include "desktop-style.h" +#include "desktop.h" +#include "xml/document.h" + +class SP3DBox; + +class Box3DFace { +public: + Box3DFace(SP3DBox *box3d); + //Box3DFace(SP3DBox *box3d, NR::Point const ul, NR::Point const lr, + // Box3D::PerspDir const dir1, Box3D::PerspDir const dir2, + // unsigned int shift_count = 0, NR::Maybe<NR::Point> pt_align = NR::Nothing(), bool align_along_PL = false); + Box3DFace(Box3DFace const &box3dface); + NR::Point operator[](unsigned int i); + void draw(SP3DBox *box3d, SPCurve *c); + + void set_shape(NR::Point const ul, NR::Point const lr, + Box3D::PerspDir const dir1, Box3D::PerspDir const dir2, + unsigned int shift_count = 0, NR::Maybe<NR::Point> pt_align = NR::Nothing(), + bool align_along_PL = false); + + void hook_path_to_3dbox(); + void set_path_repr(); + void set_curve(); + gchar * svg_repr_string(); + +private: + NR::Point corner1; + NR::Point corner2; + NR::Point corner3; + NR::Point corner4; + + Box3D::PerspDir dir1; + Box3D::PerspDir dir2; + + SPPath *path; + SP3DBox *parent_box3d; // the parent box +}; + +#endif |
