Code

More meaningful name for 3D axis directions
[inkscape.git] / src / box3d-face.h
1 #ifndef __SP_3DBOX_FACE_H__
2 #define __SP_3DBOX_FACE_H__
4 /*
5  * Face of a 3D box ('perspectivic rectangle')
6  *
7  * Authors:
8  *   Maximilian Albert <Anhalter42@gmx.de>
9  *
10  * Copyright (C) 2007      Authors
11  *
12  * Released under GNU GPL, read the file 'COPYING' for more information
13  */
15 #include "perspective-line.h"
16 #include "display/curve.h"
17 #include "sp-path.h"
18 #include "sp-object.h"
19 #include "inkscape.h"
20 #include "desktop-style.h"
21 #include "desktop.h"
22 #include "xml/document.h"
24 class SP3DBox;
26 class Box3DFace {
27 public:
28     Box3DFace(SP3DBox *box3d);
29     //Box3DFace(SP3DBox *box3d, NR::Point const ul, NR::Point const lr,
30     //          Box3D::Axis const dir1, Box3D::Axis const dir2,
31     //          unsigned int shift_count = 0, NR::Maybe<NR::Point> pt_align = NR::Nothing(), bool align_along_PL = false);
32     Box3DFace(Box3DFace const &box3dface);
33     NR::Point operator[](unsigned int i);
34     void draw(SP3DBox *box3d, SPCurve *c);
36     void set_shape(NR::Point const ul, NR::Point const lr,
37                    Box3D::Axis const dir1, Box3D::Axis const dir2,
38                    unsigned int shift_count = 0, NR::Maybe<NR::Point> pt_align = NR::Nothing(),
39                    bool align_along_PL = false);
40     
41     void hook_path_to_3dbox();
42     void set_path_repr();
43     void set_curve();
44     gchar * svg_repr_string();
46 private:
47     NR::Point corners[4];
49     Box3D::Axis dir1;
50     Box3D::Axis dir2;
51     
52     SPPath *path;
53     SP3DBox *parent_box3d; // the parent box
54 };
56 #endif