|
Blender V5.3
|
#include <grease_pencil_segments_intern.hh>
Public Member Functions | |
| constexpr | Segment ()=default |
| bool | is_loop () const |
| bool | has_intersection (Side side) const |
| int2 | edge (Side side) const |
| int | wrap_index (int i) const |
| IndexRange | point_range () const |
| int | points_num () const |
| template<typename Fn> | |
| void | foreach_point (Fn &&fn) const |
Static Public Member Functions | |
| static Segment | from_curve (int curve_i, IndexRange points, bool cyclic) |
| static Segment | from_intersections (int curve_i, IndexRange points, const std::optional< int > point_start, const std::optional< int > point_end, const std::optional< float > factor_start, const std::optional< float > factor_end, const std::optional< int > inter_index_start, const std::optional< int > inter_index_end) |
Public Attributes | |
| int | curve = -1 |
| IndexRange | src_points |
| int | points [2] = {-1, -1} |
| bool | full_wrap_loop = false |
| float | intersection_factor [2] = {0.0f, 0.0f} |
| int | intersection_index [2] = {-1, -1} |
Structure describing a curve segment (a point range in a curve) with end intersection points. A Segment can go past the end of the source curve and loop back to the start.
Definition at line 25 of file grease_pencil_segments_intern.hh.
|
constexprdefault |
References edge(), foreach_point(), from_curve(), from_intersections(), has_intersection(), is_loop(), point_range(), points, points_num(), Segment(), and wrap_index().
Referenced by from_curve(), from_intersections(), and Segment().
Definition at line 44 of file grease_pencil_segments_geom.cc.
References points, and wrap_index().
Referenced by Segment().
| void blender::ed::greasepencil::segment::Segment::foreach_point | ( | Fn && | fn | ) | const |
Definition at line 76 of file grease_pencil_segments_intern.hh.
References blender::IndexRange::index_range(), point_range(), and wrap_index().
Referenced by Segment().
|
static |
Definition at line 100 of file grease_pencil_segments_geom.cc.
References blender::ed::greasepencil::segment::End, blender::IndexRange::first(), blender::IndexRange::last(), points, Segment(), and blender::ed::greasepencil::segment::Start.
Referenced by blender::ed::greasepencil::segment::create_segments_from_intersections_single_curve(), and Segment().
|
static |
Definition at line 117 of file grease_pencil_segments_geom.cc.
References blender::BLI_assert(), blender::IndexRange::contains(), blender::ed::greasepencil::segment::End, blender::IndexRange::first(), blender::IndexRange::last(), points, Segment(), and blender::ed::greasepencil::segment::Start.
Referenced by blender::ed::greasepencil::segment::create_segments_from_intersections_single_curve(), and Segment().
| bool blender::ed::greasepencil::segment::Segment::has_intersection | ( | Side | side | ) | const |
Definition at line 39 of file grease_pencil_segments_geom.cc.
References intersection_index.
Referenced by point_range(), and Segment().
| bool blender::ed::greasepencil::segment::Segment::is_loop | ( | ) | const |
Definition at line 34 of file grease_pencil_segments_geom.cc.
References full_wrap_loop.
Referenced by point_range(), and Segment().
| IndexRange blender::ed::greasepencil::segment::Segment::point_range | ( | ) | const |
Definition at line 54 of file grease_pencil_segments_geom.cc.
References blender::ed::greasepencil::segment::End, blender::IndexRange::first(), blender::IndexRange::from_begin_end_inclusive(), has_intersection(), blender::IndexRange::IndexRange(), intersection_factor, is_loop(), points, blender::IndexRange::shift(), blender::IndexRange::size(), src_points, and blender::ed::greasepencil::segment::Start.
Referenced by foreach_point(), points_num(), and Segment().
| int blender::ed::greasepencil::segment::Segment::points_num | ( | ) | const |
Definition at line 95 of file grease_pencil_segments_geom.cc.
References point_range(), and blender::IndexRange::size().
Referenced by Segment().
| int blender::ed::greasepencil::segment::Segment::wrap_index | ( | int | i | ) | const |
Definition at line 49 of file grease_pencil_segments_geom.cc.
References blender::IndexRange::first(), blender::math::mod_periodic(), blender::IndexRange::size(), and src_points.
Referenced by edge(), foreach_point(), and Segment().
| int blender::ed::greasepencil::segment::Segment::curve = -1 |
Definition at line 28 of file grease_pencil_segments_intern.hh.
Referenced by blender::ed::greasepencil::segment::check_and_join_segments().
| bool blender::ed::greasepencil::segment::Segment::full_wrap_loop = false |
Definition at line 40 of file grease_pencil_segments_intern.hh.
Referenced by is_loop().
| float blender::ed::greasepencil::segment::Segment::intersection_factor[2] = {0.0f, 0.0f} |
Definition at line 47 of file grease_pencil_segments_intern.hh.
Referenced by blender::ed::greasepencil::segment::check_and_join_segments(), and point_range().
| int blender::ed::greasepencil::segment::Segment::intersection_index[2] = {-1, -1} |
Definition at line 49 of file grease_pencil_segments_intern.hh.
Referenced by blender::ed::greasepencil::segment::check_and_join_segments(), and has_intersection().
| int blender::ed::greasepencil::segment::Segment::points[2] = {-1, -1} |
Definition at line 36 of file grease_pencil_segments_intern.hh.
Referenced by blender::ed::greasepencil::segment::check_and_join_segments(), edge(), from_curve(), from_intersections(), point_range(), and Segment().
| IndexRange blender::ed::greasepencil::segment::Segment::src_points |
Definition at line 32 of file grease_pencil_segments_intern.hh.
Referenced by point_range(), and wrap_index().