|
Blender V5.3
|
Classes | |
| class | GreasePencilBooleanTest |
| struct | GreasePencilIDTestContext |
| class | GreasePencilMergeTest |
| class | GreasePencilTrimTest |
| class | SVGMapping |
Functions | |
| static void | CSS_setup_style (std::ofstream &f) |
| static void | SVG_add_path (std::ofstream &f, const std::string &class_name, const Span< float2 > &positions, const GroupedSpan< int > shapes, const IndexMask &shape_mask, const OffsetIndices< int > points_by_curve, const VArraySpan< bool > &cyclic, const SVGMapping &mapping) |
| static std::ofstream | get_file_stream () |
| static void | draw_divider_start (const std::string &label) |
| static void | draw_divider_end () |
| static float2 | project_fn (const float3 position) |
| static void | draw_results (const std::string &label, const std::string &type, const bke::CurvesGeometry &src_curves, const bke::CurvesGeometry &dst_curves, const IndexMask &clipping_shapes) |
| static bke::CurvesGeometry | create_test_curves (const Span< int > offsets, const Span< float2 > points, const Span< int > fill_ids, const Span< bool > cyclic) |
| static void | expect_boolean_result_coord (const bke::CurvesGeometry &dst_curves, const Array< Vector< float2 > > &expected_points) |
| static bke::CurvesGeometry | test_curve_boolean (const Operation opt, const bke::CurvesGeometry &src_curves, const Span< int > fill_ids, const IndexMask &clipping_shapes) |
| TEST_F (GreasePencilBooleanTest, Squares) | |
| TEST_F (GreasePencilBooleanTest, Simple) | |
| TEST_F (GreasePencilBooleanTest, Complex) | |
| TEST_F (GreasePencilBooleanTest, Last_Edge_Loop) | |
| TEST_F (GreasePencilBooleanTest, Simple_Cuts) | |
| TEST_F (GreasePencilBooleanTest, Square_With_Hole) | |
| TEST_F (GreasePencilBooleanTest, Squares_With_Holes) | |
| TEST_F (GreasePencilBooleanTest, Multiple_Shapes) | |
| TEST_F (GreasePencilMergeTest, merge_simple) | |
| TEST_F (GreasePencilMergeTest, merge_in_same_group) | |
| TEST_F (GreasePencilMergeTest, merge_in_different_group) | |
| TEST_F (GreasePencilMergeTest, merge_keyframes) | |
| TEST_F (GreasePencilMergeTest, merge_layer_attributes) | |
| static bke::CurvesGeometry | create_test_curves (const Span< int > offsets, const Span< float2 > positions_2d, const Span< bool > cyclic) |
| static void | expect_near_positions (const Span< float3 > actual, const Span< float2 > expected) |
| TEST_F (GreasePencilTrimTest, trim_two_edges) | |
| TEST_F (GreasePencilTrimTest, trim_sub_edges) | |
| TEST_F (GreasePencilTrimTest, trim_plus_intersection) | |
| TEST_F (GreasePencilTrimTest, trim_t_intersection_to_corner) | |
| TEST_F (GreasePencilTrimTest, trim_t_intersection_line) | |
| TEST_F (GreasePencilTrimTest, trim_figure_eight) | |
| TEST_F (GreasePencilTrimTest, trim_no_geometry) | |
| TEST_F (GreasePencilTrimTest, trim_no_geometry_loop) | |
| TEST_F (GreasePencilTrimTest, trim_cyclical_corner) | |
| TEST_F (GreasePencilTrimTest, trim_no_geometry_edge_end_intersection) | |
| TEST_F (GreasePencilTrimTest, trim_no_geometry_cyclical_loop) | |
| TEST_F (GreasePencilTrimTest, trim_no_geometry_point_intersection) | |
| TEST_F (GreasePencilTrimTest, trim_no_geometry_self_intersection_degeneracy) | |
Variables | |
| static bool | draw_append = false |
|
static |
Definition at line 356 of file grease_pencil_boolean_test.cc.
References blender::BLI_assert(), create_test_curves(), blender::bke::Curve, blender::bke::SpanAttributeWriter< T >::finish(), blender::Span< T >::is_empty(), blender::Span< T >::last(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), blender::Span< T >::size(), and blender::bke::SpanAttributeWriter< T >::span.
Referenced by create_test_curves(), create_test_curves(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
|
static |
Definition at line 26 of file grease_pencil_trim_test.cc.
References blender::BLI_assert(), create_test_curves(), blender::Span< T >::is_empty(), blender::Span< T >::last(), and blender::Span< T >::size().
|
static |
Definition at line 33 of file grease_pencil_boolean_test.cc.
References CSS_setup_style().
Referenced by CSS_setup_style(), and get_file_stream().
|
static |
Definition at line 249 of file grease_pencil_boolean_test.cc.
References DO_DRAW, draw_divider_end(), and get_file_stream().
Referenced by draw_divider_end(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
|
static |
Definition at line 233 of file grease_pencil_boolean_test.cc.
References DO_DRAW, draw_divider_start(), and get_file_stream().
Referenced by draw_divider_start(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
|
static |
Definition at line 271 of file grease_pencil_boolean_test.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::bke::CurvesGeometry::attributes(), blender::index_mask::IndexMask::complement(), blender::bke::Curve, blender::bke::CurvesGeometry::curves_num(), blender::bke::CurvesGeometry::cyclic(), DO_DRAW, draw_results(), get_file_stream(), blender::offset_indices::GroupedSpan< T >::index_range(), blender::bke::AttributeAccessor::lookup(), blender::bounds::min_max(), blender::bke::CurvesGeometry::points_by_curve(), blender::bke::CurvesGeometry::points_num(), blender::bke::CurvesGeometry::points_range(), blender::bke::CurvesGeometry::positions(), project_fn(), blender::bke::greasepencil::ShapeData::shapes(), blender::bke::greasepencil::shapes_from_fill_ids(), SVG_add_path(), blender::ed::greasepencil::tests::SVGMapping::SVGMapping(), blender::ed::greasepencil::tests::SVGMapping::view_height, and blender::ed::greasepencil::tests::SVGMapping::view_width.
Referenced by draw_results(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
|
static |
Definition at line 386 of file grease_pencil_boolean_test.cc.
References blender::bke::CurvesGeometry::curves_num(), blender::e, expect_boolean_result_coord(), blender::EXPECT_EQ(), EXPECT_NEAR, blender::IndexRange::index_range(), blender::offset_indices::OffsetIndices< T >::index_range(), blender::bke::CurvesGeometry::points_by_curve(), blender::bke::CurvesGeometry::points_num(), blender::bke::CurvesGeometry::points_range(), blender::bke::CurvesGeometry::positions(), project_fn(), blender::Array< T, InlineBufferCapacity, Allocator >::size(), blender::IndexRange::size(), and blender::Span< T >::size().
Referenced by expect_boolean_result_coord(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
|
static |
Definition at line 47 of file grease_pencil_trim_test.cc.
References blender::e, blender::EXPECT_EQ(), EXPECT_NEAR, expect_near_positions(), blender::Span< T >::index_range(), blender::Span< T >::size(), blender::x, and y.
Referenced by expect_near_positions(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
|
static |
Definition at line 202 of file grease_pencil_boolean_test.cc.
References CSS_setup_style(), draw_append, and get_file_stream().
Referenced by draw_divider_end(), draw_divider_start(), draw_results(), and get_file_stream().
Definition at line 266 of file grease_pencil_boolean_test.cc.
References position, and project_fn().
Referenced by draw_results(), expect_boolean_result_coord(), project_fn(), and test_curve_boolean().
|
static |
Definition at line 155 of file grease_pencil_boolean_test.cc.
References blender::index_mask::IndexMask::foreach_index(), blender::IndexRange::index_range(), blender::Span< T >::index_range(), SVG_add_path(), blender::ed::greasepencil::tests::SVGMapping::SX(), and blender::ed::greasepencil::tests::SVGMapping::SY().
Referenced by draw_results(), and SVG_add_path().
|
static |
Definition at line 432 of file grease_pencil_boolean_test.cc.
References blender::ed::greasepencil::boolean::CurveBooleanOpParameters::boolean_mode, blender::ed::greasepencil::boolean::curve_boolean(), blender::bke::CurvesGeometry::curves_num(), blender::VArray< T >::from_span(), blender::offset_indices::GroupedSpan< T >::index_range(), blender::ed::greasepencil::boolean::CurveBooleanOpParameters::keep_caps, project_fn(), blender::ed::greasepencil::boolean::CurveBooleanOpParameters::separate_islands, blender::bke::greasepencil::ShapeData::shapes(), blender::bke::greasepencil::shapes_from_fill_ids(), blender::ed::greasepencil::boolean::CurveBooleanOpParameters::skip_clipping_attributes, and test_curve_boolean().
Referenced by test_curve_boolean(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
| blender::ed::greasepencil::tests::TEST_F | ( | GreasePencilBooleanTest | , |
| Complex | ) |
This is a replica of Fig. 16 from Greiner, Günther; Kai Hormann (1998). "Efficient clipping of arbitrary polygons". ACM Transactions on Graphics. 17 (2): 71-83.
Definition at line 554 of file grease_pencil_boolean_test.cc.
References create_test_curves(), blender::ed::greasepencil::boolean::Difference, draw_divider_end(), draw_divider_start(), draw_results(), expect_boolean_result_coord(), blender::IndexRange::IndexRange(), blender::ed::greasepencil::boolean::Intersect, test_curve_boolean(), TEST_F(), and blender::ed::greasepencil::boolean::Union.
| blender::ed::greasepencil::tests::TEST_F | ( | GreasePencilBooleanTest | , |
| Last_Edge_Loop | ) |
These shapes are designed to test the following: 1: Intersection with the last edge. 2: Segment connected through a full loop around. 3: Multiple intersection on one edge not in order. 4: Having a self intersection.
Definition at line 647 of file grease_pencil_boolean_test.cc.
References create_test_curves(), blender::ed::greasepencil::boolean::Difference, draw_divider_end(), draw_divider_start(), draw_results(), expect_boolean_result_coord(), blender::IndexRange::IndexRange(), blender::ed::greasepencil::boolean::Intersect, test_curve_boolean(), TEST_F(), and blender::ed::greasepencil::boolean::Union.
| blender::ed::greasepencil::tests::TEST_F | ( | GreasePencilBooleanTest | , |
| Multiple_Shapes | ) |
Multiple separate but intersecting subject shapes. The two subject shapes should be affected by the clipping shape, but not join into one.
Definition at line 941 of file grease_pencil_boolean_test.cc.
References create_test_curves(), blender::ed::greasepencil::boolean::Difference, draw_divider_end(), draw_divider_start(), draw_results(), expect_boolean_result_coord(), blender::IndexRange::from_begin_end(), blender::ed::greasepencil::boolean::Intersect, test_curve_boolean(), and TEST_F().
| blender::ed::greasepencil::tests::TEST_F | ( | GreasePencilBooleanTest | , |
| Simple | ) |
This is a replica of Fig. 10 from Greiner, Günther; Kai Hormann (1998). "Efficient clipping of arbitrary polygons". ACM Transactions on Graphics. 17 (2): 71-83.
Definition at line 500 of file grease_pencil_boolean_test.cc.
References create_test_curves(), blender::ed::greasepencil::boolean::Difference, draw_divider_end(), draw_divider_start(), draw_results(), expect_boolean_result_coord(), blender::IndexRange::IndexRange(), blender::ed::greasepencil::boolean::Intersect, test_curve_boolean(), TEST_F(), and blender::ed::greasepencil::boolean::Union.
| blender::ed::greasepencil::tests::TEST_F | ( | GreasePencilBooleanTest | , |
| Simple_Cuts | ) |
Definition at line 724 of file grease_pencil_boolean_test.cc.
References create_test_curves(), blender::ed::greasepencil::boolean::Difference, draw_divider_end(), draw_divider_start(), draw_results(), expect_boolean_result_coord(), blender::IndexRange::IndexRange(), test_curve_boolean(), and TEST_F().
| blender::ed::greasepencil::tests::TEST_F | ( | GreasePencilBooleanTest | , |
| Square_With_Hole | ) |
Definition at line 857 of file grease_pencil_boolean_test.cc.
References create_test_curves(), blender::ed::greasepencil::boolean::Difference, draw_divider_end(), draw_divider_start(), draw_results(), expect_boolean_result_coord(), blender::IndexRange::from_begin_end(), test_curve_boolean(), and TEST_F().
| blender::ed::greasepencil::tests::TEST_F | ( | GreasePencilBooleanTest | , |
| Squares | ) |
Definition at line 454 of file grease_pencil_boolean_test.cc.
References create_test_curves(), blender::ed::greasepencil::boolean::Difference, draw_divider_end(), draw_divider_start(), draw_results(), expect_boolean_result_coord(), blender::IndexRange::IndexRange(), blender::ed::greasepencil::boolean::Intersect, test_curve_boolean(), TEST_F(), and blender::ed::greasepencil::boolean::Union.
Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
| blender::ed::greasepencil::tests::TEST_F | ( | GreasePencilBooleanTest | , |
| Squares_With_Holes | ) |
Definition at line 896 of file grease_pencil_boolean_test.cc.
References create_test_curves(), blender::ed::greasepencil::boolean::Difference, draw_divider_end(), draw_divider_start(), draw_results(), expect_boolean_result_coord(), blender::IndexRange::from_begin_end(), test_curve_boolean(), and TEST_F().
| blender::ed::greasepencil::tests::TEST_F | ( | GreasePencilMergeTest | , |
| merge_in_different_group | ) |
Definition at line 120 of file grease_pencil_merge_test.cc.
References blender::BKE_grease_pencil_copy_parameters(), blender::BKE_grease_pencil_new_nomain(), blender::BKE_id_free(), blender::EXPECT_EQ(), EXPECT_TRUE, blender::ed::greasepencil::tests::GreasePencilIDTestContext::grease_pencil, layer, blender::ed::greasepencil::merge_layers(), node, and TEST_F().
| blender::ed::greasepencil::tests::TEST_F | ( | GreasePencilMergeTest | , |
| merge_in_same_group | ) |
Definition at line 68 of file grease_pencil_merge_test.cc.
References blender::BKE_grease_pencil_copy_parameters(), blender::BKE_grease_pencil_new_nomain(), blender::BKE_id_free(), blender::EXPECT_EQ(), blender::ed::greasepencil::tests::GreasePencilIDTestContext::grease_pencil, layer, blender::ed::greasepencil::merge_layers(), and TEST_F().
| blender::ed::greasepencil::tests::TEST_F | ( | GreasePencilMergeTest | , |
| merge_keyframes | ) |
Definition at line 181 of file grease_pencil_merge_test.cc.
References blender::BKE_grease_pencil_copy_parameters(), blender::BKE_grease_pencil_new_nomain(), blender::BKE_id_free(), blender::EXPECT_EQ(), blender::ed::greasepencil::tests::GreasePencilIDTestContext::grease_pencil, blender::ed::greasepencil::merge_layers(), blender::bke::CurvesGeometry::resize(), blender::bke::greasepencil::Drawing::strokes_for_write(), TEST_F(), and blender::bke::CurvesGeometry::update_curve_types().
| blender::ed::greasepencil::tests::TEST_F | ( | GreasePencilMergeTest | , |
| merge_layer_attributes | ) |
Definition at line 239 of file grease_pencil_merge_test.cc.
References blender::BKE_grease_pencil_new_nomain(), blender::BKE_id_free(), blender::EXPECT_EQ(), EXPECT_TRUE, blender::ed::greasepencil::tests::GreasePencilIDTestContext::grease_pencil, blender::ed::greasepencil::merge_layers(), and TEST_F().
| blender::ed::greasepencil::tests::TEST_F | ( | GreasePencilMergeTest | , |
| merge_simple | ) |
| blender::ed::greasepencil::tests::TEST_F | ( | GreasePencilTrimTest | , |
| trim_cyclical_corner | ) |
Definition at line 295 of file grease_pencil_trim_test.cc.
References create_test_curves(), blender::bke::CurvesGeometry::curves_range(), expect_near_positions(), blender::bke::CurvesGeometry::positions(), TEST_F(), and blender::ed::greasepencil::trim::trim_curve_segments().
| blender::ed::greasepencil::tests::TEST_F | ( | GreasePencilTrimTest | , |
| trim_figure_eight | ) |
Definition at line 226 of file grease_pencil_trim_test.cc.
References create_test_curves(), blender::bke::CurvesGeometry::curves_range(), expect_near_positions(), blender::bke::CurvesGeometry::positions(), TEST_F(), and blender::ed::greasepencil::trim::trim_curve_segments().
| blender::ed::greasepencil::tests::TEST_F | ( | GreasePencilTrimTest | , |
| trim_no_geometry | ) |
Definition at line 256 of file grease_pencil_trim_test.cc.
References create_test_curves(), blender::bke::CurvesGeometry::curves_range(), expect_near_positions(), blender::bke::CurvesGeometry::positions(), TEST_F(), and blender::ed::greasepencil::trim::trim_curve_segments().
| blender::ed::greasepencil::tests::TEST_F | ( | GreasePencilTrimTest | , |
| trim_no_geometry_cyclical_loop | ) |
Definition at line 346 of file grease_pencil_trim_test.cc.
References create_test_curves(), blender::bke::CurvesGeometry::curves_range(), blender::bke::CurvesGeometry::cyclic(), blender::EXPECT_EQ(), expect_near_positions(), blender::bke::CurvesGeometry::positions(), TEST_F(), and blender::ed::greasepencil::trim::trim_curve_segments().
| blender::ed::greasepencil::tests::TEST_F | ( | GreasePencilTrimTest | , |
| trim_no_geometry_edge_end_intersection | ) |
Definition at line 324 of file grease_pencil_trim_test.cc.
References create_test_curves(), blender::bke::CurvesGeometry::curves_range(), blender::bke::CurvesGeometry::cyclic(), blender::EXPECT_EQ(), expect_near_positions(), blender::bke::CurvesGeometry::positions(), TEST_F(), and blender::ed::greasepencil::trim::trim_curve_segments().
| blender::ed::greasepencil::tests::TEST_F | ( | GreasePencilTrimTest | , |
| trim_no_geometry_loop | ) |
Definition at line 276 of file grease_pencil_trim_test.cc.
References create_test_curves(), blender::bke::CurvesGeometry::curves_range(), blender::bke::CurvesGeometry::cyclic(), blender::EXPECT_EQ(), expect_near_positions(), blender::bke::CurvesGeometry::positions(), TEST_F(), and blender::ed::greasepencil::trim::trim_curve_segments().
| blender::ed::greasepencil::tests::TEST_F | ( | GreasePencilTrimTest | , |
| trim_no_geometry_point_intersection | ) |
Definition at line 368 of file grease_pencil_trim_test.cc.
References create_test_curves(), blender::bke::CurvesGeometry::curves_range(), blender::bke::CurvesGeometry::cyclic(), blender::EXPECT_EQ(), expect_near_positions(), blender::bke::CurvesGeometry::positions(), TEST_F(), and blender::ed::greasepencil::trim::trim_curve_segments().
| blender::ed::greasepencil::tests::TEST_F | ( | GreasePencilTrimTest | , |
| trim_no_geometry_self_intersection_degeneracy | ) |
Definition at line 390 of file grease_pencil_trim_test.cc.
References create_test_curves(), blender::bke::CurvesGeometry::curves_range(), blender::bke::CurvesGeometry::cyclic(), blender::EXPECT_EQ(), expect_near_positions(), blender::bke::CurvesGeometry::positions(), TEST_F(), and blender::ed::greasepencil::trim::trim_curve_segments().
| blender::ed::greasepencil::tests::TEST_F | ( | GreasePencilTrimTest | , |
| trim_plus_intersection | ) |
Definition at line 130 of file grease_pencil_trim_test.cc.
References create_test_curves(), blender::bke::CurvesGeometry::curves_range(), expect_near_positions(), blender::bke::CurvesGeometry::positions(), TEST_F(), and blender::ed::greasepencil::trim::trim_curve_segments().
| blender::ed::greasepencil::tests::TEST_F | ( | GreasePencilTrimTest | , |
| trim_sub_edges | ) |
Definition at line 94 of file grease_pencil_trim_test.cc.
References create_test_curves(), blender::bke::CurvesGeometry::curves_range(), expect_near_positions(), blender::bke::CurvesGeometry::positions(), TEST_F(), and blender::ed::greasepencil::trim::trim_curve_segments().
| blender::ed::greasepencil::tests::TEST_F | ( | GreasePencilTrimTest | , |
| trim_t_intersection_line | ) |
Definition at line 190 of file grease_pencil_trim_test.cc.
References create_test_curves(), blender::bke::CurvesGeometry::curves_range(), expect_near_positions(), blender::bke::CurvesGeometry::positions(), TEST_F(), and blender::ed::greasepencil::trim::trim_curve_segments().
| blender::ed::greasepencil::tests::TEST_F | ( | GreasePencilTrimTest | , |
| trim_t_intersection_to_corner | ) |
Definition at line 161 of file grease_pencil_trim_test.cc.
References create_test_curves(), blender::bke::CurvesGeometry::curves_range(), expect_near_positions(), blender::bke::CurvesGeometry::positions(), TEST_F(), and blender::ed::greasepencil::trim::trim_curve_segments().
| blender::ed::greasepencil::tests::TEST_F | ( | GreasePencilTrimTest | , |
| trim_two_edges | ) |
Definition at line 62 of file grease_pencil_trim_test.cc.
References create_test_curves(), blender::bke::CurvesGeometry::curves_range(), expect_near_positions(), blender::bke::CurvesGeometry::positions(), TEST_F(), and blender::ed::greasepencil::trim::trim_curve_segments().
|
static |
Definition at line 200 of file grease_pencil_boolean_test.cc.
Referenced by get_file_stream().