summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bfbe1a1)
raw | patch | inline | side by side (parent: bfbe1a1)
author | cilix42 <cilix42@users.sourceforge.net> | |
Mon, 20 Aug 2007 12:53:40 +0000 (12:53 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Mon, 20 Aug 2007 12:53:40 +0000 (12:53 +0000) |
src/box3d.cpp | patch | blob | history | |
src/line-geometry.h | patch | blob | history | |
src/object-edit.cpp | patch | blob | history | |
src/perspective3d.cpp | patch | blob | history |
diff --git a/src/box3d.cpp b/src/box3d.cpp
index b0195cdb8918d76c1fdd612d64023ff225f31ce5..dcbe5b531ab3abc057f43f6afa23b1d110498ef0 100644 (file)
--- a/src/box3d.cpp
+++ b/src/box3d.cpp
{
guint new_z_orders[6];
- Box3D::Perspective3D *persp = SP_OBJECT_DOCUMENT (G_OBJECT (box))->get_persp_of_box (box);
-
// TODO: Determine the front corner depending on the distance from VPs and/or the user presets
guint front_corner = sp_3dbox_get_front_corner_id (box);
gdouble dir_3x = sp_3dbox_corner_angle_to_VP (box, Box3D::X, front_corner ^ Box3D::Y);
gdouble dir_1y = sp_3dbox_corner_angle_to_VP (box, Box3D::Y, front_corner);
- gdouble dir_0y = sp_3dbox_corner_angle_to_VP (box, Box3D::Y, front_corner ^ Box3D::X);
+ //gdouble dir_0y = sp_3dbox_corner_angle_to_VP (box, Box3D::Y, front_corner ^ Box3D::X);
gdouble dir_1z = sp_3dbox_corner_angle_to_VP (box, Box3D::Z, front_corner);
gdouble dir_3z = sp_3dbox_corner_angle_to_VP (box, Box3D::Z, front_corner ^ Box3D::Y);
void sp_3dbox_set_z_orders (SP3DBox *box)
{
- GSList *items = sp_item_group_item_list(SP_GROUP(box));
-
// For efficiency reasons, we only set the new z-orders if something really changed
if (sp_3dbox_recompute_z_orders (box)) {
box->faces[box->z_orders[0]]->lower_to_bottom ();
@@ -822,7 +818,6 @@ void sp_3dbox_recompute_XY_corners_from_new_center (SP3DBox *box, NR::Point cons
Box3D::PerspectiveLine aux_line4 (new_center, Box3D::Z, persp);
NR::Point M2 = aux_line4.meet (aux_line3);
- Box3D::VanishingPoint *vp_y = persp->get_vanishing_point (Box3D::Y);
std::pair<NR::Point, NR::Point> other_new_midpts = sp_3dbox_new_midpoints (persp, Box3D::Y, M1, M2, C1, D1);
NR::Point C2 (other_new_midpts.first);
NR::Point D2 (other_new_midpts.second);
@@ -890,6 +885,9 @@ void sp_3dbox_corners_for_perspective_lines (const SP3DBox * box, Box3D::Axis ax
corner3 = sp_3dbox_get_corner_along_edge (box, 0 ^ switch_axis, axis, Box3D::REAR);
corner4 = sp_3dbox_get_corner_along_edge (box, 2 ^ switch_axis, axis, Box3D::REAR);
break;
+ default:
+ // do nothing
+ break;
}
}
diff --git a/src/line-geometry.h b/src/line-geometry.h
index cc0c9aaf4dff86988a8d177c8381bfd0e74e7ee2..72e0ae794afcba9655ed633c761fcf6bae10cccc 100644 (file)
--- a/src/line-geometry.h
+++ b/src/line-geometry.h
public:
Line(NR::Point const &start, NR::Point const &vec, bool is_endpoint = true);
Line(Line const &line);
+ virtual ~Line() {}
Line &operator=(Line const &line);
virtual NR::Maybe<NR::Point> intersect(Line const &line);
void set_direction(NR::Point const &dir); // FIXME: Can we avoid this explicit assignment?
diff --git a/src/object-edit.cpp b/src/object-edit.cpp
index 765f903037ec1ea6a1135df2f301458b559515e7..2ebb2a0651bb797bb95bfffb7b9b34d11e885753 100644 (file)
--- a/src/object-edit.cpp
+++ b/src/object-edit.cpp
@@ -545,6 +545,7 @@ static inline Box3D::Axis movement_axis_of_3dbox_corner (guint corner, guint sta
case 7:
return ((state & GDK_SHIFT_MASK) ? Box3D::XY : Box3D::Z);
}
+ return Box3D::NONE;
}
/*
diff --git a/src/perspective3d.cpp b/src/perspective3d.cpp
index c9c56e78dbdeed03f9a75a194da6f48735dc2520..e2b9fcbc212a1942967ac190051aab280031c3f9 100644 (file)
--- a/src/perspective3d.cpp
+++ b/src/perspective3d.cpp
case Z:
(*vp_z) = pt;
break;
- case NONE:
+ default:
// no vanishing point to set
break;
}
@@ -205,7 +205,7 @@ Perspective3D::set_vanishing_point (Box3D::Axis const dir, gdouble pt_x, gdouble
case Z:
vp = vp_z;
break;
- case NONE:
+ default:
// no vanishing point to set
return;
}