Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
box3d.cpp File Reference

Go to the source code of this file.

Functions

static void box3d_ref_changed (SPObject *old_ref, SPObject *ref, SPBox3D *box)
 Gets called when (re)attached to another perspective.
 
static Proj::Pt3 box3d_get_proj_corner (guint id, Proj::Pt3 const &c0, Proj::Pt3 const &c7)
 
static Proj::Pt3 box3d_get_proj_corner (SPBox3D const *box, guint id)
 
static Proj::Pt3 box3d_snap (SPBox3D *box, int id, Proj::Pt3 const &pt_proj, Proj::Pt3 const &start_pt)
 
static bool box3d_half_line_crosses_joining_line (Geom::Point const &A, Geom::Point const &B, Geom::Point const &C, Geom::Point const &D)
 
static bool box3d_XY_axes_are_swapped (SPBox3D *box)
 
static void box3d_aux_set_z_orders (int z_orders[6], int a, int b, int c, int d, int e, int f)
 
static void box3d_set_new_z_orders_case0 (SPBox3D *box, int z_orders[6], Box3D::Axis central_axis)
 
static void box3d_set_new_z_orders_case1 (SPBox3D *box, int z_orders[6], Box3D::Axis central_axis, Box3D::Axis fin_axis)
 
static void box3d_set_new_z_orders_case2 (SPBox3D *box, int z_orders[6], Box3D::Axis central_axis, Box3D::Axis)
 
static Box3D::Axis box3d_everted_directions (SPBox3D *box)
 
static void box3d_swap_sides (int z_orders[6], Box3D::Axis axis)
 
static std::map< int, Box3DSide * > box3d_get_sides (SPBox3D *box)
 
static void box3d_swap_coords (SPBox3D *box, Proj::Axis axis, bool smaller=true)
 
static void box3d_check_for_swapped_coords (SPBox3D *box, Proj::Axis axis, bool smaller)
 
static void box3d_exchange_coords (SPBox3D *box)
 
static void box3d_extract_boxes_rec (SPObject *obj, std::list< SPBox3D * > &boxes)
 
static void box3d_push_back_corner_pair (SPBox3D const *box, std::list< std::pair< Geom::Point, Geom::Point > > &pts, int c1, int c2)
 

Variables

static gint counter = 0
 
static double remember_snap_threshold = 30
 
static guint remember_snap_index = 0
 
static const int MAX_POINT_COUNT = 4
 

Function Documentation

◆ box3d_aux_set_z_orders()

static void box3d_aux_set_z_orders ( int  z_orders[6],
int  a,
int  b,
int  c,
int  d,
int  e,
int  f 
)
inlinestatic

◆ box3d_check_for_swapped_coords()

static void box3d_check_for_swapped_coords ( SPBox3D box,
Proj::Axis  axis,
bool  smaller 
)
static

◆ box3d_everted_directions()

static Box3D::Axis box3d_everted_directions ( SPBox3D box)
static

◆ box3d_exchange_coords()

static void box3d_exchange_coords ( SPBox3D box)
static

◆ box3d_extract_boxes_rec()

static void box3d_extract_boxes_rec ( SPObject obj,
std::list< SPBox3D * > &  boxes 
)
static

Definition at line 1202 of file box3d.cpp.

References box3d_extract_boxes_rec(), child, and SPObject::children.

Referenced by box3d_extract_boxes_rec(), and SPBox3D::extract_boxes().

◆ box3d_get_proj_corner() [1/2]

static Proj::Pt3 box3d_get_proj_corner ( guint  id,
Proj::Pt3 const &  c0,
Proj::Pt3 const &  c7 
)
static

Definition at line 279 of file box3d.cpp.

References Proj::X, Box3D::X, Proj::Y, Box3D::Y, Proj::Z, and Box3D::Z.

Referenced by SPBox3D::get_corner_screen(), and SPBox3D::set_corner().

◆ box3d_get_proj_corner() [2/2]

static Proj::Pt3 box3d_get_proj_corner ( SPBox3D const *  box,
guint  id 
)
static

◆ box3d_get_sides()

static std::map< int, Box3DSide * > box3d_get_sides ( SPBox3D box)
static

Definition at line 1061 of file box3d.cpp.

References SPObject::children, and Box3D::face_to_int().

Referenced by SPBox3D::set_z_orders().

◆ box3d_half_line_crosses_joining_line()

static bool box3d_half_line_crosses_joining_line ( Geom::Point const &  A,
Geom::Point const &  B,
Geom::Point const &  C,
Geom::Point const &  D 
)
static

Definition at line 580 of file box3d.cpp.

