Blender V4.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
9#pragma once
10
11#include "RE_engine.h"
12
13struct bPoseChannel;
14struct Object;
15struct TransInfo;
17
18bool gimbal_axis_pose(Object *ob, const bPoseChannel *pchan, float gmat[3][3]);
19bool gimbal_axis_object(Object *ob, float gmat[3][3]);
20
26 TransInfo *t,
27 short orient_index,
28 const float custom[3][3],
29 float r_spacemtx[3][3]);
30const char *transform_orientations_spacename_get(TransInfo *t, short orient_type);
31void transform_orientations_current_set(TransInfo *t, short orient_index);
32
37 const float x[3],
38 const float y[3],
39 const float z[3]);
40bool createSpaceNormal(float mat[3][3], const float normal[3]);
46bool createSpaceNormalTangent(float mat[3][3], const float normal[3], const float tangent[3]);
47
49 float mat[3][3],
50 const char *name,
51 bool overwrite);
52void applyTransformOrientation(const TransformOrientation *ts, float r_mat[3][3], char r_name[64]);
53
54enum {
60};
61#define ORIENTATION_USE_PLANE(ty) ELEM(ty, ORIENTATION_NORMAL, ORIENTATION_EDGE, ORIENTATION_FACE)
62
63int getTransformOrientation_ex(const Scene *scene,
64 ViewLayer *view_layer,
65 const View3D *v3d,
66 Object *ob,
67 Object *obedit,
68 float normal[3],
69 float plane[3],
70 short around);
71int getTransformOrientation(const bContext *C, float normal[3], float plane[3]);
SIMD_FORCE_INLINE const btScalar & z() const
Return the z value.
Definition btQuadWord.h:117
bool transform_orientations_create_from_axis(float mat[3][3], const float x[3], const float y[3], const float z[3])
bool createSpaceNormalTangent(float mat[3][3], const float normal[3], const float tangent[3])
int getTransformOrientation_ex(const Scene *scene, ViewLayer *view_layer, const View3D *v3d, Object *ob, Object *obedit, float normal[3], float plane[3], short around)
void applyTransformOrientation(const TransformOrientation *ts, float r_mat[3][3], char r_name[64])
bool createSpaceNormal(float mat[3][3], const float normal[3])
const char * transform_orientations_spacename_get(TransInfo *t, short orient_type)
int getTransformOrientation(const bContext *C, float normal[3], float plane[3])
@ ORIENTATION_NORMAL
TransformOrientation * addMatrixSpace(bContext *C, float mat[3][3], const char *name, bool overwrite)
bool gimbal_axis_object(Object *ob, float gmat[3][3])
void transform_orientations_current_set(TransInfo *t, short orient_index)
short transform_orientation_matrix_get(bContext *C, TransInfo *t, short orient_index, const float custom[3][3], float r_spacemtx[3][3])
bool gimbal_axis_pose(Object *ob, const bPoseChannel *pchan, float gmat[3][3])