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
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
/*
   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_VEC_AOS_V_C_H
#define _VECTORMATH_VEC_AOS_V_C_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

/*-----------------------------------------------------------------------------
 * Constants
 * for permutes words are labeled [x,y,z,w] [a,b,c,d]
 */
#define _VECTORMATH_PERM_X 0x00010203
#define _VECTORMATH_PERM_Y 0x04050607
#define _VECTORMATH_PERM_Z 0x08090a0b
#define _VECTORMATH_PERM_W 0x0c0d0e0f
#define _VECTORMATH_PERM_A 0x10111213
#define _VECTORMATH_PERM_B 0x14151617
#define _VECTORMATH_PERM_C 0x18191a1b
#define _VECTORMATH_PERM_D 0x1c1d1e1f
#define _VECTORMATH_PERM_XYZA (vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_X, _VECTORMATH_PERM_Y, _VECTORMATH_PERM_Z, _VECTORMATH_PERM_A }
#define _VECTORMATH_PERM_ZXYW (vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_Z, _VECTORMATH_PERM_X, _VECTORMATH_PERM_Y, _VECTORMATH_PERM_W }
#define _VECTORMATH_PERM_YZXW (vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_Y, _VECTORMATH_PERM_Z, _VECTORMATH_PERM_X, _VECTORMATH_PERM_W }
#define _VECTORMATH_PERM_YZAB (vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_Y, _VECTORMATH_PERM_Z, _VECTORMATH_PERM_A, _VECTORMATH_PERM_B }
#define _VECTORMATH_PERM_ZABC (vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_Z, _VECTORMATH_PERM_A, _VECTORMATH_PERM_B, _VECTORMATH_PERM_C }
#define _VECTORMATH_PERM_XYAW (vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_X, _VECTORMATH_PERM_Y, _VECTORMATH_PERM_A, _VECTORMATH_PERM_W }
#define _VECTORMATH_PERM_XAZW (vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_X, _VECTORMATH_PERM_A, _VECTORMATH_PERM_Z, _VECTORMATH_PERM_W }
#define _VECTORMATH_MASK_0xF000 (vec_uint4){ 0xffffffff, 0, 0, 0 }
#define _VECTORMATH_MASK_0x0F00 (vec_uint4){ 0, 0xffffffff, 0, 0 }
#define _VECTORMATH_MASK_0x00F0 (vec_uint4){ 0, 0, 0xffffffff, 0 }
#define _VECTORMATH_MASK_0x000F (vec_uint4){ 0, 0, 0, 0xffffffff }
#define _VECTORMATH_UNIT_1000 (vec_float4){ 1.0f, 0.0f, 0.0f, 0.0f }
#define _VECTORMATH_UNIT_0100 (vec_float4){ 0.0f, 1.0f, 0.0f, 0.0f }
#define _VECTORMATH_UNIT_0010 (vec_float4){ 0.0f, 0.0f, 1.0f, 0.0f }
#define _VECTORMATH_UNIT_0001 (vec_float4){ 0.0f, 0.0f, 0.0f, 1.0f }
#define _VECTORMATH_SLERP_TOL 0.999f

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

#endif

static inline VmathVector3 vmathV3MakeFromElems_V( float _x, float _y, float _z )
{
    VmathVector3 result;
    vmathV3MakeFromElems(&result, _x, _y, _z);
    return result;
}

static inline VmathVector3 vmathV3MakeFromP3_V( VmathPoint3 pnt )
{
    VmathVector3 result;
    vmathV3MakeFromP3(&result, &pnt);
    return result;
}

static inline VmathVector3 vmathV3MakeFromScalar_V( float scalar )
{
    VmathVector3 result;
    vmathV3MakeFromScalar(&result, scalar);
    return result;
}

static inline VmathVector3 vmathV3MakeFrom128_V( vec_float4 vf4 )
{
    VmathVector3 result;
    vmathV3MakeFrom128(&result, vf4);
    return result;
}

static inline VmathVector3 vmathV3MakeXAxis_V( )
{
    VmathVector3 result;
    vmathV3MakeXAxis(&result);
    return result;
}

static inline VmathVector3 vmathV3MakeYAxis_V( )
{
    VmathVector3 result;
    vmathV3MakeYAxis(&result);
    return result;
}

static inline VmathVector3 vmathV3MakeZAxis_V( )
{
    VmathVector3 result;
    vmathV3MakeZAxis(&result);
    return result;
}