References D, Geom::distance(), dot(), Geom::intersection(), n1, and Geom::Line::pointAt().

Referenced by SPBox3D::recompute_z_orders().

◆ box3d_push_back_corner_pair()

static void box3d_push_back_corner_pair ( SPBox3D const *  box,
std::list< std::pair< Geom::Point, Geom::Point > > &  pts,
int  c1,
int  c2 
)
inlinestatic

Definition at line 1306 of file box3d.cpp.

References SPBox3D::get_corner_screen().

Referenced by SPBox3D::convert_to_guides().

◆ box3d_ref_changed()

static void box3d_ref_changed ( SPObject old_ref,
SPObject ref,
SPBox3D box 
)
static

Gets called when (re)attached to another perspective.

Definition at line 163 of file box3d.cpp.

References ref.

Referenced by SPBox3D::build().

◆ box3d_set_new_z_orders_case0()

static void box3d_set_new_z_orders_case0 ( SPBox3D box,
int  z_orders[6],
Box3D::Axis  central_axis 
)
static

◆ box3d_set_new_z_orders_case1()

static void box3d_set_new_z_orders_case1 ( SPBox3D box,
int  z_orders[6],
Box3D::Axis  central_axis,
Box3D::Axis  fin_axis 
)
static

◆ box3d_set_new_z_orders_case2()

static void box3d_set_new_z_orders_case2 ( SPBox3D box,
int  z_orders[6],
Box3D::Axis  central_axis,
Box3D::Axis   
)
static

◆ box3d_snap()

◆ box3d_swap_coords()

static void box3d_swap_coords ( SPBox3D box,
Proj::Axis  axis,
bool  smaller = true 
)
static

◆ box3d_swap_sides()

static void box3d_swap_sides ( int  z_orders[6],
Box3D::Axis  axis 
)
static

Definition at line 882 of file box3d.cpp.

References Box3D::int_to_face().

Referenced by SPBox3D::recompute_z_orders().

◆ box3d_XY_axes_are_swapped()

Variable Documentation

◆ counter

gint counter = 0
static

Definition at line 39 of file box3d.cpp.

Referenced by Inkscape::UI::Dialog::LayerPropertiesDialog::_addLayer(), Inkscape::Extension::Internal::SvgBuilder::_createImage(), Inkscape::UI::Toolbar::TextToolbar::_cursorMoved(), Inkscape::UI::Dialog::StyleDialog::_setAutocompletion(), SPBox3D::build(), SPLPEItem::countLPEOfType(), Inkscape::LivePathEffect::LPEMeasureSegments::createLine(), Inkscape::LivePathEffect::LPEMeasureSegments::createTextLabel(), PairingHeap< T, TCompare >::deleteMin(), Inkscape::LivePathEffect::LPETiling::doAfterEffect(), Inkscape::LivePathEffect::LPEMeasureSegments::doBeforeEffect(), Inkscape::LivePathEffect::LPEFillBetweenMany::doEffect(), Inkscape::LivePathEffect::LPETiling::doEffect_path_post(), Inkscape::UI::Dialog::LivePathEffectEditor::effect_list_reload(), SPDocument::ensureUpToDate(), Inkscape::LivePathEffect::LPEEmbroderyStitchOrdering::fill_increasing(), generate_similar_unique_id(), Inkscape::get_all_fonts(), PathVectorNodeSatellites::getIndexData(), SPLPEItem::getLPEIndex(), SPLPEItem::getLPEReferenceIndex(), PathVectorNodeSatellites::getTotalNodeSatellites(), PairingHeap< T, TCompare >::insert(), Geom::detail::bezier_clipping::iterate< collinear_normal_tag >(), Geom::detail::bezier_clipping::iterate< intersection_point_tag >(), PairingHeap< T, TCompare >::merge(), SPObject::nthChild(), PairingHeap< T, TCompare >::operator=(), outputDiagram(), InkscapeApplication::redirect_output(), KnotHolder::remove(), PathVectorNodeSatellites::setSelected(), cola::GradientProjection::solve(), sp_shape_update_marker_view(), and sp_xml_ns_auto_prefix().

◆ MAX_POINT_COUNT

const int MAX_POINT_COUNT = 4
static

Definition at line 339 of file box3d.cpp.

Referenced by box3d_snap().

◆ remember_snap_index

guint remember_snap_index = 0
static

Definition at line 336 of file box3d.cpp.

Referenced by box3d_snap().

◆ remember_snap_threshold

double remember_snap_threshold = 30
static

Definition at line 335 of file box3d.cpp.

Referenced by box3d_snap().