Lines Matching refs:Box3D

49     this->swapped = Box3D::NONE;
300 return Proj::Pt3 ((id & Box3D::X) ? c7[Proj::X] : c0[Proj::X],
301 (id & Box3D::Y) ? c7[Proj::Y] : c0[Proj::Y],
302 (id & Box3D::Z) ? c7[Proj::Z] : c0[Proj::Z],
308 return Proj::Pt3 ((id & Box3D::X) ? box->orig_corner7[Proj::X] : box->orig_corner0[Proj::X],
309 (id & Box3D::Y) ? box->orig_corner7[Proj::Y] : box->orig_corner0[Proj::Y],
310 (id & Box3D::Z) ? box->orig_corner7[Proj::Z] : box->orig_corner0[Proj::Z],
384 Box3D::Line pl1(A, B);
385 Box3D::Line pl2(A, D);
386 Box3D::Line diag1(A, (id == -1 || (!(id & Box3D::X) == !(id & Box3D::Y))) ? C : E);
387 Box3D::Line diag2(A, E); // diag2 is only taken into account if id equals -1, i.e., if we are snapping the center
450 box3d_set_corner (SPBox3D *box, const guint id, Geom::Point const &new_pos, const Box3D::Axis movement, bool constrained) {
451 g_return_if_fail ((movement != Box3D::NONE) && (movement != Box3D::XYZ));
457 if (!(movement & Box3D::Z)) {
467 box->orig_corner0 = Proj::Pt3 ((id & Box3D::X) ? box->save_corner0[Proj::X] : pt_proj[Proj::X],
468 (id & Box3D::Y) ? box->save_corner0[Proj::Y] : pt_proj[Proj::Y],
471 box->orig_corner7 = Proj::Pt3 ((id & Box3D::X) ? pt_proj[Proj::X] : box->save_corner7[Proj::X],
472 (id & Box3D::Y) ? pt_proj[Proj::Y] : box->save_corner7[Proj::Y],
478 Box3D::PerspectiveLine pl(persp_impl->tmat.image(
483 box3d_get_proj_corner (box, id)[(movement & Box3D::Y) ? Proj::X : Proj::Y],
484 (movement & Box3D::Y) ? Proj::X : Proj::Y));
485 bool corner0_move_x = !(id & Box3D::X) && (movement & Box3D::X);
486 bool corner0_move_y = !(id & Box3D::Y) && (movement & Box3D::Y);
487 bool corner7_move_x = (id & Box3D::X) && (movement & Box3D::X);
488 bool corner7_move_y = (id & Box3D::Y) && (movement & Box3D::Y);
493 (id & Box3D::Z) ? box->orig_corner0[Proj::Z] : pt_proj[Proj::Z],
497 (id & Box3D::Z) ? pt_proj[Proj::Z] : box->orig_corner7[Proj::Z],
503 void box3d_set_center (SPBox3D *box, Geom::Point const &new_pos, Geom::Point const &old_pos, const Box3D::Axis movement, bool constrained) {
504 g_return_if_fail ((movement != Box3D::NONE) && (movement != Box3D::XYZ));
510 if (!(movement & Box3D::Z)) {
523 box->orig_corner0 = Proj::Pt3 ((movement & Box3D::X) ? pt_proj[Proj::X] - radx : box->orig_corner0[Proj::X],
524 (movement & Box3D::Y) ? pt_proj[Proj::Y] - rady : box->orig_corner0[Proj::Y],
527 box->orig_corner7 = Proj::Pt3 ((movement & Box3D::X) ? pt_proj[Proj::X] + radx : box->orig_corner7[Proj::X],
528 (movement & Box3D::Y) ? pt_proj[Proj::Y] + rady : box->orig_corner7[Proj::Y],
535 Box3D::PerspectiveLine pl(old_pos, Proj::Z, persp);
648 Box3D::PerspectiveLine l1(box3d_get_corner_screen(box, 3, false), Proj::X, persp);
649 Box3D::PerspectiveLine l2(box3d_get_corner_screen(box, 3, false), Proj::Y, persp);
681 box3d_set_new_z_orders_case0 (SPBox3D *box, int z_orders[6], Box3D::Axis central_axis) {
685 case Box3D::X:
692 case Box3D::Y:
699 case Box3D::Z:
706 case Box3D::NONE:
721 box3d_set_new_z_orders_case1 (SPBox3D *box, int z_orders[6], Box3D::Axis central_axis, Box3D::Axis fin_axis) {
723 Geom::Point vp(persp3d_get_VP(persp, Box3D::toProj(fin_axis)).affine());
726 Box3D::Axis oaxis1 = Box3D::get_remaining_axes(fin_axis).first;
727 Box3D::Axis oaxis2 = Box3D::get_remaining_axes(fin_axis).second;
736 case Box3D::X:
743 case Box3D::Y:
756 case Box3D::Z:
778 case Box3D::NONE:
792 box3d_set_new_z_orders_case2 (SPBox3D *box, int z_orders[6], Box3D::Axis central_axis, Box3D::Axis /*infinite_axis*/) {
797 int insidexy = box3d_VP_lies_in_PL_sector (box, Proj::X, 3, 3 ^ Box3D::Z, Box3D::Y);
798 //int insidexz = box3d_VP_lies_in_PL_sector (box, Proj::X, 3, 3 ^ Box3D::Y, Box3D::Z);
800 int insideyx = box3d_VP_lies_in_PL_sector (box, Proj::Y, 3, 3 ^ Box3D::Z, Box3D::X);
801 int insideyz = box3d_VP_lies_in_PL_sector (box, Proj::Y, 3, 3 ^ Box3D::X, Box3D::Z);
803 //int insidezx = box3d_VP_lies_in_PL_sector (box, Proj::Z, 3, 3 ^ Box3D::Y, Box3D::X);
804 int insidezy = box3d_VP_lies_in_PL_sector (box, Proj::Z, 3, 3 ^ Box3D::X, Box3D::Y);
807 case Box3D::X:
832 case Box3D::Y:
847 case Box3D::Z:
860 case Box3D::NONE:
877 static Box3D::Axis
879 Box3D::Axis ev = Box3D::NONE;
885 ev = (Box3D::Axis) (ev ^ Box3D::X);
887 ev = (Box3D::Axis) (ev ^ Box3D::Y);
889 ev = (Box3D::Axis) (ev ^ Box3D::Z);
895 box3d_swap_sides(int z_orders[6], Box3D::Axis axis) {
900 if (!(Box3D::int_to_face(z_orders[i]) & axis)) {
931 Box3D::Axis axis_finite = Box3D::NONE;
932 Box3D::Axis axis_infinite = Box3D::NONE;
935 dirs[i] = persp3d_get_PL_dir_from_pt(persp, c3, Box3D::toProj(Box3D::axes[i]));
938 axis_finite = Box3D::axes[i];
940 axis_infinite = Box3D::axes[i];
945 Box3D::Axis central_axis = Box3D::NONE;
946 if(Box3D::lies_in_sector(dirs[0], dirs[1], dirs[2])) {
947 central_axis = Box3D::Z;
948 } else if(Box3D::lies_in_sector(dirs[1], dirs[2], dirs[0])) {
949 central_axis = Box3D::X;
950 } else if(Box3D::lies_in_sector(dirs[2], dirs[0], dirs[1])) {
951 central_axis = Box3D::Y;
974 Box3D::Axis central_axis = Box3D::NONE;
986 central_axis = Box3D::X;
988 central_axis = Box3D::Y;
990 central_axis = Box3D::Z;
996 if (central_axis == Box3D::Z) {
997 central_corner = central_corner ^ Box3D::XYZ;
1000 central_corner = central_corner ^ Box3D::XYZ;
1013 case Box3D::Y:
1022 case Box3D::Z:
1034 case Box3D::X:
1043 case Box3D::NONE:
1055 Box3D::Axis ev = box3d_everted_directions(box);
1057 if (ev & Box3D::axes[i]) {
1058 box3d_swap_sides(z_orders, Box3D::axes[i]);
1080 sides[Box3D::face_to_int(side->getFaceId())] = side;
1117 box3d_pt_lies_in_PL_sector (SPBox3D const *box, Geom::Point const &pt, int id1, int id2, Box3D::Axis axis) {
1125 if (persp3d_VP_is_finite(persp->perspective_impl, Box3D::toProj(axis))) {
1126 Geom::Point vp(persp3d_get_VP(persp, Box3D::toProj(axis)).affine());
1130 ret = static_cast<int>(Box3D::lies_in_sector(v1, v2, w));
1132 Box3D::PerspectiveLine pl1(c1, Box3D::toProj(axis), persp);
1133 Box3D::PerspectiveLine pl2(c2, Box3D::toProj(axis), persp);
1136 Box3D::Line edge(c1,c2);
1149 box3d_VP_lies_in_PL_sector (SPBox3D const *box, Proj::Axis vpdir, int id1, int id2, Box3D::Axis axis) {
1186 box->swapped = (Box3D::Axis) (box->swapped | Proj::toAffine(axis));
1188 box->swapped = (Box3D::Axis) (box->swapped & ~Proj::toAffine(axis));
1198 if (box->swapped & Box3D::axes[i]) {