Blender  V3.3
DNA_curveprofile_types.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2019 Blender Foundation. All rights reserved. */
3 
8 #pragma once
9 
10 #include "DNA_vec_types.h"
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
21 typedef struct CurveProfilePoint {
23  float x, y;
25  short flag;
27  char h1, h2;
30  float h1_loc[2];
31  float h2_loc[2];
32  char _pad[4];
36 
38 enum {
39  PROF_SELECT = (1 << 0),
40  PROF_H1_SELECT = (1 << 1),
41  PROF_H2_SELECT = (1 << 2),
42 };
43 
45 typedef struct CurveProfile {
47  short path_len;
49  short segments_len;
51  int preset;
59  int flag;
65 
67 enum {
68  PROF_USE_CLIP = (1 << 0), /* Keep control points inside bounding rectangle. */
69  /* PROF_SYMMETRY_MODE = (1 << 1), Unused for now. */
70  PROF_SAMPLE_STRAIGHT_EDGES = (1 << 2), /* Sample extra points on straight edges. */
71  PROF_SAMPLE_EVEN_LENGTHS = (1 << 3), /* Put segments evenly spaced along the path. */
72  PROF_DIRTY_PRESET = (1 << 4), /* Marks when the dynamic preset has been changed. */
73 };
74 
75 typedef enum eCurveProfilePresets {
76  PROF_PRESET_LINE = 0, /* Default simple line between end points. */
77  PROF_PRESET_SUPPORTS = 1, /* Support loops for a regular curved profile. */
78  PROF_PRESET_CORNICE = 2, /* Molding type example. */
79  PROF_PRESET_CROWN = 3, /* Second molding example. */
80  PROF_PRESET_STEPS = 4, /* Dynamic number of steps defined by segments_len. */
82 
83 #ifdef __cplusplus
84 }
85 #endif
@ PROF_H1_SELECT
@ PROF_H2_SELECT
eCurveProfilePresets
@ PROF_PRESET_CROWN
@ PROF_PRESET_LINE
@ PROF_PRESET_CORNICE
@ PROF_PRESET_SUPPORTS
@ PROF_PRESET_STEPS
struct CurveProfile CurveProfile
@ PROF_DIRTY_PRESET
@ PROF_USE_CLIP
@ PROF_SAMPLE_EVEN_LENGTHS
@ PROF_SAMPLE_STRAIGHT_EDGES
struct CurveProfilePoint CurveProfilePoint
struct CurveProfile * profile
CurveProfilePoint * path
CurveProfilePoint * table
CurveProfilePoint * segments