Inkscape
Vector Graphics Editor
|
Perspective line for 3D perspectives. More...
Classes | |
class | Line |
class | PerspectiveLine |
class | VanishingPoint |
struct | VPDrag |
struct | VPDragger |
Enumerations | |
enum | Axis { X = 1 , Y = 2 , Z = 4 , XY = 3 , XZ = 5 , YZ = 6 , XYZ = 7 , NONE = 0 } |
enum | FrontOrRear { FRONT = 0 , REAR = 8 } |
enum | VPState { VP_FINITE = 0 , VP_INFINITE } |
Functions | |
std::pair< Axis, Axis > | get_remaining_axes (Axis axis) |
Glib::ustring | string_from_axes (Box3D::Axis axis) |
int | axis_to_int (Box3D::Axis axis) |
Proj::Axis | toProj (Box3D::Axis axis) |
int | face_to_int (unsigned int face_id) |
std::pair< Box3D::Axis, Box3D::FrontOrRear > | int_to_face (unsigned id) |
bool | is_face_id (unsigned int face_id) |
unsigned int | number_of_axis_directions (Box3D::Axis axis) |
inline gint opposite_face (guint face_id) { return face_id + (((face_id % 2) == 0) ? 1 : -1); } | |
bool | is_plane (Box3D::Axis plane) |
bool | is_single_axis_direction (Box3D::Axis dir) |
Box3D::Axis | third_axis_direction (Box3D::Axis dir1, Box3D::Axis dir2) |
Given two axis directions out of {X, Y, Z} or the corresponding plane, return the remaining one We don't check if 'plane' really specifies a plane (i.e., if it consists of precisely two directions). | |
Box3D::Axis | third_axis_direction (Box3D::Axis plane) |
Box3D::Axis | extract_first_axis_direction (Box3D::Axis dirs) |
Box3D::Axis | extract_second_axis_direction (Box3D::Axis dirs) |
Box3D::Axis | orth_plane_or_axis (Box3D::Axis axis) |
Box3D::Axis | get_perpendicular_axis_direction (Box3D::Axis dirs) |
std::pair< double, double > | coordinates (Geom::Point const &v1, Geom::Point const &v2, Geom::Point const &w) |
bool | lies_in_sector (Geom::Point const &v1, Geom::Point const &v2, Geom::Point const &w) |
bool | lies_in_quadrangle (Geom::Point const &A, Geom::Point const &B, Geom::Point const &C, Geom::Point const &D, Geom::Point const &pt) |
static double | pos_angle (Geom::Point v, Geom::Point w) |
std::pair< Geom::Point, Geom::Point > | side_of_intersection (Geom::Point const &A, Geom::Point const &B, Geom::Point const &C, Geom::Point const &D, Geom::Point const &pt, Geom::Point const &dir) |
double | determinant (Geom::Point const &a, Geom::Point const &b) |
std::ostream & | operator<< (std::ostream &out_file, const Line &in_line) |
A function to print out the Line. | |
static void | vp_drag_sel_changed (Inkscape::Selection *, gpointer data) |
static void | vp_drag_sel_modified (Inkscape::Selection *, guint, gpointer data) |
static bool | have_VPs_of_same_perspective (VPDragger *dr1, VPDragger *dr2) |
static void | vp_knot_moved_handler (SPKnot *knot, Geom::Point const &ppointer, guint state, gpointer data) |
static void | vp_knot_grabbed_handler (SPKnot *, unsigned int, gpointer data) |
static void | vp_knot_ungrabbed_handler (SPKnot *knot, guint, gpointer data) |
Variables | |
Axis | axes [3] = { X, Y, Z } |
Axis | planes [3] = { XY, XZ, YZ } |
FrontOrRear | face_positions [2] = { FRONT, REAR } |
const double | epsilon = 1e-6 |
Perspective line for 3D perspectives.
Authors: Maximilian Albert Anhal.nosp@m.ter4.nosp@m.2@gmx.nosp@m..de
Copyright (C) 2007 authors
Released under GNU GPL v2+, read the file 'COPYING' for more information.
enum Box3D::Axis |
Enumerator | |
---|---|
X | |
Y | |
Z | |
XY | |
XZ | |
YZ | |
XYZ | |
NONE |
Definition at line 60 of file axis-manip.h.
enum Box3D::FrontOrRear |
Enumerator | |
---|---|
FRONT | |
REAR |
Definition at line 73 of file axis-manip.h.
enum Box3D::VPState |
Enumerator | |
---|---|
VP_FINITE | |
VP_INFINITE |
Definition at line 36 of file vanishing-point.h.
|
inline |
std::pair< double, double > Box3D::coordinates | ( | Geom::Point const & | v1, |
Geom::Point const & | v2, | ||
Geom::Point const & | w | ||
) |
Definition at line 79 of file line-geometry.cpp.
References det(), determinant(), epsilon, and w.
Referenced by lies_in_sector().
|
inline |
Definition at line 64 of file line-geometry.h.
References Geom::X, and Geom::Y.
Referenced by coordinates().
|
inline |
Definition at line 221 of file axis-manip.h.
Referenced by Inkscape::UI::Tools::Box3dTool::drag(), extract_second_axis_direction(), get_remaining_axes(), and Box3DSide::set().
|
inline |
Definition at line 227 of file axis-manip.h.
References extract_first_axis_direction().
Referenced by Inkscape::UI::Tools::Box3dTool::drag(), get_remaining_axes(), and Box3DSide::set().
|
inline |
Definition at line 149 of file axis-manip.h.
Referenced by box3d_get_sides().
|
inline |
Definition at line 30 of file axis-manip.cpp.
References extract_first_axis_direction(), extract_second_axis_direction(), is_single_axis_direction(), NONE, and orth_plane_or_axis().
Referenced by box3d_set_new_z_orders_case1().
Definition at line 63 of file vanishing-point.cpp.
References Box3D::VPDragger::hasPerspective(), and Box3D::VPDragger::vps.
Referenced by vp_knot_moved_handler().
|
inline |
Definition at line 169 of file axis-manip.h.
References FRONT, NONE, REAR, XY, XZ, and YZ.
Referenced by box3d_swap_sides(), and Inkscape::UI::Tools::Box3dTool::drag().
|
inline |
Definition at line 181 of file axis-manip.h.
Referenced by Box3DSide::set().
|
inline |
Definition at line 200 of file axis-manip.h.
References number_of_axis_directions().
Referenced by Inkscape::UI::Tools::Box3dTool::drag(), and Box3DSide::set().
|
inline |
Definition at line 204 of file axis-manip.h.
Referenced by get_remaining_axes().
bool Box3D::lies_in_quadrangle | ( | Geom::Point const & | A, |
Geom::Point const & | B, | ||
Geom::Point const & | C, | ||
Geom::Point const & | D, | ||
Geom::Point const & | pt | ||
) |
Definition at line 104 of file line-geometry.cpp.
References D, and lies_in_sector().
bool Box3D::lies_in_sector | ( | Geom::Point const & | v1, |
Geom::Point const & | v2, | ||
Geom::Point const & | w | ||
) |
Definition at line 93 of file line-geometry.cpp.
References coordinates(), Geom::dot(), and w.
Referenced by lies_in_quadrangle(), SPBox3D::pt_lies_in_PL_sector(), SPBox3D::recompute_z_orders(), and side_of_intersection().
|
inline |
inline gint opposite_face (guint face_id) { return face_id + (((face_id % 2) == 0) ? 1 : -1); }
Definition at line 191 of file axis-manip.h.
Referenced by is_plane().
|
inline |
A function to print out the Line.
It just prints out the coordinates of start point and direction on the given output stream
Definition at line 77 of file line-geometry.h.
|
inline |
Definition at line 231 of file axis-manip.h.
References XYZ.
Referenced by Inkscape::UI::Tools::Box3dTool::drag(), get_remaining_axes(), and Box3DSide::set().
|
static |
Definition at line 109 of file line-geometry.cpp.
References Geom::atan2(), and w.
Referenced by side_of_intersection().
std::pair< Geom::Point, Geom::Point > Box3D::side_of_intersection | ( | Geom::Point const & | A, |
Geom::Point const & | B, | ||
Geom::Point const & | C, | ||
Geom::Point const & | D, | ||
Geom::Point const & | pt, | ||
Geom::Point const & | dir | ||
) |
Definition at line 120 of file line-geometry.cpp.
References D, lies_in_sector(), pos_angle(), and result.
Referenced by Box3D::Line::intersection_with_viewbox().
Glib::ustring Box3D::string_from_axes | ( | Box3D::Axis | axis | ) |
Definition at line 36 of file axis-manip.cpp.
References result, X, Y, and Z.
Referenced by Box3DSide::axes_string().
|
inline |
Given two axis directions out of {X, Y, Z} or the corresponding plane, return the remaining one We don't check if 'plane' really specifies a plane (i.e., if it consists of precisely two directions).
Definition at line 213 of file axis-manip.h.
Referenced by box3d_side_compute_corner_ids().
|
inline |
Definition at line 216 of file axis-manip.h.
|
inline |
Definition at line 95 of file axis-manip.h.
References Proj::NONE, NONE, Proj::X, X, Proj::Y, Y, Proj::Z, and Z.
Referenced by box3d_set_new_z_orders_case1(), SPBox3D::pt_lies_in_PL_sector(), and SPBox3D::recompute_z_orders().
|
static |
Definition at line 46 of file vanishing-point.cpp.
References data, Box3D::VPDrag::updateBoxReprs(), Box3D::VPDrag::updateDraggers(), and Box3D::VPDrag::updateLines().
Referenced by Box3D::VPDrag::VPDrag().
|
static |
Definition at line 54 of file vanishing-point.cpp.
References data, Box3D::VPDrag::updateBoxHandles(), Box3D::VPDrag::updateDraggers(), and Box3D::VPDrag::updateLines().
Referenced by Box3D::VPDrag::VPDrag().
|
static |
Definition at line 196 of file vanishing-point.cpp.
References data, Box3D::VPDrag::dragging, and Box3D::VPDragger::parent.
Referenced by Box3D::VPDragger::VPDragger().
|
static |
Definition at line 73 of file vanishing-point.cpp.
References Persp3D::create_xml_element(), data, desktop, Box3D::VPDrag::document, Box3D::VPDrag::draggers, Box3D::VPDragger::dragging_started, SPDesktop::getNamedView(), Inkscape::SnappedPoint::getPoint(), Inkscape::SnappedPoint::getSnapped(), have_VPs_of_same_perspective(), Geom::L2(), Persp3D::list_of_boxes(), Box3D::VPDragger::mergePerspectives(), SPKnot::moveto(), Box3D::VPDragger::numberOfBoxes(), Box3D::VPDragger::parent, Box3D::VPDragger::point, SnapManager::setup(), SPNamedView::snap_manager, Inkscape::SNAPSOURCE_OTHER_HANDLE, Box3D::VPDragger::updateBoxDisplays(), Box3D::VPDrag::updateBoxDisplays(), Box3D::VPDrag::updateBoxHandles(), Box3D::VPDrag::updateLines(), Box3D::VPDragger::updateTip(), Box3D::VPDragger::updateVPs(), Box3D::VPDragger::updateZOrders(), Box3D::VPDragger::vps, and Box3D::VPDragger::VPsOfSelectedBoxes().
Referenced by Box3D::VPDragger::VPDragger().
|
static |
Definition at line 204 of file vanishing-point.cpp.
References data, Box3D::VPDrag::document, Box3D::VPDrag::dragging, Box3D::VPDragger::dragging_started, Box3D::VPDragger::parent, Box3D::VPDragger::point, Box3D::VPDragger::point_original, SPKnot::pos, Box3D::VPDrag::updateBoxHandles(), Box3D::VPDrag::updateDraggers(), Box3D::VPDrag::updateLines(), and Box3D::VPDragger::vps.
Referenced by Box3D::VPDragger::VPDragger().
Definition at line 25 of file axis-manip.cpp.
Referenced by box3d_exchange_coords(), and SPBox3D::recompute_z_orders().
const double Box3D::epsilon = 1e-6 |
Definition at line 56 of file axis-manip.h.
Referenced by coordinates(), and Box3D::Line::pts_coincide().
FrontOrRear Box3D::face_positions = { FRONT, REAR } |
Definition at line 27 of file axis-manip.cpp.