Blender  V3.3
BKE_curveprofile.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 
4 #pragma once
5 
10 #include "DNA_curveprofile_types.h"
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 struct BlendDataReader;
17 struct BlendWriter;
18 struct CurveProfile;
19 struct CurveProfilePoint;
20 
26 
31 
32 void BKE_curveprofile_free_data(struct CurveProfile *profile);
33 
34 void BKE_curveprofile_free(struct CurveProfile *profile);
35 
36 void BKE_curveprofile_copy_data(struct CurveProfile *target, const struct CurveProfile *profile);
37 
38 struct CurveProfile *BKE_curveprofile_copy(const struct CurveProfile *profile);
39 
49  bool handle_1,
50  bool snap,
51  const float delta[2]);
52 
61 bool BKE_curveprofile_move_point(struct CurveProfile *profile,
62  struct CurveProfilePoint *point,
63  bool snap,
64  const float delta[2]);
65 
71 
79 void BKE_curveprofile_remove_by_flag(struct CurveProfile *profile, short flag);
80 
88 struct CurveProfilePoint *BKE_curveprofile_insert(struct CurveProfile *profile, float x, float y);
89 
95 void BKE_curveprofile_selected_handle_set(struct CurveProfile *profile, int type_1, int type_2);
96 
103 
108 
115 
117 
124 void BKE_curveprofile_init(struct CurveProfile *profile, short segments_len);
125 
126 /* Called for a complete update of the widget after modifications */
127 enum {
130  PROF_UPDATE_CLIP = (1 << 1),
131 };
138 void BKE_curveprofile_update(struct CurveProfile *profile, int update_flags);
139 
149  float length_portion,
150  float *x_out,
151  float *y_out);
152 
153 void BKE_curveprofile_blend_write(struct BlendWriter *writer, const struct CurveProfile *profile);
158 
159 #ifdef __cplusplus
160 }
161 #endif
@ PROF_UPDATE_CLIP
@ PROF_UPDATE_REMOVE_DOUBLES
@ PROF_UPDATE_NONE
void BKE_curveprofile_selected_handle_set(struct CurveProfile *profile, int type_1, int type_2)
bool BKE_curveprofile_move_point(struct CurveProfile *profile, struct CurveProfilePoint *point, bool snap, const float delta[2])
bool BKE_curveprofile_remove_point(struct CurveProfile *profile, struct CurveProfilePoint *point)
void BKE_curveprofile_update(struct CurveProfile *profile, int update_flags)
void BKE_curveprofile_reset_view(struct CurveProfile *profile)
void BKE_curveprofile_blend_read(struct BlendDataReader *reader, struct CurveProfile *profile)
Definition: curveprofile.cc:88
void BKE_curveprofile_copy_data(struct CurveProfile *target, const struct CurveProfile *profile)
void BKE_curveprofile_evaluate_length_portion(const struct CurveProfile *profile, float length_portion, float *x_out, float *y_out)
void BKE_curveprofile_init(struct CurveProfile *profile, short segments_len)
bool BKE_curveprofile_move_handle(struct CurveProfilePoint *point, bool handle_1, bool snap, const float delta[2])
struct CurveProfilePoint * BKE_curveprofile_insert(struct CurveProfile *profile, float x, float y)
void BKE_curveprofile_remove_by_flag(struct CurveProfile *profile, short flag)
void BKE_curveprofile_set_defaults(struct CurveProfile *profile)
struct CurveProfile * BKE_curveprofile_copy(const struct CurveProfile *profile)
void BKE_curveprofile_reset(struct CurveProfile *profile)
void BKE_curveprofile_blend_write(struct BlendWriter *writer, const struct CurveProfile *profile)
Definition: curveprofile.cc:82
int BKE_curveprofile_table_size(const struct CurveProfile *profile)
struct CurveProfile * BKE_curveprofile_add(eCurveProfilePresets preset)
Definition: curveprofile.cc:31
void BKE_curveprofile_free(struct CurveProfile *profile)
Definition: curveprofile.cc:50
void BKE_curveprofile_free_data(struct CurveProfile *profile)
Definition: curveprofile.cc:43
void BKE_curveprofile_reverse(struct CurveProfile *profile)
eCurveProfilePresets
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a point
vector snap(vector a, vector b)
Definition: node_math.h:59
struct CurveProfile * profile