static inline VmathVector3 vmathV3Lerp_V( float t, VmathVector3 vec0, VmathVector3 vec1 )
{
    VmathVector3 result;
    vmathV3Lerp(&result, t, &vec0, &vec1);
    return result;
}

static inline VmathVector3 vmathV3Slerp_V( float t, VmathVector3 unitVec0, VmathVector3 unitVec1 )
{
    VmathVector3 result;
    vmathV3Slerp(&result, t, &unitVec0, &unitVec1);
    return result;
}

static inline vec_float4 vmathV3Get128_V( VmathVector3 vec )
{
    return vmathV3Get128(&vec);
}

static inline void vmathV3StoreXYZ_V( VmathVector3 vec, vec_float4 *quad )
{
    vmathV3StoreXYZ(&vec, quad);
}

static inline void vmathV3LoadXYZArray_V( VmathVector3 *vec0, VmathVector3 *vec1, VmathVector3 *vec2, VmathVector3 *vec3, const vec_float4 *threeQuads )
{
    vmathV3LoadXYZArray(vec0, vec1, vec2, vec3, threeQuads);
}

static inline void vmathV3StoreXYZArray_V( VmathVector3 vec0, VmathVector3 vec1, VmathVector3 vec2, VmathVector3 vec3, vec_float4 *threeQuads )
{
    vmathV3StoreXYZArray(&vec0, &vec1, &vec2, &vec3, threeQuads);
}

static inline void vmathV3StoreHalfFloats_V( VmathVector3 vec0, VmathVector3 vec1, VmathVector3 vec2, VmathVector3 vec3, VmathVector3 vec4, VmathVector3 vec5, VmathVector3 vec6, VmathVector3 vec7, vec_ushort8 *threeQuads )
{
    vmathV3StoreHalfFloats(&vec0, &vec1, &vec2, &vec3, &vec4, &vec5, &vec6, &vec7, threeQuads);
}

static inline void vmathV3SetX_V( VmathVector3 *result, float _x )
{
    vmathV3SetX(result, _x);
}

static inline float vmathV3GetX_V( VmathVector3 vec )
{
    return vmathV3GetX(&vec);
}

static inline void vmathV3SetY_V( VmathVector3 *result, float _y )
{
    vmathV3SetY(result, _y);
}

static inline float vmathV3GetY_V( VmathVector3 vec )
{
    return vmathV3GetY(&vec);
}

static inline void vmathV3SetZ_V( VmathVector3 *result, float _z )
{
    vmathV3SetZ(result, _z);
}

static inline float vmathV3GetZ_V( VmathVector3 vec )
{
    return vmathV3GetZ(&vec);
}

static inline void vmathV3SetElem_V( VmathVector3 *result, int idx, float value )
{
    vmathV3SetElem(result, idx, value);
}

static inline float vmathV3GetElem_V( VmathVector3 vec, int idx )
{
    return vmathV3GetElem(&vec, idx);
}

static inline VmathVector3 vmathV3Add_V( VmathVector3 vec0, VmathVector3 vec1 )
{
    VmathVector3 result;
    vmathV3Add(&result, &vec0, &vec1);
    return result;
}

static inline VmathVector3 vmathV3Sub_V( VmathVector3 vec0, VmathVector3 vec1 )
{
    VmathVector3 result;
    vmathV3Sub(&result, &vec0, &vec1);
    return result;
}

static inline VmathPoint3 vmathV3AddP3_V( VmathVector3 vec, VmathPoint3 pnt1 )
{
    VmathPoint3 result;
    vmathV3AddP3(&result, &vec, &pnt1);
    return result;
}

static inline VmathVector3 vmathV3ScalarMul_V( VmathVector3 vec, float scalar )
{
    VmathVector3 result;
    vmathV3ScalarMul(&result, &vec, scalar);
    return result;
}

static inline VmathVector3 vmathV3ScalarDiv_V( VmathVector3 vec, float scalar )
{
    VmathVector3 result;
    vmathV3ScalarDiv(&result, &vec, scalar);
    return result;
}

static inline VmathVector3 vmathV3Neg_V( VmathVector3 vec )
{
    VmathVector3 result;
    vmathV3Neg(&result, &vec);
    return result;
}

