Blender  V2.93
transform_data.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
17  * All rights reserved.
18  */
19 
24 #pragma once
25 
26 struct Object;
27 struct bConstraint;
28 
29 #define TRANSDATABASIC \
30  \
32  void *extra; \
33  \
34  float *loc; \
35  \
36  float iloc[3]; \
37  \
38  float center[3]; \
39  \
40  int flag
41 
42 typedef struct TransDataBasic {
45 
46 typedef struct TransDataMirror {
48  // int pad;
50  float *loc_src;
52 
53 typedef struct TransDataExtension {
55  float drot[3];
56 #if 0 /* TODO: not yet implemented */
57  /* Initial object drotAngle */
58  float drotAngle;
59  /* Initial object drotAxis */
60  float drotAxis[3];
61 #endif
63  float dquat[4];
65  float dscale[3];
67  float *rot;
69  float irot[3];
71  float *quat;
73  float iquat[4];
75  float *rotAngle;
77  float irotAngle;
79  float *rotAxis;
81  float irotAxis[4];
83  float *size;
85  float isize[3];
87  float obmat[4][4];
90  float l_smtx[3][3];
94  float r_mtx[3][3];
96  float r_smtx[3][3];
98  int rotOrder;
100  float oloc[3], orot[3], oquat[4], orotAxis[3], orotAngle;
102 
103 typedef struct TransData2D {
105  float loc[3];
107  float *loc2d;
108 
110  float *h1, *h2;
111  float ih1[2], ih2[2];
112 } TransData2D;
113 
122 
123 typedef struct TransData {
126  float dist;
128  float rdist;
130  float factor;
132  float *val;
134  float ival;
136  float mtx[3][3];
138  float smtx[3][3];
140  float axismtx[3][3];
141  struct Object *ob;
143  struct bConstraint *con;
149  short protectflag;
150 } TransData;
151 
153 enum {
154  TD_SELECTED = 1 << 0,
155  TD_USEQUAT = 1 << 1,
156  TD_NOTCONNECTED = 1 << 2,
158  TD_SINGLESIZE = 1 << 3,
161  TD_NOCENTER = 1 << 5,
163  TD_NO_EXT = 1 << 6,
165  TD_SKIP = 1 << 7,
168  TD_BEZTRIPLE = 1 << 8,
170  TD_NO_LOC = 1 << 9,
172  TD_NOTIMESNAP = 1 << 10,
175  TD_INTVALUES = 1 << 11,
177  TD_MIRROR_X = 1 << 12,
178  TD_MIRROR_Y = 1 << 13,
179  TD_MIRROR_Z = 1 << 14,
181  TD_MIRROR_EDGE_X = 1 << 12,
182  TD_MIRROR_EDGE_Y = 1 << 13,
183  TD_MIRROR_EDGE_Z = 1 << 14,
185  TD_MOVEHANDLE1 = 1 << 15,
186  TD_MOVEHANDLE2 = 1 << 16,
189  TD_PBONE_LOCAL_MTX_P = 1 << 17,
191  TD_PBONE_LOCAL_MTX_C = 1 << 18,
192 };
193 
194 /* Hard min/max for proportional size. */
195 #define T_PROP_SIZE_MIN 1e-6f
196 #define T_PROP_SIZE_MAX 1e12f
unsigned char uint8_t
Definition: stdint.h:81
float ih2[2]
float ih1[2]
float loc[3]
float r_smtx[3][3]
float l_smtx[3][3]
TransDataCurveHandleFlags * hdata
float smtx[3][3]
short protectflag
struct bConstraint * con
float axismtx[3][3]
float mtx[3][3]
TransDataExtension * ext
float * val
struct Object * ob
struct TransData2D TransData2D
struct TransData TransData
struct TransDataCurveHandleFlags TransDataCurveHandleFlags
struct TransDataMirror TransDataMirror
@ TD_MIRROR_EDGE_Y
@ TD_USEQUAT
@ TD_MIRROR_Z
@ TD_INDIVIDUAL_SCALE
@ TD_SINGLESIZE
@ TD_MIRROR_EDGE_Z
@ TD_PBONE_LOCAL_MTX_P
@ TD_BEZTRIPLE
@ TD_PBONE_LOCAL_MTX_C
@ TD_MIRROR_X
@ TD_NOTCONNECTED
@ TD_MOVEHANDLE1
@ TD_INTVALUES
@ TD_MIRROR_Y
@ TD_MIRROR_EDGE_X
@ TD_NO_EXT
@ TD_SELECTED
@ TD_SKIP
@ TD_NO_LOC
@ TD_NOTIMESNAP
@ TD_NOCENTER
@ TD_MOVEHANDLE2
struct TransDataBasic TransDataBasic
struct TransDataExtension TransDataExtension