Blender V4.3
gizmo_library_intern.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2016 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include "gizmo_geometry.h"
12
13struct bContext;
14struct wmGizmoProperty;
15
16#define DIAL_RESOLUTION 48
17
22 float range_fac; /* factor for arrow min/max distance */
23 float offset;
24
25 /* property range for constrained gizmos */
26 float range;
27 /* min/max value for constrained gizmos */
28 float min, max;
29
31};
32
34 float init_value; /* initial property value */
35 float init_mval[2];
37 float init_matrix_final[4][4];
38 float init_matrix_basis[4][4];
39
40 /* offset of last handling step */
42 /* Total offset added by precision tweaking.
43 * Needed to allow toggling precision on/off without causing jumps */
45};
46
47float gizmo_offset_from_value(GizmoCommonData *data, float value, bool constrained, bool inverted);
49 GizmoInteraction *inter,
50 float offset,
51 bool constrained,
52 bool inverted,
53 bool use_precision);
54
56 wmGizmo *gz, GizmoCommonData *data, wmGizmoProperty *gz_prop, bool constrained, bool inverted);
57
59 const wmGizmo *gz,
60 GizmoInteraction *inter,
61 wmGizmoProperty *gz_prop);
62
63/* -------------------------------------------------------------------- */
64
65void gizmo_color_get(const wmGizmo *gz, bool highlight, float r_color[4]);
66
72 bContext *C, const wmGizmo *gz, const float mval[2], int axis, bool use_offset, float r_co[2]);
73
75 bContext *C, const wmGizmo *gz, const float mval[2], bool use_offset, float r_co[3]);
76
77/* -------------------------------------------------------------------- */
78/* Gizmo RNA Utils. */
79
81 const int spacetype,
82 const int regionid);
83
84/* -------------------------------------------------------------------- */
85/* Gizmo drawing */
86
90void wm_gizmo_geometryinfo_draw(const GizmoGeomInfo *info, bool select, const float color[4]);
92 const float color[4], const float (*verts)[3], uint vert_count, uint pos, uint primitive_type);
unsigned int uint
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 Brightness Control the brightness and contrast of the input color Vector Map input vector components with curves 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 Invert a color
#define C
Definition RandGen.cpp:29
static float verts[][3]
float gizmo_value_from_offset(GizmoCommonData *data, GizmoInteraction *inter, float offset, bool constrained, bool inverted, bool use_precision)
wmGizmo * gizmo_find_from_properties(const IDProperty *properties, const int spacetype, const int regionid)
float gizmo_offset_from_value(GizmoCommonData *data, float value, bool constrained, bool inverted)
void wm_gizmo_geometryinfo_draw(const GizmoGeomInfo *info, bool select, const float color[4])
void gizmo_color_get(const wmGizmo *gz, bool highlight, float r_color[4])
bool gizmo_window_project_3d(bContext *C, const wmGizmo *gz, const float mval[2], bool use_offset, float r_co[3])
bool gizmo_window_project_2d(bContext *C, const wmGizmo *gz, const float mval[2], int axis, bool use_offset, float r_co[2])
void gizmo_property_data_update(wmGizmo *gz, GizmoCommonData *data, wmGizmoProperty *gz_prop, bool constrained, bool inverted)
void wm_gizmo_vec_draw(const float color[4], const float(*verts)[3], uint vert_count, uint pos, uint primitive_type)
void gizmo_property_value_reset(bContext *C, const wmGizmo *gz, GizmoInteraction *inter, wmGizmoProperty *gz_prop)
ccl_device_inline float4 select(const int4 mask, const float4 a, const float4 b)