static inline VmathVector3 vmathV3MulPerElem_V( VmathVector3 vec0, VmathVector3 vec1 )
{
    VmathVector3 result;
    vmathV3MulPerElem(&result, &vec0, &vec1);
    return result;
}

static inline VmathVector3 vmathV3DivPerElem_V( VmathVector3 vec0, VmathVector3 vec1 )
{
    VmathVector3 result;
    vmathV3DivPerElem(&result, &vec0, &vec1);
    return result;
}

static inline VmathVector3 vmathV3RecipPerElem_V( VmathVector3 vec )
{
    VmathVector3 result;
    vmathV3RecipPerElem(&result, &vec);
    return result;
}

static inline VmathVector3 vmathV3SqrtPerElem_V( VmathVector3 vec )
{
    VmathVector3 result;
    vmathV3SqrtPerElem(&result, &vec);
    return result;
}

static inline VmathVector3 vmathV3RsqrtPerElem_V( VmathVector3 vec )
{
    VmathVector3 result;
    vmathV3RsqrtPerElem(&result, &vec);
    return result;
}

static inline VmathVector3 vmathV3AbsPerElem_V( VmathVector3 vec )
{
    VmathVector3 result;
    vmathV3AbsPerElem(&result, &vec);
    return result;
}

static inline VmathVector3 vmathV3CopySignPerElem_V( VmathVector3 vec0, VmathVector3 vec1 )
{
    VmathVector3 result;
    vmathV3CopySignPerElem(&result, &vec0, &vec1);
    return result;
}

static inline VmathVector3 vmathV3MaxPerElem_V( VmathVector3 vec0, VmathVector3 vec1 )
{
    VmathVector3 result;
    vmathV3MaxPerElem(&result, &vec0, &vec1);
    return result;
}

static inline float vmathV3MaxElem_V( VmathVector3 vec )
{
    return vmathV3MaxElem(&vec);
}

static inline VmathVector3 vmathV3MinPerElem_V( VmathVector3 vec0, VmathVector3 vec1 )
{
    VmathVector3 result;
    vmathV3MinPerElem(&result, &vec0, &vec1);
    return result;
}

static inline float vmathV3MinElem_V( VmathVector3 vec )
{
    return vmathV3MinElem(&vec);
}

static inline float vmathV3Sum_V( VmathVector3 vec )
{
    return vmathV3Sum(&vec);
}

static inline float vmathV3Dot_V( VmathVector3 vec0, VmathVector3 vec1 )
{
    return vmathV3Dot(&vec0, &vec1);
}

static inline float vmathV3LengthSqr_V( VmathVector3 vec )
{
    return vmathV3LengthSqr(&vec);
}

static inline float vmathV3Length_V( VmathVector3 vec )
{
    return vmathV3Length(&vec);
}

static inline VmathVector3 vmathV3Normalize_V( VmathVector3 vec )
{
    VmathVector3 result;
    vmathV3Normalize(&result, &vec);
    return result;
}

static inline VmathVector3 vmathV3Cross_V( VmathVector3 vec0, VmathVector3 vec1 )
{
    VmathVector3 result;
    vmathV3Cross(&result, &vec0, &vec1);
    return result;
}

static inline VmathVector3 vmathV3Select_V( VmathVector3 vec0, VmathVector3 vec1, unsigned int select1 )
{
    VmathVector3 result;
    vmathV3Select(&result, &vec0, &vec1, select1);
    return result;
}

#ifdef _VECTORMATH_DEBUG

static inline void vmathV3Print_V( VmathVector3 vec )
{
    vmathV3Print(&vec);
}

static inline void vmathV3Prints_V( VmathVector3 vec, const char *name )
{
    vmathV3Prints(&vec, name);
}

#endif

static inline VmathVector4 vmathV4MakeFromElems_V( float _x, float _y, float _z, float _w )
{
    VmathVector4 result;
    vmathV4MakeFromElems(&result, _x, _y, _z, _w);
    return result;
}

static inline VmathVector4 vmathV4MakeFromV3Scalar_V( VmathVector3 xyz, float _w )
{
    VmathVector4 result;
    vmathV4MakeFromV3Scalar(&result, &xyz, _w);
    return result;
}

static inline VmathVector4 vmathV4MakeFromV3_V( VmathVector3 vec )
{
    VmathVector4 result;
    vmathV4MakeFromV3(&result, &vec);
    return result;
}

