Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/BKE_sketch.h')
-rw-r--r--source/blender/blenkernel/BKE_sketch.h62
1 files changed, 28 insertions, 34 deletions
diff --git a/source/blender/blenkernel/BKE_sketch.h b/source/blender/blenkernel/BKE_sketch.h
index 9cdf9a8fb62..50ee1184b3e 100644
--- a/source/blender/blenkernel/BKE_sketch.h
+++ b/source/blender/blenkernel/BKE_sketch.h
@@ -38,8 +38,7 @@ typedef enum SK_PMode
PT_PROJECT,
} SK_PMode;
-typedef struct SK_Point
-{
+typedef struct SK_Point {
float p[3];
short p2d[2];
float no[3];
@@ -48,8 +47,7 @@ typedef struct SK_Point
SK_PMode mode;
} SK_Point;
-typedef struct SK_Stroke
-{
+typedef struct SK_Stroke {
struct SK_Stroke *next, *prev;
SK_Point *points;
@@ -58,68 +56,64 @@ typedef struct SK_Stroke
int selected;
} SK_Stroke;
-#define SK_OVERDRAW_LIMIT 5
+#define SK_OVERDRAW_LIMIT 5
-typedef struct SK_Overdraw
-{
+typedef struct SK_Overdraw {
SK_Stroke *target;
- int start, end;
+ int start, end;
int count;
} SK_Overdraw;
#define SK_Stroke_BUFFER_INIT_SIZE 20
-typedef struct SK_DrawData
-{
+typedef struct SK_DrawData {
int mval[2];
int previous_mval[2];
SK_PType type;
} SK_DrawData;
-typedef struct SK_Intersection
-{
+typedef struct SK_Intersection {
struct SK_Intersection *next, *prev;
SK_Stroke *stroke;
- int before;
- int after;
- int gesture_index;
- float p[3];
- float lambda; /* used for sorting intersection points */
+ int before;
+ int after;
+ int gesture_index;
+ float p[3];
+ float lambda; /* used for sorting intersection points */
} SK_Intersection;
-typedef struct SK_Sketch
-{
- ListBase strokes;
- ListBase depth_peels;
- SK_Stroke *active_stroke;
- SK_Stroke *gesture;
- SK_Point next_point;
+typedef struct SK_Sketch {
+ ListBase strokes;
+ ListBase depth_peels;
+ SK_Stroke *active_stroke;
+ SK_Stroke *gesture;
+ SK_Point next_point;
SK_Overdraw over;
} SK_Sketch;
typedef struct SK_Gesture {
- SK_Stroke *stk;
- SK_Stroke *segments;
+ SK_Stroke *stk;
+ SK_Stroke *segments;
- ListBase intersections;
- ListBase self_intersections;
+ ListBase intersections;
+ ListBase self_intersections;
- int nb_self_intersections;
- int nb_intersections;
- int nb_segments;
+ int nb_self_intersections;
+ int nb_intersections;
+ int nb_segments;
} SK_Gesture;
/************************************************/
void freeSketch(SK_Sketch *sketch);
-SK_Sketch* createSketch(void);
+SK_Sketch *createSketch(void);
void sk_removeStroke(SK_Sketch *sketch, SK_Stroke *stk);
void sk_freeStroke(SK_Stroke *stk);
-SK_Stroke* sk_createStroke(void);
+SK_Stroke *sk_createStroke(void);
SK_Point *sk_lastStrokePoint(SK_Stroke *stk);
@@ -134,7 +128,7 @@ void sk_appendStrokePoint(SK_Stroke *stk, SK_Point *pt);
void sk_insertStrokePoints(SK_Stroke *stk, SK_Point *pts, int len, int start, int end);
void sk_trimStroke(SK_Stroke *stk, int start, int end);
-void sk_straightenStroke(SK_Stroke *stk, int start, int end, float p_start[3], float p_end[3]);
+void sk_straightenStroke(SK_Stroke * stk, int start, int end, float p_start[3], float p_end[3]);
void sk_polygonizeStroke(SK_Stroke *stk, int start, int end);
void sk_flattenStroke(SK_Stroke *stk, int start, int end);
void sk_reverseStroke(SK_Stroke *stk);