Blender  V3.3
gizmo_library_intern.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2016 Blender Foundation. All rights reserved. */
3 
8 #pragma once
9 
13 typedef struct GizmoCommonData {
14  float range_fac; /* factor for arrow min/max distance */
15  float offset;
16 
17  /* property range for constrained gizmos */
18  float range;
19  /* min/max value for constrained gizmos */
20  float min, max;
21 
24 
25 typedef struct GizmoInteraction {
26  float init_value; /* initial property value */
27  float init_mval[2];
28  float init_offset;
29  float init_matrix_final[4][4];
30  float init_matrix_basis[4][4];
31 
32  /* offset of last handling step */
33  float prev_offset;
34  /* Total offset added by precision tweaking.
35  * Needed to allow toggling precision on/off without causing jumps */
38 
39 float gizmo_offset_from_value(GizmoCommonData *data, float value, bool constrained, bool inverted);
41  GizmoInteraction *inter,
42  float offset,
43  bool constrained,
44  bool inverted,
45  bool use_precision);
46 
47 void gizmo_property_data_update(struct wmGizmo *gz,
49  wmGizmoProperty *gz_prop,
50  bool constrained,
51  bool inverted);
52 
54  const struct wmGizmo *gz,
55  GizmoInteraction *inter,
56  wmGizmoProperty *gz_prop);
57 
58 /* -------------------------------------------------------------------- */
59 
60 void gizmo_color_get(const struct wmGizmo *gz, bool highlight, float r_color[4]);
61 
67  const struct wmGizmo *gz,
68  const float mval[2],
69  int axis,
70  bool use_offset,
71  float r_co[2]);
72 
74  bContext *C, const struct wmGizmo *gz, const float mval[2], bool use_offset, float r_co[3]);
75 
76 /* -------------------------------------------------------------------- */
77 /* Gizmo drawing */
78 
79 #include "gizmo_geometry.h"
80 
84 void wm_gizmo_geometryinfo_draw(const struct GizmoGeomInfo *info,
85  bool select,
86  const float color[4]);
88  const float color[4], const float (*verts)[3], uint vert_count, uint pos, uint primitive_type);
unsigned int uint
Definition: BLI_sys_types.h:67
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a color
#define C
Definition: RandGen.cpp:25
__forceinline const avxb select(const avxb &m, const avxb &t, const avxb &f)
Definition: avxb.h:154
static float verts[][3]
bool gizmo_window_project_3d(bContext *C, const struct wmGizmo *gz, const float mval[2], bool use_offset, float r_co[3])
float gizmo_value_from_offset(GizmoCommonData *data, GizmoInteraction *inter, float offset, bool constrained, bool inverted, bool use_precision)
float gizmo_offset_from_value(GizmoCommonData *data, float value, bool constrained, bool inverted)
void wm_gizmo_geometryinfo_draw(const struct GizmoGeomInfo *info, bool select, const float color[4])
bool gizmo_window_project_2d(bContext *C, const struct wmGizmo *gz, const float mval[2], int axis, bool use_offset, float r_co[2])
struct GizmoCommonData GizmoCommonData
void gizmo_property_value_reset(bContext *C, const struct wmGizmo *gz, GizmoInteraction *inter, wmGizmoProperty *gz_prop)
struct GizmoInteraction GizmoInteraction
void wm_gizmo_vec_draw(const float color[4], const float(*verts)[3], uint vert_count, uint pos, uint primitive_type)
void gizmo_color_get(const struct wmGizmo *gz, bool highlight, float r_color[4])
void gizmo_property_data_update(struct wmGizmo *gz, GizmoCommonData *data, wmGizmoProperty *gz_prop, bool constrained, bool inverted)
uint pos
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
float init_matrix_basis[4][4]
float init_matrix_final[4][4]