static inline VmathVector4 vmathV4MakeFromP3_V( VmathPoint3 pnt )
{
    VmathVector4 result;
    vmathV4MakeFromP3(&result, &pnt);
    return result;
}

static inline VmathVector4 vmathV4MakeFromQ_V( VmathQuat quat )
{
    VmathVector4 result;
    vmathV4MakeFromQ(&result, &quat);
    return result;
}

static inline VmathVector4 vmathV4MakeFromScalar_V( float scalar )
{
    VmathVector4 result;
    vmathV4MakeFromScalar(&result, scalar);
    return result;
}

static inline VmathVector4 vmathV4MakeFrom128_V( vec_float4 vf4 )
{
    VmathVector4 result;
    vmathV4MakeFrom128(&result, vf4);
    return result;
}

static inline VmathVector4 vmathV4MakeXAxis_V( )
{
    VmathVector4 result;
    vmathV4MakeXAxis(&result);
    return result;
}

static inline VmathVector4 vmathV4MakeYAxis_V( )
{
    VmathVector4 result;
    vmathV4MakeYAxis(&result);
    return result;
}

static inline VmathVector4 vmathV4MakeZAxis_V( )
{
    VmathVector4 result;
    vmathV4MakeZAxis(&result);
    return result;
}

static inline VmathVector4 vmathV4MakeWAxis_V( )
{
    VmathVector4 result;
    vmathV4MakeWAxis(&result);
    return result;
}

static inline VmathVector4 vmathV4Lerp_V( float t, VmathVector4 vec0, VmathVector4 vec1 )
{
    VmathVector4 result;
    vmathV4Lerp(&result, t, &vec0, &vec1);
    return result;
}

static inline VmathVector4 vmathV4Slerp_V( float t, VmathVector4 unitVec0, VmathVector4 unitVec1 )
{
    VmathVector4 result;
    vmathV4Slerp(&result, t, &unitVec0, &unitVec1);
    return result;
}

static inline vec_float4 vmathV4Get128_V( VmathVector4 vec )
{
    return vmathV4Get128(&vec);
}

static inline void vmathV4StoreHalfFloats_V( VmathVector4 vec0, VmathVector4 vec1, VmathVector4 vec2, VmathVector4 vec3, vec_ushort8 *twoQuads )
{
    vmathV4StoreHalfFloats(&vec0, &vec1, &vec2, &vec3, twoQuads);
}

static inline void vmathV4SetXYZ_V( VmathVector4 *result, VmathVector3 vec )
{
    vmathV4SetXYZ(result, &vec);
}

static inline VmathVector3 vmathV4GetXYZ_V( VmathVector4 vec )
{
    VmathVector3 result;
    vmathV4GetXYZ(&result, &vec);
    return result;
}

static inline void vmathV4SetX_V( VmathVector4 *result, float _x )
{
    vmathV4SetX(result, _x);
}

static inline float vmathV4GetX_V( VmathVector4 vec )
{
    return vmathV4GetX(&vec);
}

static inline void vmathV4SetY_V( VmathVector4 *result, float _y )
{
    vmathV4SetY(result, _y);
}

static inline float vmathV4GetY_V( VmathVector4 vec )
{
    return vmathV4GetY(&vec);
}

static inline void vmathV4SetZ_V( VmathVector4 *result, float _z )
{
    vmathV4SetZ(result, _z);
}

static inline float vmathV4GetZ_V( VmathVector4 vec )
{
    return vmathV4GetZ(&vec);
}

static inline void vmathV4SetW_V( VmathVector4 *result, float _w )
{
    vmathV4SetW(result, _w);
}

static inline float vmathV4GetW_V( VmathVector4 vec )
{
    return vmathV4GetW(&vec);
}

static inline void vmathV4SetElem_V( VmathVector4 *result, int idx, float value )
{
    vmathV4SetElem(result, idx, value);
}

static inline float vmathV4GetElem_V( VmathVector4 vec, int idx )
{
    return vmathV4GetElem(&vec, idx);
}

static inline VmathVector4 vmathV4Add_V( VmathVector4 vec0, VmathVector4 vec1 )
{
    VmathVector4 result;
    vmathV4Add(&result, &vec0, &vec1);
    return result;
}

static inline VmathVector4 vmathV4Sub_V( VmathVector4 vec0, VmathVector4 vec1 )
{
    VmathVector4 result;
    vmathV4Sub(&result, &vec0, &vec1);
    return result;
}

static inline VmathVector4 vmathV4ScalarMul_V( VmathVector4 vec, float scalar )
{
    VmathVector4 result;
    vmathV4ScalarMul(&result, &vec, scalar);
    return result;
}

static inline VmathVector4 vmathV4ScalarDiv_V( VmathVector4 vec, float scalar )
{
    VmathVector4 result;
    vmathV4ScalarDiv(&result, &vec, scalar);
    return result;
}

static inline VmathVector4 vmathV4Neg_V( VmathVector4 vec )
{
    VmathVector4 result;
    vmathV4Neg(&result, &vec);
    return result;
}

static inline VmathVector4 vmathV4MulPerElem_V( VmathVector4 vec0, VmathVector4 vec1 )
{
    VmathVector4 result;
    vmathV4MulPerElem(&result, &vec0, &vec1);
    return result;
}

static inline VmathVector4 vmathV4DivPerElem_V( VmathVector4 vec0, VmathVector4 vec1 )
{
    VmathVector4 result;
    vmathV4DivPerElem(&result, &vec0, &vec1);
    return result;
}

static inline VmathVector4 vmathV4RecipPerElem_V( VmathVector4 vec )
{
    VmathVector4 result;
    vmathV4RecipPerElem(&result, &vec);
    return result;
}

static inline VmathVector4 vmathV4SqrtPerElem_V( VmathVector4 vec )
{
    VmathVector4 result;
    vmathV4SqrtPerElem(&result, &vec);
    return result;
}

static inline VmathVector4 vmathV4RsqrtPerElem_V( VmathVector4 vec )
{
    VmathVector4 result;
    vmathV4RsqrtPerElem(&result, &vec);
    return result;
}

static inline VmathVector4 vmathV4AbsPerElem_V( VmathVector4 vec )
{
    VmathVector4 result;
    vmathV4AbsPerElem(&result, &vec);
    return result;
}

static inline VmathVector4 vmathV4CopySignPerElem_V( VmathVector4 vec0, VmathVector4 vec1 )
{
    VmathVector4 result;
    vmathV4CopySignPerElem(&result, &vec0, &vec1);
    return result;
}

static inline VmathVector4 vmathV4MaxPerElem_V( VmathVector4 vec0, VmathVector4 vec1 )
{
    VmathVector4 result;
    vmathV4MaxPerElem(&result, &vec0, &vec1);
    return result;
}

static inline float vmathV4MaxElem_V( VmathVector4 vec )
{
    return vmathV4MaxElem(&vec);
}

static inline VmathVector4 vmathV4MinPerElem_V( VmathVector4 vec0, VmathVector4 vec1 )
{
    VmathVector4 result;
    vmathV4MinPerElem(&result, &vec0, &vec1);
    return result;
}

static inline float vmathV4MinElem_V( VmathVector4 vec )
{
    return vmathV4MinElem(&vec);
}

static inline float vmathV4Sum_V( VmathVector4 vec )
{
    return vmathV4Sum(&vec);
}

static inline float vmathV4Dot_V( VmathVector4 vec0, VmathVector4 vec1 )
{
    return vmathV4Dot(&vec0, &vec1);
}

static inline float vmathV4LengthSqr_V( VmathVector4 vec )
{
    return vmathV4LengthSqr(&vec);
}

static inline float vmathV4Length_V( VmathVector4 vec )
{
    return vmathV4Length(&vec);
}

static inline VmathVector4 vmathV4Normalize_V( VmathVector4 vec )
{
    VmathVector4 result;
    vmathV4Normalize(&result, &vec);
    return result;
}

static inline VmathVector4 vmathV4Select_V( VmathVector4 vec0, VmathVector4 vec1, unsigned int select1 )
{
    VmathVector4 result;
    vmathV4Select(&result, &vec0, &vec1, select1);
    return result;
}

#ifdef _VECTORMATH_DEBUG

static inline void vmathV4Print_V( VmathVector4 vec )
{
    vmathV4Print(&vec);
}

static inline void vmathV4Prints_V( VmathVector4 vec, const char *name )
{
    vmathV4Prints(&vec, name);
}

#endif

static inline VmathPoint3 vmathP3MakeFromElems_V( float _x, float _y, float _z )
{
    VmathPoint3 result;
    vmathP3MakeFromElems(&result, _x, _y, _z);
    return result;
}

