Code

Changed preference to use file chooser button
[inkscape.git] / src / box3d-face.h
index 123d4cbbc9025d7253e4ba45af653fa910b94e22..091a8108bb839a1e4b8bb5a383691b365c679567 100644 (file)
@@ -25,35 +25,43 @@ 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(SP3DBox *box, NR::Point &A, NR::Point &B, NR::Point &C, NR::Point &D,
+                           Box3D::Axis plane, Box3D::FrontOrRear rel_pos);
     Box3DFace(Box3DFace const &box3dface);
+    ~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,
+                   Box3D::Axis const dir1, Box3D::Axis const dir2,
                    unsigned int shift_count = 0, NR::Maybe<NR::Point> pt_align = NR::Nothing(),
                    bool align_along_PL = false);
+    ***/
+    void set_corners (NR::Point &A, NR::Point &B, NR::Point &C, NR::Point &D);
+    //void set_face (NR::Point const A, NR::Point const C, Box3D::Axis const dir1, Box3D::Axis const dir2);
     
-    void hook_path_to_3dbox();
+    void hook_path_to_3dbox(SPPath * existing_path = NULL);
+    void set_style(Inkscape::XML::Node *repr_face = NULL, bool extruded = true);
     void set_path_repr();
     void set_curve();
+    inline void lower_to_bottom() { SP_ITEM (path)->lowerToBottom(); }
+    inline void raise_to_top() { SP_ITEM (path)->raiseToTop(); }
+    gchar * axes_string();
     gchar * svg_repr_string();
+    static gint descr_to_id (gchar const *descr);
 
 private:
-    NR::Point corner1;
-    NR::Point corner2;
-    NR::Point corner3;
-    NR::Point corner4;
+    NR::Point *corners[4];
+
+    Box3D::Axis dir1;
+    Box3D::Axis dir2;
 
-    Box3D::PerspDir dir1;
-    Box3D::PerspDir dir2;
+    Box3D::FrontOrRear front_or_rear;
     
     SPPath *path;
-    SP3DBox *parent_box3d; // the parent box
+    SP3DBox *parent_box3d;
 };
 
 #endif