Blender V5.0
blender::ed::greasepencil::CurveSegmentsData Struct Reference

#include <ED_grease_pencil.hh>

Public Attributes

Array< int > segment_offsets
Array< int > segment_start_points
Array< floatsegment_start_fractions

Detailed Description

Segmentation of curves into fractional ranges.

Segments are defined by a point index and a fraction of the following line segment. The actual start point is found by interpolating between the start point and the next point on the curve. A curve can have no segments at all, in which case the full curve is cyclic and has a single segment. Segments can start and end on the same point, making them shorter than a line segment. A curve is fully partitioned into segments, each segment ends at the start of the next segment with no gaps. The last segment is wrapped around to connect to the first segment.

curves: 0------------—1--------------------—2----— points: 0 1 2 3 4 5 segments: ┌>0────>1──────┐┌──>2────────────>3──>4┐┌─────>┐ └──────────────┘└──────────────────────┘└──────┘

segment_offsets = [0, 2, 5] segment_start_points = [0, 1, 2, 4, 4] segment_start_fractions = [.25, .0, .5, .25, .75]

Definition at line 865 of file ED_grease_pencil.hh.

Member Data Documentation

◆ segment_offsets

Array<int> blender::ed::greasepencil::CurveSegmentsData::segment_offsets

◆ segment_start_fractions

Array<float> blender::ed::greasepencil::CurveSegmentsData::segment_start_fractions

◆ segment_start_points

Array<int> blender::ed::greasepencil::CurveSegmentsData::segment_start_points

The documentation for this struct was generated from the following file: