Blender V5.3
transform_orientations.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11struct TransInfo;
12namespace blender {
13
14struct bContext;
15struct bPoseChannel;
16struct Main;
17struct Object;
18struct Scene;
20struct View3D;
21struct ViewLayer;
22
23namespace ed::transform {
24
25bool gimbal_axis_pose(Object *ob, const bPoseChannel *pchan, float gmat[3][3]);
26bool gimbal_axis_object(Object *ob, float gmat[3][3]);
27
33 TransInfo *t,
34 short orient_index,
35 const float custom[3][3],
36 float r_spacemtx[3][3]);
37const char *transform_orientations_spacename_get(TransInfo *t, short orient_type);
38void transform_orientations_current_set(TransInfo *t, short orient_index);
39
44 const float x[3],
45 const float y[3],
46 const float z[3]);
47bool createSpaceNormal(float mat[3][3], const float normal[3]);
55bool createSpaceNormalTangent(float mat[3][3], const float normal[3], const float tangent[3]);
60void createSpaceNormalTangent_or_fallback(float mat[3][3],
61 const float normal[3],
62 const float tangent[3]);
63
64TransformOrientation *addMatrixSpace(bContext *C,
65 float mat[3][3],
66 const char *name,
67 bool overwrite);
68void applyTransformOrientation(const TransformOrientation *ts, float r_mat[3][3], char r_name[64]);
69
70enum {
76};
77#define ORIENTATION_USE_PLANE(ty) ELEM(ty, ORIENTATION_NORMAL, ORIENTATION_EDGE, ORIENTATION_FACE)
78
85int getTransformOrientation_ex(const Main &bmain,
86 const Scene *scene,
87 ViewLayer *view_layer,
88 const View3D *v3d,
89 Object *ob,
90 Object *obedit,
91 short around,
92 float r_normal[3],
93 float r_plane[3]);
94int getTransformOrientation(const bContext *C, float r_normal[3], float r_plane[3]);
95
96} // namespace ed::transform
97} // namespace blender
#define C
Definition RandGen.cpp:29
SIMD_FORCE_INLINE const btScalar & z() const
Return the z value.
Definition btQuadWord.h:117
Definition scene.h:133
void createSpaceNormalTangent_or_fallback(float mat[3][3], const float normal[3], const float tangent[3])
TransformOrientation * addMatrixSpace(bContext *C, float mat[3][3], const char *name, const bool overwrite)
int getTransformOrientation(const bContext *C, float r_normal[3], float r_plane[3])
bool gimbal_axis_pose(Object *ob, const bPoseChannel *pchan, float gmat[3][3])
bool createSpaceNormal(float mat[3][3], const float normal[3])
int getTransformOrientation_ex(const Main &bmain, const Scene *scene, ViewLayer *view_layer, const View3D *v3d, Object *ob, Object *obedit, const short around, float r_normal[3], float r_plane[3])
bool createSpaceNormalTangent(float mat[3][3], const float normal[3], const float tangent[3])
void applyTransformOrientation(const TransformOrientation *ts, float r_mat[3][3], char r_name[64])
bool transform_orientations_create_from_axis(float mat[3][3], const float x[3], const float y[3], const float z[3])
short transform_orientation_matrix_get(bContext *C, TransInfo *t, short orient_index, const float custom[3][3], float r_spacemtx[3][3])
const char * transform_orientations_spacename_get(TransInfo *t, const short orient_type)
bool gimbal_axis_object(Object *ob, float gmat[3][3])
void transform_orientations_current_set(TransInfo *t, const short orient_index)
BMesh Iterators.