static inline VmathPoint3 vmathP3MakeFromV3_V( VmathVector3 vec )
{
    VmathPoint3 result;
    vmathP3MakeFromV3(&result, &vec);
    return result;
}

static inline VmathPoint3 vmathP3MakeFromScalar_V( float scalar )
{
    VmathPoint3 result;
    vmathP3MakeFromScalar(&result, scalar);
    return result;
}

static inline VmathPoint3 vmathP3MakeFrom128_V( vec_float4 vf4 )
{
    VmathPoint3 result;
    vmathP3MakeFrom128(&result, vf4);
    return result;
}

static inline VmathPoint3 vmathP3Lerp_V( float t, VmathPoint3 pnt0, VmathPoint3 pnt1 )
{
    VmathPoint3 result;
    vmathP3Lerp(&result, t, &pnt0, &pnt1);
    return result;
}

static inline vec_float4 vmathP3Get128_V( VmathPoint3 pnt )
{
    return vmathP3Get128(&pnt);
}

static inline void vmathP3StoreXYZ_V( VmathPoint3 pnt, vec_float4 *quad )
{
    vmathP3StoreXYZ(&pnt, quad);
}

static inline void vmathP3LoadXYZArray_V( VmathPoint3 *pnt0, VmathPoint3 *pnt1, VmathPoint3 *pnt2, VmathPoint3 *pnt3, const vec_float4 *threeQuads )
{
    vmathP3LoadXYZArray(pnt0, pnt1, pnt2, pnt3, threeQuads);
}

static inline void vmathP3StoreXYZArray_V( VmathPoint3 pnt0, VmathPoint3 pnt1, VmathPoint3 pnt2, VmathPoint3 pnt3, vec_float4 *threeQuads )
{
    vmathP3StoreXYZArray(&pnt0, &pnt1, &pnt2, &pnt3, threeQuads);
}

static inline void vmathP3StoreHalfFloats_V( VmathPoint3 pnt0, VmathPoint3 pnt1, VmathPoint3 pnt2, VmathPoint3 pnt3, VmathPoint3 pnt4, VmathPoint3 pnt5, VmathPoint3 pnt6, VmathPoint3 pnt7, vec_ushort8 *threeQuads )
{
    vmathP3StoreHalfFloats(&pnt0, &pnt1, &pnt2, &pnt3, &pnt4, &pnt5, &pnt6, &pnt7, threeQuads);
}

static inline void vmathP3SetX_V( VmathPoint3 *result, float _x )
{
    vmathP3SetX(result, _x);
}

static inline float vmathP3GetX_V( VmathPoint3 pnt )
{
    return vmathP3GetX(&pnt);
}

static inline void vmathP3SetY_V( VmathPoint3 *result, float _y )
{
    vmathP3SetY(result, _y);
}

static inline float vmathP3GetY_V( VmathPoint3 pnt )
{
    return vmathP3GetY(&pnt);
}

static inline void vmathP3SetZ_V( VmathPoint3 *result, float _z )
{
    vmathP3SetZ(result, _z);
}

static inline float vmathP3GetZ_V( VmathPoint3 pnt )
{
    return vmathP3GetZ(&pnt);
}

static inline void vmathP3SetElem_V( VmathPoint3 *result, int idx, float value )
{
    vmathP3SetElem(result, idx, value);
}

static inline float vmathP3GetElem_V( VmathPoint3 pnt, int idx )
{
    return vmathP3GetElem(&pnt, idx);
}

static inline VmathVector3 vmathP3Sub_V( VmathPoint3 pnt0, VmathPoint3 pnt1 )
{
    VmathVector3 result;
    vmathP3Sub(&result, &pnt0, &pnt1);
    return result;
}

static inline VmathPoint3 vmathP3AddV3_V( VmathPoint3 pnt, VmathVector3 vec1 )
{
    VmathPoint3 result;
    vmathP3AddV3(&result, &pnt, &vec1);
    return result;
}

static inline VmathPoint3 vmathP3SubV3_V( VmathPoint3 pnt, VmathVector3 vec1 )
{
    VmathPoint3 result;
    vmathP3SubV3(&result, &pnt, &vec1);
    return result;
}

static inline VmathPoint3 vmathP3MulPerElem_V( VmathPoint3 pnt0, VmathPoint3 pnt1 )
{
    VmathPoint3 result;
    vmathP3MulPerElem(&result, &pnt0, &pnt1);
    return result;
}

