Subversion Repository Public Repository

Divide-Dependencies

This repository has no backups
This repository's network speed is throttled to 100KB/sec

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
/*
   Copyright (C) 2006, 2007 Sony Computer Entertainment Inc.
   All rights reserved.

   Redistribution and use in source and binary forms,
   with or without modification, are permitted provided that the
   following conditions are met:
    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.
    * Neither the name of the Sony Computer Entertainment Inc nor the names
      of its contributors may be used to endorse or promote products derived
      from this software without specific prior written permission.

   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef _VECTORMATH_QUAT_SOA_V_C_H
#define _VECTORMATH_QUAT_SOA_V_C_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

/*-----------------------------------------------------------------------------
 * Definitions
 */
#ifndef _VECTORMATH_INTERNAL_FUNCTIONS
#define _VECTORMATH_INTERNAL_FUNCTIONS

#endif

static inline VmathSoaQuat vmathSoaQMakeFromElems_V( vec_float4 _x, vec_float4 _y, vec_float4 _z, vec_float4 _w )
{
    VmathSoaQuat result;
    vmathSoaQMakeFromElems(&result, _x, _y, _z, _w);
    return result;
}

static inline VmathSoaQuat vmathSoaQMakeFromV3Scalar_V( VmathSoaVector3 xyz, vec_float4 _w )
{
    VmathSoaQuat result;
    vmathSoaQMakeFromV3Scalar(&result, &xyz, _w);
    return result;
}

static inline VmathSoaQuat vmathSoaQMakeFromV4_V( VmathSoaVector4 vec )
{
    VmathSoaQuat result;
    vmathSoaQMakeFromV4(&result, &vec);
    return result;
}

static inline VmathSoaQuat vmathSoaQMakeFromScalar_V( vec_float4 scalar )
{
    VmathSoaQuat result;
    vmathSoaQMakeFromScalar(&result, scalar);
    return result;
}

static inline VmathSoaQuat vmathSoaQMakeFromAos_V( VmathQuat quat )
{
    VmathSoaQuat result;
    vmathSoaQMakeFromAos(&result, &quat);
    return result;
}

static inline VmathSoaQuat vmathSoaQMakeFrom4Aos_V( VmathQuat quat0, VmathQuat quat1, VmathQuat quat2, VmathQuat quat3 )
{
    VmathSoaQuat result;
    vmathSoaQMakeFrom4Aos(&result, &quat0, &quat1, &quat2, &quat3);
    return result;
}

static inline VmathSoaQuat vmathSoaQMakeIdentity_V( )
{
    VmathSoaQuat result;
    vmathSoaQMakeIdentity(&result);
    return result;
}

static inline VmathSoaQuat vmathSoaQLerp_V( vec_float4 t, VmathSoaQuat quat0, VmathSoaQuat quat1 )
{
    VmathSoaQuat result;
    vmathSoaQLerp(&result, t, &quat0, &quat1);
    return result;
}

static inline VmathSoaQuat vmathSoaQSlerp_V( vec_float4 t, VmathSoaQuat unitQuat0, VmathSoaQuat unitQuat1 )
{
    VmathSoaQuat result;
    vmathSoaQSlerp(&result, t, &unitQuat0, &unitQuat1);
    return result;
}

static inline VmathSoaQuat vmathSoaQSquad_V( vec_float4 t, VmathSoaQuat unitQuat0, VmathSoaQuat unitQuat1, VmathSoaQuat unitQuat2, VmathSoaQuat unitQuat3 )
{
    VmathSoaQuat result;
    vmathSoaQSquad(&result, t, &unitQuat0, &unitQuat1, &unitQuat2, &unitQuat3);
    return result;
}

static inline void vmathSoaQGet4Aos_V( VmathSoaQuat quat, VmathQuat *result0, VmathQuat *result1, VmathQuat *result2, VmathQuat *result3 )
{
    vmathSoaQGet4Aos(&quat, result0, result1, result2, result3);
}

static inline void vmathSoaQSetXYZ_V( VmathSoaQuat *result, VmathSoaVector3 vec )
{
    vmathSoaQSetXYZ(result, &vec);
}

static inline VmathSoaVector3 vmathSoaQGetXYZ_V( VmathSoaQuat quat )
{
    VmathSoaVector3 result;
    vmathSoaQGetXYZ(&result, &quat);
    return result;
}

static inline void vmathSoaQSetX_V( VmathSoaQuat *result, vec_float4 _x )
{
    vmathSoaQSetX(result, _x);
}

static inline vec_float4 vmathSoaQGetX_V( VmathSoaQuat quat )
{
    return vmathSoaQGetX(&quat);
}

static inline void vmathSoaQSetY_V( VmathSoaQuat *result, vec_float4 _y )
{
    vmathSoaQSetY(result, _y);
}

static inline vec_float4 vmathSoaQGetY_V( VmathSoaQuat quat )
{
    return vmathSoaQGetY(&quat);
}

static inline void vmathSoaQSetZ_V( VmathSoaQuat *result, vec_float4 _z )
{
    vmathSoaQSetZ(result, _z);
}

static inline vec_float4 vmathSoaQGetZ_V( VmathSoaQuat quat )
{
    return vmathSoaQGetZ(&quat);
}

static inline void vmathSoaQSetW_V( VmathSoaQuat *result, vec_float4 _w )
{
    vmathSoaQSetW(result, _w);
}

