2 Copyright (C) 2006, 2007 Sony Computer Entertainment Inc.
5 Redistribution and use in source and binary forms,
6 with or without modification, are permitted provided that the
7 following conditions are met:
8 * Redistributions of source code must retain the above copyright
9 notice, this list of conditions and the following disclaimer.
10 * Redistributions in binary form must reproduce the above copyright
11 notice, this list of conditions and the following disclaimer in the
12 documentation and/or other materials provided with the distribution.
13 * Neither the name of the Sony Computer Entertainment Inc nor the names
14 of its contributors may be used to endorse or promote products derived
15 from this software without specific prior written permission.
17 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 POSSIBILITY OF SUCH DAMAGE.
30 #ifndef _VECTORMATH_VEC_AOS_V_C_H
31 #define _VECTORMATH_VEC_AOS_V_C_H
34 #endif /* __cplusplus */
36 /*-----------------------------------------------------------------------------
38 * for permutes words are labeled [x,y,z,w] [a,b,c,d]
40 #define _VECTORMATH_PERM_X 0x00010203
41 #define _VECTORMATH_PERM_Y 0x04050607
42 #define _VECTORMATH_PERM_Z 0x08090a0b
43 #define _VECTORMATH_PERM_W 0x0c0d0e0f
44 #define _VECTORMATH_PERM_A 0x10111213
45 #define _VECTORMATH_PERM_B 0x14151617
46 #define _VECTORMATH_PERM_C 0x18191a1b
47 #define _VECTORMATH_PERM_D 0x1c1d1e1f
48 #define _VECTORMATH_PERM_XYZA (vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_X, _VECTORMATH_PERM_Y, _VECTORMATH_PERM_Z, _VECTORMATH_PERM_A }
49 #define _VECTORMATH_PERM_ZXYW (vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_Z, _VECTORMATH_PERM_X, _VECTORMATH_PERM_Y, _VECTORMATH_PERM_W }
50 #define _VECTORMATH_PERM_YZXW (vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_Y, _VECTORMATH_PERM_Z, _VECTORMATH_PERM_X, _VECTORMATH_PERM_W }
51 #define _VECTORMATH_PERM_YZAB (vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_Y, _VECTORMATH_PERM_Z, _VECTORMATH_PERM_A, _VECTORMATH_PERM_B }
52 #define _VECTORMATH_PERM_ZABC (vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_Z, _VECTORMATH_PERM_A, _VECTORMATH_PERM_B, _VECTORMATH_PERM_C }
53 #define _VECTORMATH_PERM_XYAW (vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_X, _VECTORMATH_PERM_Y, _VECTORMATH_PERM_A, _VECTORMATH_PERM_W }
54 #define _VECTORMATH_PERM_XAZW (vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_X, _VECTORMATH_PERM_A, _VECTORMATH_PERM_Z, _VECTORMATH_PERM_W }
55 #define _VECTORMATH_MASK_0xF000 (vec_uint4){ 0xffffffff, 0, 0, 0 }
56 #define _VECTORMATH_MASK_0x0F00 (vec_uint4){ 0, 0xffffffff, 0, 0 }
57 #define _VECTORMATH_MASK_0x00F0 (vec_uint4){ 0, 0, 0xffffffff, 0 }
58 #define _VECTORMATH_MASK_0x000F (vec_uint4){ 0, 0, 0, 0xffffffff }
59 #define _VECTORMATH_UNIT_1000 (vec_float4){ 1.0f, 0.0f, 0.0f, 0.0f }
60 #define _VECTORMATH_UNIT_0100 (vec_float4){ 0.0f, 1.0f, 0.0f, 0.0f }
61 #define _VECTORMATH_UNIT_0010 (vec_float4){ 0.0f, 0.0f, 1.0f, 0.0f }
62 #define _VECTORMATH_UNIT_0001 (vec_float4){ 0.0f, 0.0f, 0.0f, 1.0f }
63 #define _VECTORMATH_SLERP_TOL 0.999f
65 /*-----------------------------------------------------------------------------
68 #ifndef _VECTORMATH_INTERNAL_FUNCTIONS
69 #define _VECTORMATH_INTERNAL_FUNCTIONS
73 static inline VmathVector3 vmathV3MakeFromElems_V( float _x, float _y, float _z )
76 vmathV3MakeFromElems(&result, _x, _y, _z);
80 static inline VmathVector3 vmathV3MakeFromP3_V( VmathPoint3 pnt )
83 vmathV3MakeFromP3(&result, &pnt);
87 static inline VmathVector3 vmathV3MakeFromScalar_V( float scalar )
90 vmathV3MakeFromScalar(&result, scalar);
94 static inline VmathVector3 vmathV3MakeFrom128_V( vec_float4 vf4 )
97 vmathV3MakeFrom128(&result, vf4);
101 static inline VmathVector3 vmathV3MakeXAxis_V( )
104 vmathV3MakeXAxis(&result);
108 static inline VmathVector3 vmathV3MakeYAxis_V( )
111 vmathV3MakeYAxis(&result);
115 static inline VmathVector3 vmathV3MakeZAxis_V( )
118 vmathV3MakeZAxis(&result);
122 static inline VmathVector3 vmathV3Lerp_V( float t, VmathVector3 vec0, VmathVector3 vec1 )
125 vmathV3Lerp(&result, t, &vec0, &vec1);
129 static inline VmathVector3 vmathV3Slerp_V( float t, VmathVector3 unitVec0, VmathVector3 unitVec1 )
132 vmathV3Slerp(&result, t, &unitVec0, &unitVec1);
136 static inline vec_float4 vmathV3Get128_V( VmathVector3 vec )
138 return vmathV3Get128(&vec);
141 static inline void vmathV3StoreXYZ_V( VmathVector3 vec, vec_float4 *quad )
143 vmathV3StoreXYZ(&vec, quad);
146 static inline void vmathV3LoadXYZArray_V( VmathVector3 *vec0, VmathVector3 *vec1, VmathVector3 *vec2, VmathVector3 *vec3, const vec_float4 *threeQuads )
148 vmathV3LoadXYZArray(vec0, vec1, vec2, vec3, threeQuads);
151 static inline void vmathV3StoreXYZArray_V( VmathVector3 vec0, VmathVector3 vec1, VmathVector3 vec2, VmathVector3 vec3, vec_float4 *threeQuads )
153 vmathV3StoreXYZArray(&vec0, &vec1, &vec2, &vec3, threeQuads);
156 static inline void vmathV3StoreHalfFloats_V( VmathVector3 vec0, VmathVector3 vec1, VmathVector3 vec2, VmathVector3 vec3, VmathVector3 vec4, VmathVector3 vec5, VmathVector3 vec6, VmathVector3 vec7, vec_ushort8 *threeQuads )
158 vmathV3StoreHalfFloats(&vec0, &vec1, &vec2, &vec3, &vec4, &vec5, &vec6, &vec7, threeQuads);
161 static inline void vmathV3SetX_V( VmathVector3 *result, float _x )
163 vmathV3SetX(result, _x);
166 static inline float vmathV3GetX_V( VmathVector3 vec )
168 return vmathV3GetX(&vec);
171 static inline void vmathV3SetY_V( VmathVector3 *result, float _y )
173 vmathV3SetY(result, _y);
176 static inline float vmathV3GetY_V( VmathVector3 vec )
178 return vmathV3GetY(&vec);
181 static inline void vmathV3SetZ_V( VmathVector3 *result, float _z )
183 vmathV3SetZ(result, _z);
186 static inline float vmathV3GetZ_V( VmathVector3 vec )
188 return vmathV3GetZ(&vec);
191 static inline void vmathV3SetElem_V( VmathVector3 *result, int idx, float value )
193 vmathV3SetElem(result, idx, value);
196 static inline float vmathV3GetElem_V( VmathVector3 vec, int idx )
198 return vmathV3GetElem(&vec, idx);
201 static inline VmathVector3 vmathV3Add_V( VmathVector3 vec0, VmathVector3 vec1 )
204 vmathV3Add(&result, &vec0, &vec1);
208 static inline VmathVector3 vmathV3Sub_V( VmathVector3 vec0, VmathVector3 vec1 )
211 vmathV3Sub(&result, &vec0, &vec1);
215 static inline VmathPoint3 vmathV3AddP3_V( VmathVector3 vec, VmathPoint3 pnt1 )
218 vmathV3AddP3(&result, &vec, &pnt1);
222 static inline VmathVector3 vmathV3ScalarMul_V( VmathVector3 vec, float scalar )
225 vmathV3ScalarMul(&result, &vec, scalar);
229 static inline VmathVector3 vmathV3ScalarDiv_V( VmathVector3 vec, float scalar )
232 vmathV3ScalarDiv(&result, &vec, scalar);
236 static inline VmathVector3 vmathV3Neg_V( VmathVector3 vec )
239 vmathV3Neg(&result, &vec);
243 static inline VmathVector3 vmathV3MulPerElem_V( VmathVector3 vec0, VmathVector3 vec1 )
246 vmathV3MulPerElem(&result, &vec0, &vec1);
250 static inline VmathVector3 vmathV3DivPerElem_V( VmathVector3 vec0, VmathVector3 vec1 )
253 vmathV3DivPerElem(&result, &vec0, &vec1);
257 static inline VmathVector3 vmathV3RecipPerElem_V( VmathVector3 vec )
260 vmathV3RecipPerElem(&result, &vec);
264 static inline VmathVector3 vmathV3SqrtPerElem_V( VmathVector3 vec )
267 vmathV3SqrtPerElem(&result, &vec);
271 static inline VmathVector3 vmathV3RsqrtPerElem_V( VmathVector3 vec )
274 vmathV3RsqrtPerElem(&result, &vec);
278 static inline VmathVector3 vmathV3AbsPerElem_V( VmathVector3 vec )
281 vmathV3AbsPerElem(&result, &vec);
285 static inline VmathVector3 vmathV3CopySignPerElem_V( VmathVector3 vec0, VmathVector3 vec1 )
288 vmathV3CopySignPerElem(&result, &vec0, &vec1);
292 static inline VmathVector3 vmathV3MaxPerElem_V( VmathVector3 vec0, VmathVector3 vec1 )
295 vmathV3MaxPerElem(&result, &vec0, &vec1);
299 static inline float vmathV3MaxElem_V( VmathVector3 vec )
301 return vmathV3MaxElem(&vec);
304 static inline VmathVector3 vmathV3MinPerElem_V( VmathVector3 vec0, VmathVector3 vec1 )
307 vmathV3MinPerElem(&result, &vec0, &vec1);
311 static inline float vmathV3MinElem_V( VmathVector3 vec )
313 return vmathV3MinElem(&vec);
316 static inline float vmathV3Sum_V( VmathVector3 vec )
318 return vmathV3Sum(&vec);
321 static inline float vmathV3Dot_V( VmathVector3 vec0, VmathVector3 vec1 )
323 return vmathV3Dot(&vec0, &vec1);
326 static inline float vmathV3LengthSqr_V( VmathVector3 vec )
328 return vmathV3LengthSqr(&vec);
331 static inline float vmathV3Length_V( VmathVector3 vec )
333 return vmathV3Length(&vec);
336 static inline VmathVector3 vmathV3Normalize_V( VmathVector3 vec )
339 vmathV3Normalize(&result, &vec);
343 static inline VmathVector3 vmathV3Cross_V( VmathVector3 vec0, VmathVector3 vec1 )
346 vmathV3Cross(&result, &vec0, &vec1);
350 static inline VmathVector3 vmathV3Select_V( VmathVector3 vec0, VmathVector3 vec1, unsigned int select1 )
353 vmathV3Select(&result, &vec0, &vec1, select1);
357 #ifdef _VECTORMATH_DEBUG
359 static inline void vmathV3Print_V( VmathVector3 vec )
364 static inline void vmathV3Prints_V( VmathVector3 vec, const char *name )
366 vmathV3Prints(&vec, name);
371 static inline VmathVector4 vmathV4MakeFromElems_V( float _x, float _y, float _z, float _w )
374 vmathV4MakeFromElems(&result, _x, _y, _z, _w);
378 static inline VmathVector4 vmathV4MakeFromV3Scalar_V( VmathVector3 xyz, float _w )
381 vmathV4MakeFromV3Scalar(&result, &xyz, _w);
385 static inline VmathVector4 vmathV4MakeFromV3_V( VmathVector3 vec )
388 vmathV4MakeFromV3(&result, &vec);
392 static inline VmathVector4 vmathV4MakeFromP3_V( VmathPoint3 pnt )
395 vmathV4MakeFromP3(&result, &pnt);
399 static inline VmathVector4 vmathV4MakeFromQ_V( VmathQuat quat )
402 vmathV4MakeFromQ(&result, &quat);
406 static inline VmathVector4 vmathV4MakeFromScalar_V( float scalar )
409 vmathV4MakeFromScalar(&result, scalar);
413 static inline VmathVector4 vmathV4MakeFrom128_V( vec_float4 vf4 )
416 vmathV4MakeFrom128(&result, vf4);
420 static inline VmathVector4 vmathV4MakeXAxis_V( )
423 vmathV4MakeXAxis(&result);
427 static inline VmathVector4 vmathV4MakeYAxis_V( )
430 vmathV4MakeYAxis(&result);
434 static inline VmathVector4 vmathV4MakeZAxis_V( )
437 vmathV4MakeZAxis(&result);
441 static inline VmathVector4 vmathV4MakeWAxis_V( )
444 vmathV4MakeWAxis(&result);
448 static inline VmathVector4 vmathV4Lerp_V( float t, VmathVector4 vec0, VmathVector4 vec1 )
451 vmathV4Lerp(&result, t, &vec0, &vec1);
455 static inline VmathVector4 vmathV4Slerp_V( float t, VmathVector4 unitVec0, VmathVector4 unitVec1 )
458 vmathV4Slerp(&result, t, &unitVec0, &unitVec1);
462 static inline vec_float4 vmathV4Get128_V( VmathVector4 vec )
464 return vmathV4Get128(&vec);
467 static inline void vmathV4StoreHalfFloats_V( VmathVector4 vec0, VmathVector4 vec1, VmathVector4 vec2, VmathVector4 vec3, vec_ushort8 *twoQuads )
469 vmathV4StoreHalfFloats(&vec0, &vec1, &vec2, &vec3, twoQuads);
472 static inline void vmathV4SetXYZ_V( VmathVector4 *result, VmathVector3 vec )
474 vmathV4SetXYZ(result, &vec);
477 static inline VmathVector3 vmathV4GetXYZ_V( VmathVector4 vec )
480 vmathV4GetXYZ(&result, &vec);
484 static inline void vmathV4SetX_V( VmathVector4 *result, float _x )
486 vmathV4SetX(result, _x);
489 static inline float vmathV4GetX_V( VmathVector4 vec )
491 return vmathV4GetX(&vec);
494 static inline void vmathV4SetY_V( VmathVector4 *result, float _y )
496 vmathV4SetY(result, _y);
499 static inline float vmathV4GetY_V( VmathVector4 vec )
501 return vmathV4GetY(&vec);
504 static inline void vmathV4SetZ_V( VmathVector4 *result, float _z )
506 vmathV4SetZ(result, _z);
509 static inline float vmathV4GetZ_V( VmathVector4 vec )
511 return vmathV4GetZ(&vec);
514 static inline void vmathV4SetW_V( VmathVector4 *result, float _w )
516 vmathV4SetW(result, _w);
519 static inline float vmathV4GetW_V( VmathVector4 vec )
521 return vmathV4GetW(&vec);
524 static inline void vmathV4SetElem_V( VmathVector4 *result, int idx, float value )
526 vmathV4SetElem(result, idx, value);
529 static inline float vmathV4GetElem_V( VmathVector4 vec, int idx )
531 return vmathV4GetElem(&vec, idx);
534 static inline VmathVector4 vmathV4Add_V( VmathVector4 vec0, VmathVector4 vec1 )
537 vmathV4Add(&result, &vec0, &vec1);
541 static inline VmathVector4 vmathV4Sub_V( VmathVector4 vec0, VmathVector4 vec1 )
544 vmathV4Sub(&result, &vec0, &vec1);
548 static inline VmathVector4 vmathV4ScalarMul_V( VmathVector4 vec, float scalar )
551 vmathV4ScalarMul(&result, &vec, scalar);
555 static inline VmathVector4 vmathV4ScalarDiv_V( VmathVector4 vec, float scalar )
558 vmathV4ScalarDiv(&result, &vec, scalar);
562 static inline VmathVector4 vmathV4Neg_V( VmathVector4 vec )
565 vmathV4Neg(&result, &vec);
569 static inline VmathVector4 vmathV4MulPerElem_V( VmathVector4 vec0, VmathVector4 vec1 )
572 vmathV4MulPerElem(&result, &vec0, &vec1);
576 static inline VmathVector4 vmathV4DivPerElem_V( VmathVector4 vec0, VmathVector4 vec1 )
579 vmathV4DivPerElem(&result, &vec0, &vec1);
583 static inline VmathVector4 vmathV4RecipPerElem_V( VmathVector4 vec )
586 vmathV4RecipPerElem(&result, &vec);
590 static inline VmathVector4 vmathV4SqrtPerElem_V( VmathVector4 vec )
593 vmathV4SqrtPerElem(&result, &vec);
597 static inline VmathVector4 vmathV4RsqrtPerElem_V( VmathVector4 vec )
600 vmathV4RsqrtPerElem(&result, &vec);
604 static inline VmathVector4 vmathV4AbsPerElem_V( VmathVector4 vec )
607 vmathV4AbsPerElem(&result, &vec);
611 static inline VmathVector4 vmathV4CopySignPerElem_V( VmathVector4 vec0, VmathVector4 vec1 )
614 vmathV4CopySignPerElem(&result, &vec0, &vec1);
618 static inline VmathVector4 vmathV4MaxPerElem_V( VmathVector4 vec0, VmathVector4 vec1 )
621 vmathV4MaxPerElem(&result, &vec0, &vec1);
625 static inline float vmathV4MaxElem_V( VmathVector4 vec )
627 return vmathV4MaxElem(&vec);
630 static inline VmathVector4 vmathV4MinPerElem_V( VmathVector4 vec0, VmathVector4 vec1 )
633 vmathV4MinPerElem(&result, &vec0, &vec1);
637 static inline float vmathV4MinElem_V( VmathVector4 vec )
639 return vmathV4MinElem(&vec);
642 static inline float vmathV4Sum_V( VmathVector4 vec )
644 return vmathV4Sum(&vec);
647 static inline float vmathV4Dot_V( VmathVector4 vec0, VmathVector4 vec1 )
649 return vmathV4Dot(&vec0, &vec1);
652 static inline float vmathV4LengthSqr_V( VmathVector4 vec )
654 return vmathV4LengthSqr(&vec);
657 static inline float vmathV4Length_V( VmathVector4 vec )
659 return vmathV4Length(&vec);
662 static inline VmathVector4 vmathV4Normalize_V( VmathVector4 vec )
665 vmathV4Normalize(&result, &vec);
669 static inline VmathVector4 vmathV4Select_V( VmathVector4 vec0, VmathVector4 vec1, unsigned int select1 )
672 vmathV4Select(&result, &vec0, &vec1, select1);
676 #ifdef _VECTORMATH_DEBUG
678 static inline void vmathV4Print_V( VmathVector4 vec )
683 static inline void vmathV4Prints_V( VmathVector4 vec, const char *name )
685 vmathV4Prints(&vec, name);
690 static inline VmathPoint3 vmathP3MakeFromElems_V( float _x, float _y, float _z )
693 vmathP3MakeFromElems(&result, _x, _y, _z);
697 static inline VmathPoint3 vmathP3MakeFromV3_V( VmathVector3 vec )
700 vmathP3MakeFromV3(&result, &vec);
704 static inline VmathPoint3 vmathP3MakeFromScalar_V( float scalar )
707 vmathP3MakeFromScalar(&result, scalar);
711 static inline VmathPoint3 vmathP3MakeFrom128_V( vec_float4 vf4 )
714 vmathP3MakeFrom128(&result, vf4);
718 static inline VmathPoint3 vmathP3Lerp_V( float t, VmathPoint3 pnt0, VmathPoint3 pnt1 )
721 vmathP3Lerp(&result, t, &pnt0, &pnt1);
725 static inline vec_float4 vmathP3Get128_V( VmathPoint3 pnt )
727 return vmathP3Get128(&pnt);
730 static inline void vmathP3StoreXYZ_V( VmathPoint3 pnt, vec_float4 *quad )
732 vmathP3StoreXYZ(&pnt, quad);
735 static inline void vmathP3LoadXYZArray_V( VmathPoint3 *pnt0, VmathPoint3 *pnt1, VmathPoint3 *pnt2, VmathPoint3 *pnt3, const vec_float4 *threeQuads )
737 vmathP3LoadXYZArray(pnt0, pnt1, pnt2, pnt3, threeQuads);
740 static inline void vmathP3StoreXYZArray_V( VmathPoint3 pnt0, VmathPoint3 pnt1, VmathPoint3 pnt2, VmathPoint3 pnt3, vec_float4 *threeQuads )
742 vmathP3StoreXYZArray(&pnt0, &pnt1, &pnt2, &pnt3, threeQuads);
745 static inline void vmathP3StoreHalfFloats_V( VmathPoint3 pnt0, VmathPoint3 pnt1, VmathPoint3 pnt2, VmathPoint3 pnt3, VmathPoint3 pnt4, VmathPoint3 pnt5, VmathPoint3 pnt6, VmathPoint3 pnt7, vec_ushort8 *threeQuads )
747 vmathP3StoreHalfFloats(&pnt0, &pnt1, &pnt2, &pnt3, &pnt4, &pnt5, &pnt6, &pnt7, threeQuads);
750 static inline void vmathP3SetX_V( VmathPoint3 *result, float _x )
752 vmathP3SetX(result, _x);
755 static inline float vmathP3GetX_V( VmathPoint3 pnt )
757 return vmathP3GetX(&pnt);
760 static inline void vmathP3SetY_V( VmathPoint3 *result, float _y )
762 vmathP3SetY(result, _y);
765 static inline float vmathP3GetY_V( VmathPoint3 pnt )
767 return vmathP3GetY(&pnt);
770 static inline void vmathP3SetZ_V( VmathPoint3 *result, float _z )
772 vmathP3SetZ(result, _z);
775 static inline float vmathP3GetZ_V( VmathPoint3 pnt )
777 return vmathP3GetZ(&pnt);
780 static inline void vmathP3SetElem_V( VmathPoint3 *result, int idx, float value )
782 vmathP3SetElem(result, idx, value);
785 static inline float vmathP3GetElem_V( VmathPoint3 pnt, int idx )
787 return vmathP3GetElem(&pnt, idx);
790 static inline VmathVector3 vmathP3Sub_V( VmathPoint3 pnt0, VmathPoint3 pnt1 )
793 vmathP3Sub(&result, &pnt0, &pnt1);
797 static inline VmathPoint3 vmathP3AddV3_V( VmathPoint3 pnt, VmathVector3 vec1 )
800 vmathP3AddV3(&result, &pnt, &vec1);
804 static inline VmathPoint3 vmathP3SubV3_V( VmathPoint3 pnt, VmathVector3 vec1 )
807 vmathP3SubV3(&result, &pnt, &vec1);
811 static inline VmathPoint3 vmathP3MulPerElem_V( VmathPoint3 pnt0, VmathPoint3 pnt1 )
814 vmathP3MulPerElem(&result, &pnt0, &pnt1);
818 static inline VmathPoint3 vmathP3DivPerElem_V( VmathPoint3 pnt0, VmathPoint3 pnt1 )
821 vmathP3DivPerElem(&result, &pnt0, &pnt1);
825 static inline VmathPoint3 vmathP3RecipPerElem_V( VmathPoint3 pnt )
828 vmathP3RecipPerElem(&result, &pnt);
832 static inline VmathPoint3 vmathP3SqrtPerElem_V( VmathPoint3 pnt )
835 vmathP3SqrtPerElem(&result, &pnt);
839 static inline VmathPoint3 vmathP3RsqrtPerElem_V( VmathPoint3 pnt )
842 vmathP3RsqrtPerElem(&result, &pnt);
846 static inline VmathPoint3 vmathP3AbsPerElem_V( VmathPoint3 pnt )
849 vmathP3AbsPerElem(&result, &pnt);
853 static inline VmathPoint3 vmathP3CopySignPerElem_V( VmathPoint3 pnt0, VmathPoint3 pnt1 )
856 vmathP3CopySignPerElem(&result, &pnt0, &pnt1);
860 static inline VmathPoint3 vmathP3MaxPerElem_V( VmathPoint3 pnt0, VmathPoint3 pnt1 )
863 vmathP3MaxPerElem(&result, &pnt0, &pnt1);
867 static inline float vmathP3MaxElem_V( VmathPoint3 pnt )
869 return vmathP3MaxElem(&pnt);
872 static inline VmathPoint3 vmathP3MinPerElem_V( VmathPoint3 pnt0, VmathPoint3 pnt1 )
875 vmathP3MinPerElem(&result, &pnt0, &pnt1);
879 static inline float vmathP3MinElem_V( VmathPoint3 pnt )
881 return vmathP3MinElem(&pnt);
884 static inline float vmathP3Sum_V( VmathPoint3 pnt )
886 return vmathP3Sum(&pnt);
889 static inline VmathPoint3 vmathP3Scale_V( VmathPoint3 pnt, float scaleVal )
892 vmathP3Scale(&result, &pnt, scaleVal);
896 static inline VmathPoint3 vmathP3NonUniformScale_V( VmathPoint3 pnt, VmathVector3 scaleVec )
899 vmathP3NonUniformScale(&result, &pnt, &scaleVec);
903 static inline float vmathP3Projection_V( VmathPoint3 pnt, VmathVector3 unitVec )
905 return vmathP3Projection(&pnt, &unitVec);
908 static inline float vmathP3DistSqrFromOrigin_V( VmathPoint3 pnt )
910 return vmathP3DistSqrFromOrigin(&pnt);
913 static inline float vmathP3DistFromOrigin_V( VmathPoint3 pnt )
915 return vmathP3DistFromOrigin(&pnt);
918 static inline float vmathP3DistSqr_V( VmathPoint3 pnt0, VmathPoint3 pnt1 )
920 return vmathP3DistSqr(&pnt0, &pnt1);
923 static inline float vmathP3Dist_V( VmathPoint3 pnt0, VmathPoint3 pnt1 )
925 return vmathP3Dist(&pnt0, &pnt1);
928 static inline VmathPoint3 vmathP3Select_V( VmathPoint3 pnt0, VmathPoint3 pnt1, unsigned int select1 )
931 vmathP3Select(&result, &pnt0, &pnt1, select1);
935 #ifdef _VECTORMATH_DEBUG
937 static inline void vmathP3Print_V( VmathPoint3 pnt )
942 static inline void vmathP3Prints_V( VmathPoint3 pnt, const char *name )
944 vmathP3Prints(&pnt, name);
951 #endif /* __cplusplus */