Blender V5.0
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 bContext;
12struct bPoseChannel;
13struct Object;
14struct Scene;
16struct TransInfo;
17struct View3D;
18struct ViewLayer;
19
20namespace blender::ed::transform {
21
22bool gimbal_axis_pose(Object *ob, const bPoseChannel *pchan, float gmat[3][3]);
23bool gimbal_axis_object(Object *ob, float gmat[3][3]);
24
30 TransInfo *t,
31 short orient_index,
32 const float custom[3][3],
33 float r_spacemtx[3][3]);
34const char *transform_orientations_spacename_get(TransInfo *t, short orient_type);
35void transform_orientations_current_set(TransInfo *t, short orient_index);
36
41 const float x[3],
42 const float y[3],
43 const float z[3]);
44bool createSpaceNormal(float mat[3][3], const float normal[3]);
52bool createSpaceNormalTangent(float mat[3][3], const float normal[3], const float tangent[3]);
57void createSpaceNormalTangent_or_fallback(float mat[3][3],
58 const float normal[3],
59 const float tangent[3]);
60
62 float mat[3][3],
63 const char *name,
64 bool overwrite);
65void applyTransformOrientation(const TransformOrientation *ts, float r_mat[3][3], char r_name[64]);
66
67enum {
73};
74#define ORIENTATION_USE_PLANE(ty) ELEM(ty, ORIENTATION_NORMAL, ORIENTATION_EDGE, ORIENTATION_FACE)
75
82int getTransformOrientation_ex(const Scene *scene,
83 ViewLayer *view_layer,
84 const View3D *v3d,
85 Object *ob,
86 Object *obedit,
87 short around,
88 float r_normal[3],
89 float r_plane[3]);
90int getTransformOrientation(const bContext *C, float r_normal[3], float r_plane[3]);
91
92} // namespace blender::ed::transform
struct bPoseChannel bPoseChannel
struct Object Object
struct TransformOrientation TransformOrientation
#define C
Definition RandGen.cpp:29
SIMD_FORCE_INLINE const btScalar & z() const
Return the z value.
Definition btQuadWord.h:117
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])
int getTransformOrientation_ex(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 createSpaceNormal(float mat[3][3], const float normal[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)
const char * name