static inline vec_float4 vmathSoaQGetW_V( VmathSoaQuat quat )
{
    return vmathSoaQGetW(&quat);
}

static inline void vmathSoaQSetElem_V( VmathSoaQuat *result, int idx, vec_float4 value )
{
    vmathSoaQSetElem(result, idx, value);
}

static inline vec_float4 vmathSoaQGetElem_V( VmathSoaQuat quat, int idx )
{
    return vmathSoaQGetElem(&quat, idx);
}

static inline VmathSoaQuat vmathSoaQAdd_V( VmathSoaQuat quat0, VmathSoaQuat quat1 )
{
    VmathSoaQuat result;
    vmathSoaQAdd(&result, &quat0, &quat1);
    return result;
}

static inline VmathSoaQuat vmathSoaQSub_V( VmathSoaQuat quat0, VmathSoaQuat quat1 )
{
    VmathSoaQuat result;
    vmathSoaQSub(&result, &quat0, &quat1);
    return result;
}

static inline VmathSoaQuat vmathSoaQScalarMul_V( VmathSoaQuat quat, vec_float4 scalar )
{
    VmathSoaQuat result;
    vmathSoaQScalarMul(&result, &quat, scalar);
    return result;
}

static inline VmathSoaQuat vmathSoaQScalarDiv_V( VmathSoaQuat quat, vec_float4 scalar )
{
    VmathSoaQuat result;
    vmathSoaQScalarDiv(&result, &quat, scalar);
    return result;
}

static inline VmathSoaQuat vmathSoaQNeg_V( VmathSoaQuat quat )
{
    VmathSoaQuat result;
    vmathSoaQNeg(&result, &quat);
    return result;
}

static inline vec_float4 vmathSoaQDot_V( VmathSoaQuat quat0, VmathSoaQuat quat1 )
{
    return vmathSoaQDot(&quat0, &quat1);
}

static inline vec_float4 vmathSoaQNorm_V( VmathSoaQuat quat )
{
    return vmathSoaQNorm(&quat);
}

static inline vec_float4 vmathSoaQLength_V( VmathSoaQuat quat )
{
    return vmathSoaQLength(&quat);
}

static inline VmathSoaQuat vmathSoaQNormalize_V( VmathSoaQuat quat )
{
    VmathSoaQuat result;
    vmathSoaQNormalize(&result, &quat);
    return result;
}

static inline VmathSoaQuat vmathSoaQMakeRotationArc_V( VmathSoaVector3 unitVec0, VmathSoaVector3 unitVec1 )
{
    VmathSoaQuat result;
    vmathSoaQMakeRotationArc(&result, &unitVec0, &unitVec1);
    return result;
}

static inline VmathSoaQuat vmathSoaQMakeRotationAxis_V( vec_float4 radians, VmathSoaVector3 unitVec )
{
    VmathSoaQuat result;
    vmathSoaQMakeRotationAxis(&result, radians, &unitVec);
    return result;
}

static inline VmathSoaQuat vmathSoaQMakeRotationX_V( vec_float4 radians )
{
    VmathSoaQuat result;
    vmathSoaQMakeRotationX(&result, radians);
    return result;
}

static inline VmathSoaQuat vmathSoaQMakeRotationY_V( vec_float4 radians )
{
    VmathSoaQuat result;
    vmathSoaQMakeRotationY(&result, radians);
    return result;
}

static inline VmathSoaQuat vmathSoaQMakeRotationZ_V( vec_float4 radians )
{
    VmathSoaQuat result;
    vmathSoaQMakeRotationZ(&result, radians);
    return result;
}

static inline VmathSoaQuat vmathSoaQMul_V( VmathSoaQuat quat0, VmathSoaQuat quat1 )
{
    VmathSoaQuat result;
    vmathSoaQMul(&result, &quat0, &quat1);
    return result;
}

static inline VmathSoaVector3 vmathSoaQRotate_V( VmathSoaQuat quat, VmathSoaVector3 vec )
{
    VmathSoaVector3 result;
    vmathSoaQRotate(&result, &quat, &vec);
    return result;
}

static inline VmathSoaQuat vmathSoaQConj_V( VmathSoaQuat quat )
{
    VmathSoaQuat result;
    vmathSoaQConj(&result, &quat);
    return result;
}

static inline VmathSoaQuat vmathSoaQSelect_V( VmathSoaQuat quat0, VmathSoaQuat quat1, vec_uint4 select1 )
{
    VmathSoaQuat result;
    vmathSoaQSelect(&result, &quat0, &quat1, select1);
    return result;
}

#ifdef _VECTORMATH_DEBUG

static inline void vmathSoaQPrint_V( VmathSoaQuat quat )
{
    vmathSoaQPrint(&quat);
}

static inline void vmathSoaQPrints_V( VmathSoaQuat quat, const char *name )
{
    vmathSoaQPrints(&quat, name);
}

#endif

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif

Commits for Divide-Dependencies/debug-draw/samples/vectormath/spu/c/quat_soa_v.h

Diff revisions: vs.
Revision Author Commited Message
70 IonutCava picture IonutCava Wed 26 Jul, 2017 20:21:42 +0000

[Ionut]
- Added Hodgman’s variant of the debug-draw library. ref: https://github.com/hodgman/debug-draw