static inline VmathPoint3 vmathP3DivPerElem_V( VmathPoint3 pnt0, VmathPoint3 pnt1 )
{
    VmathPoint3 result;
    vmathP3DivPerElem(&result, &pnt0, &pnt1);
    return result;
}

static inline VmathPoint3 vmathP3RecipPerElem_V( VmathPoint3 pnt )
{
    VmathPoint3 result;
    vmathP3RecipPerElem(&result, &pnt);
    return result;
}

static inline VmathPoint3 vmathP3SqrtPerElem_V( VmathPoint3 pnt )
{
    VmathPoint3 result;
    vmathP3SqrtPerElem(&result, &pnt);
    return result;
}

static inline VmathPoint3 vmathP3RsqrtPerElem_V( VmathPoint3 pnt )
{
    VmathPoint3 result;
    vmathP3RsqrtPerElem(&result, &pnt);
    return result;
}

static inline VmathPoint3 vmathP3AbsPerElem_V( VmathPoint3 pnt )
{
    VmathPoint3 result;
    vmathP3AbsPerElem(&result, &pnt);
    return result;
}

static inline VmathPoint3 vmathP3CopySignPerElem_V( VmathPoint3 pnt0, VmathPoint3 pnt1 )
{
    VmathPoint3 result;
    vmathP3CopySignPerElem(&result, &pnt0, &pnt1);
    return result;
}

static inline VmathPoint3 vmathP3MaxPerElem_V( VmathPoint3 pnt0, VmathPoint3 pnt1 )
{
    VmathPoint3 result;
    vmathP3MaxPerElem(&result, &pnt0, &pnt1);
    return result;
}

static inline float vmathP3MaxElem_V( VmathPoint3 pnt )
{
    return vmathP3MaxElem(&pnt);
}

static inline VmathPoint3 vmathP3MinPerElem_V( VmathPoint3 pnt0, VmathPoint3 pnt1 )
{
    VmathPoint3 result;
    vmathP3MinPerElem(&result, &pnt0, &pnt1);
    return result;
}

static inline float vmathP3MinElem_V( VmathPoint3 pnt )
{
    return vmathP3MinElem(&pnt);
}

static inline float vmathP3Sum_V( VmathPoint3 pnt )
{
    return vmathP3Sum(&pnt);
}

static inline VmathPoint3 vmathP3Scale_V( VmathPoint3 pnt, float scaleVal )
{
    VmathPoint3 result;
    vmathP3Scale(&result, &pnt, scaleVal);
    return result;
}

static inline VmathPoint3 vmathP3NonUniformScale_V( VmathPoint3 pnt, VmathVector3 scaleVec )
{
    VmathPoint3 result;
    vmathP3NonUniformScale(&result, &pnt, &scaleVec);
    return result;
}

static inline float vmathP3Projection_V( VmathPoint3 pnt, VmathVector3 unitVec )
{
    return vmathP3Projection(&pnt, &unitVec);
}

static inline float vmathP3DistSqrFromOrigin_V( VmathPoint3 pnt )
{
    return vmathP3DistSqrFromOrigin(&pnt);
}

static inline float vmathP3DistFromOrigin_V( VmathPoint3 pnt )
{
    return vmathP3DistFromOrigin(&pnt);
}

static inline float vmathP3DistSqr_V( VmathPoint3 pnt0, VmathPoint3 pnt1 )
{
    return vmathP3DistSqr(&pnt0, &pnt1);
}

static inline float vmathP3Dist_V( VmathPoint3 pnt0, VmathPoint3 pnt1 )
{
    return vmathP3Dist(&pnt0, &pnt1);
}

static inline VmathPoint3 vmathP3Select_V( VmathPoint3 pnt0, VmathPoint3 pnt1, unsigned int select1 )
{
    VmathPoint3 result;
    vmathP3Select(&result, &pnt0, &pnt1, select1);
    return result;
}

#ifdef _VECTORMATH_DEBUG

static inline void vmathP3Print_V( VmathPoint3 pnt )
{
    vmathP3Print(&pnt);
}

static inline void vmathP3Prints_V( VmathPoint3 pnt, const char *name )
{
    vmathP3Prints(&pnt, name);
}

#endif

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif

Commits for Divide-Dependencies/debug-draw/samples/vectormath/ppu/c/vec_aos_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