OROCHI
 
Loading...
Searching...
No Matches
GxStruct.inl
Go to the documentation of this file.
1//===========================================================================
10//===========================================================================
11
12GX_CORE_NAMESPACE_BEGIN()
13
14//===========================================================================
15// GxFloat2
16//===========================================================================
17//---------------------------------------------------------------------------
18// コンストラクタ
20//---------------------------------------------------------------------------
21GX_FORCE_INLINE GxFloat2::GxFloat2(const GxFloat3& float3)
22: _x(float3._x)
23, _y(float3._y)
24{
25}
26
27//---------------------------------------------------------------------------
28// コンストラクタ
30//---------------------------------------------------------------------------
31GX_FORCE_INLINE GxFloat2::GxFloat2(const GxFloat4& float4)
32: _x(float4._x)
33, _y(float4._y)
34{
35}
36
37//---------------------------------------------------------------------------
38// コンストラクタ
40//---------------------------------------------------------------------------
41GX_FORCE_INLINE GxFloat2::GxFloat2(const GxVector2& vector)
42: _x(vector._x)
43, _y(vector._y)
44{
45}
46
47//---------------------------------------------------------------------------
48// コンストラクタ
50//---------------------------------------------------------------------------
51GX_FORCE_INLINE GxFloat2::GxFloat2(const GxVector3& vector)
52: _x(vector._x)
53, _y(vector._y)
54{
55}
56
57//---------------------------------------------------------------------------
58// コンストラクタ
60//---------------------------------------------------------------------------
61GX_FORCE_INLINE GxFloat2::GxFloat2(const GxVector4& vector)
62: _x(vector._x)
63, _y(vector._y)
64{
65}
66
67//---------------------------------------------------------------------------
68// コンストラクタ
70//---------------------------------------------------------------------------
71GX_FORCE_INLINE GxFloat2::GxFloat2(const GxPoint2& point)
72: _x(static_cast<f32>(point._x))
73, _y(static_cast<f32>(point._y))
74{
75}
76
77//---------------------------------------------------------------------------
78// 代入
81//---------------------------------------------------------------------------
82GX_FORCE_INLINE GxFloat2& GxFloat2::operator = (const GxVector2& vector)
83{
84 _x = vector._x;
85 _y = vector._y;
86 return *this;
87}
88
89//---------------------------------------------------------------------------
90// 代入
93//---------------------------------------------------------------------------
94GX_FORCE_INLINE GxFloat2& GxFloat2::operator = (const GxFloat2& float2)
95{
96 _x = float2._x;
97 _y = float2._y;
98 return *this;
99}
100
101//---------------------------------------------------------------------------
102// 代入
105//---------------------------------------------------------------------------
106GX_FORCE_INLINE GxFloat2& GxFloat2::operator = (const GxVector3& vector)
107{
108 _x = vector._x;
109 _y = vector._y;
110 return *this;
111}
112
113//---------------------------------------------------------------------------
114// 代入
117//---------------------------------------------------------------------------
118GX_FORCE_INLINE GxFloat2& GxFloat2::operator = (const GxVector4& vector)
119{
120 _x = vector._x;
121 _y = vector._y;
122 return *this;
123}
124
125//===========================================================================
126// GxFloat3
127//===========================================================================
128//---------------------------------------------------------------------------
129// コンストラクタ
131//---------------------------------------------------------------------------
132GX_FORCE_INLINE GxFloat3::GxFloat3(const GxFloat4& float4)
133: _x(float4._x)
134, _y(float4._y)
135, _z(float4._z)
136{
137}
138
139//---------------------------------------------------------------------------
140// コンストラクタ
142//---------------------------------------------------------------------------
143GX_FORCE_INLINE GxFloat3::GxFloat3(const GxVector3& vector)
144: _x(vector._x)
145, _y(vector._y)
146, _z(vector._z)
147{
148}
149
150//---------------------------------------------------------------------------
151// コンストラクタ
153//---------------------------------------------------------------------------
154GX_FORCE_INLINE GxFloat3::GxFloat3(const GxVector4& vector)
155: _x(vector._x)
156, _y(vector._y)
157, _z(vector._z)
158{
159}
160
161//---------------------------------------------------------------------------
162// 代入
165//---------------------------------------------------------------------------
166GX_FORCE_INLINE GxFloat3& GxFloat3::operator = (const GxVector3& vector)
167{
168 _x = vector._x;
169 _y = vector._y;
170 _z = vector._z;
171 return *this;
172}
173
174//---------------------------------------------------------------------------
175// 代入
178//---------------------------------------------------------------------------
179GX_FORCE_INLINE GxFloat3& GxFloat3::operator = (const GxVector4& vector)
180{
181 _x = vector._x;
182 _y = vector._y;
183 _z = vector._z;
184 return *this;
185}
186
187//===========================================================================
188// GxFloat4
189//===========================================================================
190//---------------------------------------------------------------------------
191// コンストラクタ
193//---------------------------------------------------------------------------
194GX_FORCE_INLINE GxFloat4::GxFloat4(const GxVector4& vector)
195: _x(vector._x)
196, _y(vector._y)
197, _z(vector._z)
198, _w(vector._w)
199{
200}
201
202//---------------------------------------------------------------------------
203// コンストラクタ
205//---------------------------------------------------------------------------
206GX_FORCE_INLINE GxFloat4::GxFloat4(const GxQuaternion& quaternion)
207: _x(quaternion._x)
208, _y(quaternion._y)
209, _z(quaternion._z)
210, _w(quaternion._w)
211{
212}
213
214//---------------------------------------------------------------------------
215// 代入
218//---------------------------------------------------------------------------
219GX_FORCE_INLINE GxFloat4& GxFloat4::operator = (const GxVector4& vector)
220{
221 _x = vector._x;
222 _y = vector._y;
223 _z = vector._z;
224 _w = vector._w;
225 return *this;
226}
227
228//---------------------------------------------------------------------------
229// 代入
232//---------------------------------------------------------------------------
233GX_FORCE_INLINE GxFloat4& GxFloat4::operator = (const GxQuaternion& quaternion)
234{
235 _x = quaternion._x;
236 _y = quaternion._y;
237 _z = quaternion._z;
238 _w = quaternion._w;
239 return *this;
240}
241
242//===========================================================================
243// GxDouble2
244//===========================================================================
245//---------------------------------------------------------------------------
246// コンストラクタ
248//---------------------------------------------------------------------------
249GX_FORCE_INLINE GxDouble2::GxDouble2(const GxDouble3& double3)
250: _x(double3._x)
251, _y(double3._y)
252{
253}
254
255//---------------------------------------------------------------------------
256// コンストラクタ
258//---------------------------------------------------------------------------
259GX_FORCE_INLINE GxDouble2::GxDouble2(const GxDouble4& double4)
260: _x(double4._x)
261, _y(double4._y)
262{
263}
264
265//---------------------------------------------------------------------------
266// コンストラクタ
268//---------------------------------------------------------------------------
269GX_FORCE_INLINE GxDouble2::GxDouble2(const GxVector2d& vector)
270: _x(vector._x)
271, _y(vector._y)
272{
273}
274
275//---------------------------------------------------------------------------
276// コンストラクタ
278//---------------------------------------------------------------------------
279GX_FORCE_INLINE GxDouble2::GxDouble2(const GxVector3d& vector)
280: _x(vector._x)
281, _y(vector._y)
282{
283}
284
285//---------------------------------------------------------------------------
286// コンストラクタ
288//---------------------------------------------------------------------------
289GX_FORCE_INLINE GxDouble2::GxDouble2(const GxVector4d& vector)
290: _x(vector._x)
291, _y(vector._y)
292{
293}
294
295//---------------------------------------------------------------------------
296// コンストラクタ
298//---------------------------------------------------------------------------
299GX_FORCE_INLINE GxDouble2::GxDouble2(const GxPoint2& point)
300: _x(static_cast<f64>(point._x))
301, _y(static_cast<f64>(point._y))
302{
303}
304
305//---------------------------------------------------------------------------
306// 代入
309//---------------------------------------------------------------------------
310GX_FORCE_INLINE GxDouble2& GxDouble2::operator = (const GxVector2d& vector)
311{
312 _x = vector._x;
313 _y = vector._y;
314 return *this;
315}
316
317//---------------------------------------------------------------------------
318// 代入
321//---------------------------------------------------------------------------
322GX_FORCE_INLINE GxDouble2& GxDouble2::operator = (const GxDouble2& float2)
323{
324 _x = float2._x;
325 _y = float2._y;
326 return *this;
327}
328
329//---------------------------------------------------------------------------
330// 代入
333//---------------------------------------------------------------------------
334GX_FORCE_INLINE GxDouble2& GxDouble2::operator = (const GxVector3d& vector)
335{
336 _x = vector._x;
337 _y = vector._y;
338 return *this;
339}
340
341//---------------------------------------------------------------------------
342// 代入
345//---------------------------------------------------------------------------
346GX_FORCE_INLINE GxDouble2& GxDouble2::operator = (const GxVector4d& vector)
347{
348 _x = vector._x;
349 _y = vector._y;
350 return *this;
351}
352
353//===========================================================================
354// GxDouble3
355//===========================================================================
356//---------------------------------------------------------------------------
357// コンストラクタ
359//---------------------------------------------------------------------------
360GX_FORCE_INLINE GxDouble3::GxDouble3(const GxDouble4& double4)
361: _x(double4._x)
362, _y(double4._y)
363, _z(double4._z)
364{
365}
366
367//---------------------------------------------------------------------------
368// コンストラクタ
370//---------------------------------------------------------------------------
371GX_FORCE_INLINE GxDouble3::GxDouble3(const GxVector3d& vector)
372: _x(vector._x)
373, _y(vector._y)
374, _z(vector._z)
375{
376}
377
378//---------------------------------------------------------------------------
379// コンストラクタ
381//---------------------------------------------------------------------------
382GX_FORCE_INLINE GxDouble3::GxDouble3(const GxVector4d& vector)
383: _x(vector._x)
384, _y(vector._y)
385, _z(vector._z)
386{
387}
388
389//---------------------------------------------------------------------------
390// 代入
393//---------------------------------------------------------------------------
394GX_FORCE_INLINE GxDouble3& GxDouble3::operator = (const GxVector3d& vector)
395{
396 _x = vector._x;
397 _y = vector._y;
398 _z = vector._z;
399 return *this;
400}
401
402//---------------------------------------------------------------------------
403// 代入
406//---------------------------------------------------------------------------
407GX_FORCE_INLINE GxDouble3& GxDouble3::operator = (const GxVector4d& vector)
408{
409 _x = vector._x;
410 _y = vector._y;
411 _z = vector._z;
412 return *this;
413}
414
415//===========================================================================
416// GxDouble4
417//===========================================================================
418//---------------------------------------------------------------------------
419// コンストラクタ
421//---------------------------------------------------------------------------
422GX_FORCE_INLINE GxDouble4::GxDouble4(const GxVector4d& vector)
423: _x(vector._x)
424, _y(vector._y)
425, _z(vector._z)
426, _w(vector._w)
427{
428}
429
430//---------------------------------------------------------------------------
431// 代入
434//---------------------------------------------------------------------------
435GX_FORCE_INLINE GxDouble4& GxDouble4::operator = (const GxVector4d& vector)
436{
437 _x = vector._x;
438 _y = vector._y;
439 _z = vector._z;
440 _w = vector._w;
441 return *this;
442}
443
444//===========================================================================
445// ! 16bit浮動小数
446//===========================================================================
447//---------------------------------------------------------------------------
448// デフォルトコンストラクタ
449//---------------------------------------------------------------------------
450GX_FORCE_INLINE GxF16::GxF16(void)
451: _value(0)
452{
453}
454
455//---------------------------------------------------------------------------
456// コンストラクタ
458//---------------------------------------------------------------------------
459GX_FORCE_INLINE GxF16::GxF16( f32 valueF32)
460{
461 _value = f32ToF16(valueF32).getValueU16();
462}
463
464//---------------------------------------------------------------------------
465// コンストラクタ
467//---------------------------------------------------------------------------
468GX_FORCE_INLINE GxF16::GxF16( const GxF16& valueF16)
469{
470 _value = valueF16._value;
471}
472
473//---------------------------------------------------------------------------
474// 32ビットフロートキャスト
475//---------------------------------------------------------------------------
476GX_INLINE GxF16::operator f32() const
477{
478 return f16ToF32(*this);
479}
480
481//---------------------------------------------------------------------------
482// 32ビットから16ビットの変換
485//---------------------------------------------------------------------------
486GX_FORCE_INLINE GxF16 GxF16::f32ToF16(f32 valueF32)
487{
488 union f32union
489 {
490 u32 integerValue;
491 f32 floatValue;
492 };
493 GxF16 zeroF16;
494 zeroF16._value = 0;
495
496 f32union convertWork;
497 convertWork.floatValue = valueF32;
498 auto integerValue = convertWork.integerValue;
499
500 if (!integerValue)
501 {
502 return zeroF16;
503 }
504 /* IEEE754形式 浮動小数
505
506 float
507
508 sign(符号) ┌── exponent(指数) ───┐ ┌───────────────── fraction(仮数) ──────────────────┐
509 ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐
510 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
511 └─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘
512 31 30 23 22 0
513
514 half-float
515
516 sign(符号) ┌exponent(指数)┐ ┌───── fraction(仮数) ──────┐
517 ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐
518 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
519 └─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘
520 16 15 11 10 0
521
522 */
523
524 s32 exponent = ((integerValue & 0x7f800000) >> 23) - 127 + 15;
525 if (exponent < 0)
526 {
527 return zeroF16;
528 }
529 else if (exponent > 31)
530 {
531 exponent = 31;
532 }
533 s32 sign = integerValue & 0x80000000;
534 s32 fraction = integerValue & 0x007fffff;
535
536 GxF16 returnValue;
537 returnValue.setValueU16( ((sign >> 16) & 0x8000) | ((exponent << 10) & 0x7c00) | ((fraction >> 13) & 0x03ff) );
538
539 return returnValue;
540}
541
542//---------------------------------------------------------------------------
543// 16ビットから32ビットの変換
546//---------------------------------------------------------------------------
547GX_FORCE_INLINE f32 GxF16::f16ToF32(GxF16 valueF16)
548{
549 union f32union
550 {
551 u32 integerValue;
552 f32 floatValue;
553 };
554
555 if (!valueF16.getValueU16())
556 {
557 return 0.0f;
558 }
559 u32 sign = valueF16.getValueU16() & 0x8000; //1 00000 0000000000
560 s32 exponent = ((valueF16.getValueU16() & 0x7c00) >>10) - 15 + 127; //0 11111 0000000000
561 u32 fraction = valueF16.getValueU16() & 0x03ff; //0 00000 1111111111
562
563 f32union convertWork;
564 convertWork.integerValue = (sign << 16) | ((exponent << 23) & 0x7f800000) | (fraction << 13);
565
566 return convertWork.floatValue;
567}
568
569//===========================================================================
570// GxF16x2
571//===========================================================================
572//---------------------------------------------------------------------------
573// operator =
576//---------------------------------------------------------------------------
577GX_FORCE_INLINE GxF16x2& GxF16x2::operator = (const GxF16x2& value)
578{
579 _value[0] = value._value[0];
580 _value[1] = value._value[1];
581
582 return *this;
583}
584
585//---------------------------------------------------------------------------
586// operator =
589//---------------------------------------------------------------------------
590GX_FORCE_INLINE GxF16x2& GxF16x2::operator = (const GxFloat2& value)
591{
592 _value[0] = value._x;
593 _value[1] = value._y;
594
595 return *this;
596}
597
598//---------------------------------------------------------------------------
599// operator =
602//---------------------------------------------------------------------------
603GX_FORCE_INLINE GxF16x2& GxF16x2::operator = (const GxVector2& value)
604{
605 _value[0] = value._x;
606 _value[1] = value._y;
607
608 return *this;
609}
610
611//===========================================================================
612// GxF16x4
613//===========================================================================
614//---------------------------------------------------------------------------
615// operator =
618//---------------------------------------------------------------------------
619GX_FORCE_INLINE GxF16x4& GxF16x4::operator = (const GxF16x4& value)
620{
621 _value[0] = value._value[0];
622 _value[1] = value._value[1];
623 _value[2] = value._value[2];
624 _value[3] = value._value[3];
625
626 return *this;
627}
628
629//---------------------------------------------------------------------------
630// operator =
633//---------------------------------------------------------------------------
634GX_FORCE_INLINE GxF16x4& GxF16x4::operator = (const GxFloat4& value)
635{
636 _value[0] = value._x;
637 _value[1] = value._y;
638 _value[2] = value._z;
639 _value[3] = value._w;
640
641 return *this;
642}
643
644//---------------------------------------------------------------------------
645// operator =
648//---------------------------------------------------------------------------
649GX_FORCE_INLINE GxF16x4& GxF16x4::operator = (const GxVector4& value)
650{
651 _value[0] = value._x;
652 _value[1] = value._y;
653 _value[2] = value._z;
654 _value[3] = value._w;
655
656 return *this;
657}
658
659//===========================================================================
660// ! 8bit[0, 1]正規化小数
661//===========================================================================
662//---------------------------------------------------------------------------
663// デフォルトコンストラクタ
664//---------------------------------------------------------------------------
665GX_FORCE_INLINE GxU8N::GxU8N(void)
666{
667}
668
669//---------------------------------------------------------------------------
670// コンストラクタ
672//---------------------------------------------------------------------------
673GX_FORCE_INLINE GxU8N::GxU8N(f32 valueF32)
674{
675 _value = f32ToU8N(valueF32).getValueU8();
676}
677
678//---------------------------------------------------------------------------
679// コンストラクタ
681//---------------------------------------------------------------------------
682GX_FORCE_INLINE GxU8N::GxU8N(const GxU8N& valueU8N)
683{
684 _value = valueU8N._value;
685}
686
687//---------------------------------------------------------------------------
688// 32ビットフロートキャスト
689//---------------------------------------------------------------------------
690GX_INLINE GxU8N::operator f32() const
691{
692 return u8NToF32(*this);
693}
694
695//---------------------------------------------------------------------------
696// 32ビットから8ビットの変換
699//---------------------------------------------------------------------------
700GX_FORCE_INLINE GxU8N GxU8N::f32ToU8N(f32 valueF32)
701{
702 valueF32 = GxMath::getMin(GxMath::getMax(valueF32, 0.0f), 1.0f);
703
704 GxU8N returnValue;
705 returnValue.setValueU8(static_cast<u8>(valueF32 * 255.0f));
706
707 return returnValue;
708}
709
710//---------------------------------------------------------------------------
711// 8ビットから32ビットの変換
714//---------------------------------------------------------------------------
715GX_FORCE_INLINE f32 GxU8N::u8NToF32(GxU8N valueU8N)
716{
717 return valueU8N.getValueU8() / 255.0f;
718}
719
720//===========================================================================
721// 32bit[0, 1]正規化小数4次元ベクトル(8:8:8:8)
722//===========================================================================
723//---------------------------------------------------------------------------
724// operator =
727//---------------------------------------------------------------------------
728GX_FORCE_INLINE GxU8Nx4& GxU8Nx4::operator = (const GxU8Nx4& value)
729{
730 _value[0] = value._value[0];
731 _value[1] = value._value[1];
732 _value[2] = value._value[2];
733 _value[3] = value._value[3];
734
735 return *this;
736}
737
738//---------------------------------------------------------------------------
739// operator =
742//---------------------------------------------------------------------------
743GX_FORCE_INLINE GxU8Nx4& GxU8Nx4::operator = (const GxFloat4& value)
744{
745 _value[0] = value._x;
746 _value[1] = value._y;
747 _value[2] = value._z;
748 _value[3] = value._w;
749
750 return *this;
751}
752
753//---------------------------------------------------------------------------
754// operator =
757//---------------------------------------------------------------------------
758GX_FORCE_INLINE GxU8Nx4& GxU8Nx4::operator = (const GxVector4& value)
759{
760 _value[0] = value._x;
761 _value[1] = value._y;
762 _value[2] = value._z;
763 _value[3] = value._w;
764
765 return *this;
766}
767
768//===========================================================================
769// GxPackedNx3
770//===========================================================================
771//---------------------------------------------------------------------------
772// operator =
775//---------------------------------------------------------------------------
776GX_FORCE_INLINE GxPackedNx3& GxPackedNx3::operator = (const GxFloat3& value)
777{
778 _value = f32ToS11N(value._x) << SHIFT_X
779 | f32ToS11N(value._y) << SHIFT_Y
780 | f32ToS10N(value._z) << SHIFT_Z;
781
782 return *this;
783}
784
785//---------------------------------------------------------------------------
786// operator =
789//---------------------------------------------------------------------------
790GX_FORCE_INLINE GxPackedNx3& GxPackedNx3::operator = (const GxVector3& value)
791{
792 _value = f32ToS11N(value._x) << SHIFT_X
793 | f32ToS11N(value._y) << SHIFT_Y
794 | f32ToS10N(value._z) << SHIFT_Z;
795
796 return *this;
797}
798
799//---------------------------------------------------------------------------
800// 32ビットから10ビットの変換
803//---------------------------------------------------------------------------
804GX_FORCE_INLINE u32 GxPackedNx3::f32ToS10N(f32 valueF32)
805{
806 valueF32 = GxMath::getMin(GxMath::getMax(valueF32, -1.0f), 1.0f);
807
808 u32 work;
809 u32 ret;
810
811 if( 0.0f < valueF32 )
812 {
813 ret = static_cast<u32>(valueF32 * 511.0f);
814 }
815 else
816 {
817 work = static_cast<u32>(valueF32 * -512.0f);
818 ret = ~work + 0x1;
819 }
820
821 return ret & 0x3FF;
822}
823
824//---------------------------------------------------------------------------
825// 10ビットから32ビットの変換
828//---------------------------------------------------------------------------
829GX_FORCE_INLINE f32 GxPackedNx3::s10NTof32(u32 valueS10N)
830{
831 u32 sine = valueS10N & 0x200;
832 valueS10N &= 0x1FF;
833
834 f32 ret;
835
836 if( !sine )
837 {
838 ret = valueS10N / 511.0f;
839 }
840 else
841 {
842 ret = ((~valueS10N & 0x1FF) + 0x1) / -512.0f;
843 }
844
845 return ret;
846}
847
848//---------------------------------------------------------------------------
849// 32ビットから11ビットの変換
852//---------------------------------------------------------------------------
853GX_FORCE_INLINE u32 GxPackedNx3::f32ToS11N(f32 valueF32)
854{
855 valueF32 = GxMath::getMin(GxMath::getMax(valueF32, -1.0f), 1.0f);
856
857 u32 work;
858 u32 ret;
859
860 if( 0.0f < valueF32 )
861 {
862 ret = static_cast<u32>(valueF32 * 1023.0f);
863 }
864 else
865 {
866 work = static_cast<u32>(valueF32 * -1024.0f);
867 ret = ~work + 0x1;
868 }
869
870 return ret & 0x7FF;
871}
872
873//---------------------------------------------------------------------------
874// 11ビットから32ビットの変換
877//---------------------------------------------------------------------------
878GX_FORCE_INLINE f32 GxPackedNx3::s11NTof32(u32 valueS10N)
879{
880 u32 sine = valueS10N & 0x400;
881 valueS10N &= 0x3FF;
882
883 f32 ret;
884
885 if( !sine )
886 {
887 ret = valueS10N / 1023.0f;
888 }
889 else
890 {
891 ret = ((~valueS10N & 0x3FF) + 0x1) / -1024.0f;
892 }
893
894 return ret;
895}
896
897//---------------------------------------------------------------------------
898// f32で値を取得する
901//---------------------------------------------------------------------------
902GX_FORCE_INLINE f32 GxPackedNx3::getValueF32(u32 index) const
903{
904 f32 ret;
905
906 switch(index)
907 {
908 //----------------------
909 case 0: // x成分
910 //----------------------
911 ret = s11NTof32(_value >> SHIFT_X);
912 break;
913 //----------------------
914 case 1: // y成分
915 //----------------------
916 ret = s11NTof32(_value >> SHIFT_Y);
917 break;
918 //----------------------
919 case 2: // z成分
920 //----------------------
921 ret = s10NTof32(_value >> SHIFT_Z);
922 break;
923 //----------------------
924 default: // エラー
925 //----------------------
926 GX_ASSERT(false, "想定外の成分が指定されました");
927 ret = 0.0f;
928 break;
929 }
930
931 return ret;
932}
933
934//---------------------------------------------------------------------------
935// f32で値を設定する
938//---------------------------------------------------------------------------
939GX_FORCE_INLINE void GxPackedNx3::setValueF32(u32 index, f32 value)
940{
941 switch(index)
942 {
943 //----------------------
944 case 0: // x成分
945 //----------------------
946 _value = (_value & (0x000007FF << SHIFT_X)) | (f32ToS11N(value) << SHIFT_X);
947 break;
948 //----------------------
949 case 1: // y成分
950 //----------------------
951 _value = (_value & (0x000007FF << SHIFT_Y)) | (f32ToS11N(value) << SHIFT_Y);
952 break;
953 //----------------------
954 case 2: // z成分
955 //----------------------
956 _value = (_value & (0xFFC00000 << SHIFT_Z)) | (f32ToS10N(value) << SHIFT_Z);
957 break;
958 //----------------------
959 default: // エラー
960 //----------------------
961 GX_ASSERT(false, "想定外の成分が指定されました");
962 break;
963 }
964}
965
966//===========================================================================
967// GxSize
968//===========================================================================
969//---------------------------------------------------------------------------
970// コンストラクタ
973//---------------------------------------------------------------------------
974GX_FORCE_INLINE GxSize::GxSize(s32 width, s32 height)
975: _width(width)
976, _height(height)
977{
978}
979
980//---------------------------------------------------------------------------
981// コンストラクタ
983//---------------------------------------------------------------------------
984GX_FORCE_INLINE GxSize::GxSize(const GxRect& rect)
985: _width(rect.getWidth())
986, _height(rect.getHeight())
987{
988}
989
990//---------------------------------------------------------------------------
991// コピーコンストラクタ
993//---------------------------------------------------------------------------
994GX_FORCE_INLINE GxSize::GxSize(const GxSize& size)
995: _width(size._width)
996, _height(size._height)
997{
998}
999
1000//---------------------------------------------------------------------------
1001// 代入
1004//---------------------------------------------------------------------------
1005GX_FORCE_INLINE GxSize& GxSize::operator = (const GxSize& size)
1006{
1007 _width = size._width;
1008 _height = size._height;
1009 return *this;
1010}
1011
1012//---------------------------------------------------------------------------
1013// スカラ加算代入
1016//---------------------------------------------------------------------------
1017GX_FORCE_INLINE GxSize& GxSize::operator += (s32 scalar)
1018{
1019 addScalar(scalar);
1020 return *this;
1021}
1022
1023//---------------------------------------------------------------------------
1024// スカラ減算代入
1027//---------------------------------------------------------------------------
1028GX_FORCE_INLINE GxSize& GxSize::operator -= (s32 scalar)
1029{
1030 subScalar(scalar);
1031 return *this;
1032}
1033
1034//---------------------------------------------------------------------------
1035// スカラ乗算代入
1038//---------------------------------------------------------------------------
1039GX_FORCE_INLINE GxSize& GxSize::operator *= (s32 scalar)
1040{
1041 mulScalar(scalar);
1042 return *this;
1043}
1044
1045//---------------------------------------------------------------------------
1046// スカラ除算代入
1049//---------------------------------------------------------------------------
1050GX_FORCE_INLINE GxSize& GxSize::operator /= (s32 scalar)
1051{
1052 divScalar(scalar);
1053 return *this;
1054}
1055
1056//---------------------------------------------------------------------------
1057// サイズ加算代入
1060//---------------------------------------------------------------------------
1061GX_FORCE_INLINE GxSize& GxSize::operator += (const GxSize& size)
1062{
1063 addSize(size);
1064 return *this;
1065}
1066
1067//---------------------------------------------------------------------------
1068// サイズ減算代入
1071//---------------------------------------------------------------------------
1072GX_FORCE_INLINE GxSize& GxSize::operator -= (const GxSize& size)
1073{
1074 subSize(size);
1075 return *this;
1076}
1077
1078//---------------------------------------------------------------------------
1079// 論理積
1082//---------------------------------------------------------------------------
1083GX_FORCE_INLINE GxSize& GxSize::operator &= (const GxSize& size)
1084{
1087 return *this;
1088}
1089
1090//---------------------------------------------------------------------------
1091// 論理和
1094//---------------------------------------------------------------------------
1095GX_FORCE_INLINE GxSize& GxSize::operator |= (const GxSize& size)
1096{
1099 return *this;
1100}
1101
1102//---------------------------------------------------------------------------
1103// スカラ加算
1107//---------------------------------------------------------------------------
1108GX_FORCE_INLINE const GxSize operator + (const GxSize& size, s32 scalar)
1109{
1110 GxSize result;
1111 return GxSize::getAddScalar(result, size, scalar);
1112}
1113
1114//---------------------------------------------------------------------------
1115// スカラ減算
1119//---------------------------------------------------------------------------
1120GX_FORCE_INLINE const GxSize operator - (const GxSize& size, s32 scalar)
1121{
1122 GxSize result;
1123 return GxSize::getSubScalar(result, size, scalar);
1124}
1125
1126//---------------------------------------------------------------------------
1127// スカラ乗算
1131//---------------------------------------------------------------------------
1132GX_FORCE_INLINE const GxSize operator * (const GxSize& size, s32 scalar)
1133{
1134 GxSize result;
1135 return GxSize::getMulScalar(result, size, scalar);
1136}
1137
1138//---------------------------------------------------------------------------
1139// スカラ乗算
1143//---------------------------------------------------------------------------
1144GX_FORCE_INLINE const GxSize operator * (s32 scalar, const GxSize& size)
1145{
1146 GxSize result;
1147 return GxSize::getMulScalar(result, size, scalar);
1148}
1149
1150//---------------------------------------------------------------------------
1151// スカラ除算
1155//---------------------------------------------------------------------------
1156GX_FORCE_INLINE const GxSize operator / (const GxSize& size, s32 scalar)
1157{
1158 GxSize result;
1159 return GxSize::getDivScalar(result, size, scalar);
1160}
1161
1162//---------------------------------------------------------------------------
1163// サイズ加算
1167//---------------------------------------------------------------------------
1168GX_FORCE_INLINE const GxSize operator + (const GxSize& size0, const GxSize& size1)
1169{
1170 GxSize result;
1171 return GxSize::getAddSize(result, size0, size1);
1172}
1173
1174//---------------------------------------------------------------------------
1175// サイズ減算
1179//---------------------------------------------------------------------------
1180GX_FORCE_INLINE const GxSize operator - (const GxSize& size0, const GxSize& size1)
1181{
1182 GxSize result;
1183 return GxSize::getSubSize(result, size0, size1);
1184}
1185
1186//---------------------------------------------------------------------------
1187// 論理積
1191//---------------------------------------------------------------------------
1192GX_FORCE_INLINE const GxSize operator & (const GxSize& size0, const GxSize& size1)
1193{
1194 return GxSize(GxMath::getMin(size0._width, size1._width), GxMath::getMin(size0._height, size1._height));
1195}
1196
1197//---------------------------------------------------------------------------
1198// 論理和
1202//---------------------------------------------------------------------------
1203GX_FORCE_INLINE const GxSize operator | (const GxSize& size0, const GxSize& size1)
1204{
1205 return GxSize(GxMath::getMax(size0._width, size1._width), GxMath::getMax(size0._height, size1._height));
1206}
1207
1208//---------------------------------------------------------------------------
1209// 一致
1213//---------------------------------------------------------------------------
1214GX_FORCE_INLINE b32 operator == (const GxSize& size0, const GxSize& size1)
1215{
1216 return (size0._width == size1._width) && (size0._height == size1._height);
1217}
1218
1219//---------------------------------------------------------------------------
1220// 不一致
1224//---------------------------------------------------------------------------
1225GX_FORCE_INLINE b32 operator != (const GxSize& size0, const GxSize& size1)
1226{
1227 return (size0._width != size1._width) || (size0._height != size1._height);
1228}
1229
1230//---------------------------------------------------------------------------
1231// スカラ加算を取得
1236//---------------------------------------------------------------------------
1237GX_FORCE_INLINE const GxSize& GxSize::getAddScalar(GxSize& dst, const GxSize& size, s32 scalar)
1238{
1239 dst._width = size._width + scalar;
1240 dst._height = size._height + scalar;
1241
1242 return dst;
1243}
1244
1245//---------------------------------------------------------------------------
1246// スカラ減算を取得
1251//---------------------------------------------------------------------------
1252GX_FORCE_INLINE const GxSize& GxSize::getSubScalar(GxSize& dst, const GxSize& size, s32 scalar)
1253{
1254 dst._width = size._width - scalar;
1255 dst._height = size._height - scalar;
1256
1257 return dst;
1258}
1259
1260//---------------------------------------------------------------------------
1261// スカラ乗算を取得
1266//---------------------------------------------------------------------------
1267GX_FORCE_INLINE const GxSize& GxSize::getMulScalar(GxSize& dst, const GxSize& size, s32 scalar)
1268{
1269 dst._width = size._width * scalar;
1270 dst._height = size._height * scalar;
1271
1272 return dst;
1273}
1274
1275//---------------------------------------------------------------------------
1276// スカラ除算を取得
1281//---------------------------------------------------------------------------
1282GX_FORCE_INLINE const GxSize& GxSize::getDivScalar(GxSize& dst, const GxSize& size, s32 scalar)
1283{
1284 dst._width = size._width / scalar;
1285 dst._height = size._height / scalar;
1286
1287 return dst;
1288}
1289
1290//---------------------------------------------------------------------------
1291// サイズ加算を取得
1296//---------------------------------------------------------------------------
1297GX_FORCE_INLINE const GxSize& GxSize::getAddSize(GxSize& dst, const GxSize& size0, const GxSize& size1)
1298{
1299 dst._width = size0._width + size1._width;
1300 dst._height = size0._height + size1._height;
1301
1302 return dst;
1303}
1304
1305//---------------------------------------------------------------------------
1306// サイズ減算を取得
1311//---------------------------------------------------------------------------
1312GX_FORCE_INLINE const GxSize& GxSize::getSubSize(GxSize& dst, const GxSize& size0, const GxSize& size1)
1313{
1314 dst._width = size0._width - size1._width;
1315 dst._height = size0._height - size1._height;
1316
1317 return dst;
1318}
1319
1320//---------------------------------------------------------------------------
1321// スカラ加算
1324//---------------------------------------------------------------------------
1325GX_FORCE_INLINE const GxSize& GxSize::addScalar(s32 scalar)
1326{
1327 _width += scalar;
1328 _height += scalar;
1329
1330 return *this;
1331}
1332
1333//---------------------------------------------------------------------------
1334// スカラ減算
1337//---------------------------------------------------------------------------
1338GX_FORCE_INLINE const GxSize& GxSize::subScalar(s32 scalar)
1339{
1340 _width -= scalar;
1341 _height -= scalar;
1342
1343 return *this;
1344}
1345
1346//---------------------------------------------------------------------------
1347// スカラ乗算
1350//---------------------------------------------------------------------------
1351GX_FORCE_INLINE const GxSize& GxSize::mulScalar(s32 scalar)
1352{
1353 _width *= scalar;
1354 _height *= scalar;
1355
1356 return *this;
1357}
1358
1359//---------------------------------------------------------------------------
1360// スカラ除算
1363//---------------------------------------------------------------------------
1364GX_FORCE_INLINE const GxSize& GxSize::divScalar(s32 scalar)
1365{
1366 _width /= scalar;
1367 _height /= scalar;
1368
1369 return *this;
1370}
1371
1372//---------------------------------------------------------------------------
1373// サイズ加算
1376//---------------------------------------------------------------------------
1377GX_FORCE_INLINE const GxSize& GxSize::addSize(const GxSize& size)
1378{
1379 _width += size._width;
1380 _height += size._height;
1381
1382 return *this;
1383}
1384
1385//---------------------------------------------------------------------------
1386// サイズ減算
1389//---------------------------------------------------------------------------
1390GX_FORCE_INLINE const GxSize& GxSize::subSize(const GxSize& size)
1391{
1392 _width -= size._width;
1393 _height -= size._height;
1394
1395 return *this;
1396}
1397
1398//---------------------------------------------------------------------------
1399// 内包判定
1402//---------------------------------------------------------------------------
1403GX_INLINE b32 GxSize::isIncluding(const GxPoint2& point) const
1404{
1405 if( point._x >= 0 && point._y >= 0 && _width - point._x >= 0 && _height - point._y >= 0 )
1406 {
1407 return true;
1408 }
1409 return false;
1410}
1411
1412//===========================================================================
1413// GxPoint2
1414//===========================================================================
1415//---------------------------------------------------------------------------
1416// コンストラクタ
1419//---------------------------------------------------------------------------
1420GX_FORCE_INLINE GxPoint2::GxPoint2(s32 x, s32 y)
1421: _x(x)
1422, _y(y)
1423{
1424}
1425
1426//---------------------------------------------------------------------------
1427// コンストラクタ
1429//---------------------------------------------------------------------------
1430GX_FORCE_INLINE GxPoint2::GxPoint2(const GxVector2& vector )
1431: _x(static_cast<s32>(vector._x))
1432, _y(static_cast<s32>(vector._y))
1433{
1434}
1435
1436//---------------------------------------------------------------------------
1437// コピーコンストラクタ
1439//---------------------------------------------------------------------------
1440GX_FORCE_INLINE GxPoint2::GxPoint2(const GxPoint2& point)
1441: _x(point._x)
1442, _y(point._y)
1443{
1444}
1445
1446//---------------------------------------------------------------------------
1447// 代入
1450//---------------------------------------------------------------------------
1451GX_FORCE_INLINE GxPoint2& GxPoint2::operator = (const GxPoint2& point)
1452{
1453 _x = point._x;
1454 _y = point._y;
1455 return *this;
1456}
1457
1458//---------------------------------------------------------------------------
1459// 加算代入
1462//---------------------------------------------------------------------------
1463GX_FORCE_INLINE GxPoint2& GxPoint2::operator += (const GxPoint2& point)
1464{
1465 _x += point._x;
1466 _y += point._y;
1467 return *this;
1468}
1469
1470//---------------------------------------------------------------------------
1471// 減算代入
1474//---------------------------------------------------------------------------
1475GX_FORCE_INLINE GxPoint2& GxPoint2::operator -= (const GxPoint2& point)
1476{
1477 _x -= point._x;
1478 _y -= point._y;
1479 return *this;
1480}
1481
1482//---------------------------------------------------------------------------
1483// 加算代入
1486//---------------------------------------------------------------------------
1487GX_FORCE_INLINE GxPoint2& GxPoint2::operator += (const GxSize& size)
1488{
1489 _x += size._width;
1490 _y += size._height;
1491 return *this;
1492}
1493
1494//---------------------------------------------------------------------------
1495// 減算代入
1498//---------------------------------------------------------------------------
1499GX_FORCE_INLINE GxPoint2& GxPoint2::operator -= (const GxSize& size)
1500{
1501 _x -= size._width;
1502 _y -= size._height;
1503 return *this;
1504}
1505
1506//---------------------------------------------------------------------------
1507// 加算
1511//---------------------------------------------------------------------------
1512GX_FORCE_INLINE const GxPoint2 operator + (const GxPoint2& point0, const GxPoint2& point1)
1513{
1514 return GxPoint2(point0._x + point1._x, point0._y + point1._y);
1515}
1516
1517//---------------------------------------------------------------------------
1518// 減算
1522//---------------------------------------------------------------------------
1523GX_FORCE_INLINE const GxPoint2 operator - (const GxPoint2& point0, const GxPoint2& point1)
1524{
1525 return GxPoint2(point0._x - point1._x, point0._y - point1._y);
1526}
1527
1528//---------------------------------------------------------------------------
1529// 加算
1533//---------------------------------------------------------------------------
1534GX_FORCE_INLINE const GxPoint2 operator + (const GxPoint2& point, const GxSize& size)
1535{
1536 return GxPoint2(point._x + size._width, point._y + size._height);
1537}
1538
1539//---------------------------------------------------------------------------
1540// 減算
1544//---------------------------------------------------------------------------
1545GX_FORCE_INLINE const GxPoint2 operator - (const GxPoint2& point, const GxSize& size)
1546{
1547 return GxPoint2(point._x - size._width, point._y - size._height);
1548}
1549
1550//---------------------------------------------------------------------------
1551// 一致
1555//---------------------------------------------------------------------------
1556GX_FORCE_INLINE b32 operator == (const GxPoint2& point0, const GxPoint2& point1)
1557{
1558 return (point0._x == point1._x) && (point0._y == point1._y);
1559}
1560
1561//---------------------------------------------------------------------------
1562// 不一致
1566//---------------------------------------------------------------------------
1567GX_FORCE_INLINE b32 operator != (const GxPoint2& point0, const GxPoint2& point1)
1568{
1569 return (point0._x != point1._x) || (point0._y != point1._y);
1570}
1571
1572//===========================================================================
1573// GxRect
1574//===========================================================================
1575//---------------------------------------------------------------------------
1576// 代入
1579//---------------------------------------------------------------------------
1580GX_FORCE_INLINE GxRect& GxRect::operator = (const GxRect& rect)
1581{
1582 _left = rect._left;
1583 _top = rect._top;
1584 _right = rect._right;
1585 _bottom = rect._bottom;
1586 return *this;
1587}
1588
1589//---------------------------------------------------------------------------
1590// 加算
1593//---------------------------------------------------------------------------
1594GX_FORCE_INLINE GxRect& GxRect::operator += (const GxRect& rect)
1595{
1596 _left += rect._left;
1597 _top += rect._top;
1598 _right += rect._right;
1599 _bottom += rect._bottom;
1600 return *this;
1601}
1602
1603//---------------------------------------------------------------------------
1604// 減算
1607//---------------------------------------------------------------------------
1608GX_FORCE_INLINE GxRect& GxRect::operator -= (const GxRect& rect)
1609{
1610 _left -= rect._left;
1611 _top -= rect._top;
1612 _right -= rect._right;
1613 _bottom -= rect._bottom;
1614 return *this;
1615}
1616
1617//---------------------------------------------------------------------------
1618// 加算
1621//---------------------------------------------------------------------------
1622GX_FORCE_INLINE GxRect& GxRect::operator += (const GxPoint2& point)
1623{
1624 _left += point._x;
1625 _top += point._y;
1626 _right += point._x;
1627 _bottom += point._y;
1628 return *this;
1629}
1630
1631//---------------------------------------------------------------------------
1632// 減算
1635//---------------------------------------------------------------------------
1636GX_FORCE_INLINE GxRect& GxRect::operator -= (const GxPoint2& point)
1637{
1638 _left -= point._x;
1639 _top -= point._y;
1640 _right -= point._x;
1641 _bottom -= point._y;
1642 return *this;
1643}
1644
1645//---------------------------------------------------------------------------
1646// 論理積
1649//---------------------------------------------------------------------------
1650GX_FORCE_INLINE GxRect& GxRect::operator &= (const GxRect& rect)
1651{
1653 _top = GxMath::getMax(_top, rect._top);
1656 return *this;
1657}
1658
1659//---------------------------------------------------------------------------
1660// 論理和
1663//---------------------------------------------------------------------------
1664GX_FORCE_INLINE GxRect& GxRect::operator |= (const GxRect& rect)
1665{
1667 _top = GxMath::getMin(_top, rect._top);
1670 return *this;
1671}
1672
1673//---------------------------------------------------------------------------
1674// 正
1677//---------------------------------------------------------------------------
1678GX_FORCE_INLINE const GxRect operator + (const GxRect& rect)
1679{
1680 return GxRect(rect._left, rect._top, rect._right, rect._bottom);
1681}
1682
1683//---------------------------------------------------------------------------
1684// 負
1687//---------------------------------------------------------------------------
1688GX_FORCE_INLINE const GxRect operator - (const GxRect& rect)
1689{
1690 return GxRect(-rect._left, -rect._top, -rect._right, -rect._bottom);
1691}
1692
1693//---------------------------------------------------------------------------
1694// 加算
1698//---------------------------------------------------------------------------
1699GX_FORCE_INLINE const GxRect operator + (const GxRect& rect0, const GxRect& rect1)
1700{
1701 return GxRect(rect0._left + rect1._left, rect0._top + rect1._top, rect0._right + rect1._right, rect0._bottom + rect1._bottom);
1702}
1703
1704//---------------------------------------------------------------------------
1705// 減算
1709//---------------------------------------------------------------------------
1710GX_FORCE_INLINE const GxRect operator - (const GxRect& rect0, const GxRect& rect1)
1711{
1712 return GxRect(rect0._left - rect1._left, rect0._top - rect1._top, rect0._right - rect1._right, rect0._bottom - rect1._bottom);
1713}
1714
1715//---------------------------------------------------------------------------
1716// 加算
1720//---------------------------------------------------------------------------
1721GX_FORCE_INLINE const GxRect operator + (const GxRect& rect, const GxPoint2& point)
1722{
1723 return GxRect(rect._left + point._x, rect._top + point._y, rect._right + point._x, rect._bottom + point._y);
1724}
1725
1726//---------------------------------------------------------------------------
1727// 減算
1731//---------------------------------------------------------------------------
1732GX_FORCE_INLINE const GxRect operator - (const GxRect& rect, const GxPoint2& point)
1733{
1734 return GxRect(rect._left - point._x, rect._top - point._y, rect._right - point._x, rect._bottom - point._y);
1735}
1736
1737//---------------------------------------------------------------------------
1738// 論理積
1742//---------------------------------------------------------------------------
1743GX_FORCE_INLINE const GxRect operator & (const GxRect& rect0, const GxRect& rect1)
1744{
1745 return GxRect(GxMath::getMax(rect0._left, rect1._left), GxMath::getMax(rect0._top, rect1._top), GxMath::getMin(rect0._right, rect1._right), GxMath::getMin(rect0._bottom, rect1._bottom));
1746}
1747
1748//---------------------------------------------------------------------------
1749// 論理和
1753//---------------------------------------------------------------------------
1754GX_FORCE_INLINE const GxRect operator | (const GxRect& rect0, const GxRect& rect1)
1755{
1756 return GxRect(GxMath::getMin(rect0._left, rect1._left), GxMath::getMin(rect0._top, rect1._top), GxMath::getMax(rect0._right, rect1._right), GxMath::getMax(rect0._bottom, rect1._bottom));
1757}
1758
1759//---------------------------------------------------------------------------
1760// 一致
1764//---------------------------------------------------------------------------
1765GX_FORCE_INLINE b32 operator == (const GxRect& rect0, const GxRect& rect1)
1766{
1767 return ( (rect0._left == rect1._left) && (rect0._right == rect1._right) && (rect0._top == rect1._top) && (rect0._bottom == rect1._bottom) );
1768}
1769
1770//---------------------------------------------------------------------------
1771// 不一致
1775//---------------------------------------------------------------------------
1776GX_FORCE_INLINE b32 operator != (const GxRect& rect0, const GxRect& rect1)
1777{
1778 return ( (rect0._left != rect1._left) || (rect0._right != rect1._right) || (rect0._top != rect1._top) || (rect0._bottom != rect1._bottom) );
1779}
1780
1781//---------------------------------------------------------------------------
1782// 衝突判定
1785//---------------------------------------------------------------------------
1786GX_INLINE b32 GxRect::isHit(const GxRect& rect) const
1787{
1788 auto andRect = *this & rect;
1789 if(andRect.getWidth() > 0 && andRect.getHeight() > 0)
1790 {
1791 return true;
1792 }
1793 return false;
1794}
1795
1796//---------------------------------------------------------------------------
1797// 内包判定
1800//---------------------------------------------------------------------------
1801GX_INLINE b32 GxRect::isIncluding(const GxRect& rect) const
1802{
1803 if( rect._left - _left >= 0 && rect._top - _top >= 0 && _right - rect._right >= 0 && _bottom - rect._bottom >= 0 )
1804 {
1805 return true;
1806 }
1807 return false;
1808}
1809
1810//---------------------------------------------------------------------------
1811// 内包判定
1814//---------------------------------------------------------------------------
1815GX_INLINE b32 GxRect::isIncluding(const GxPoint2& point) const
1816{
1817 if( point._x - _left >= 0 && point._y - _top >= 0 && _right - point._x >= 0 && _bottom - point._y >= 0 )
1818 {
1819 return true;
1820 }
1821 return false;
1822}
1823
1824//---------------------------------------------------------------------------
1825// サイズ指定
1828//---------------------------------------------------------------------------
1829GX_INLINE void GxRect::setSize( const GxSize& size, BASE base )
1830{
1831 switch( base )
1832 {
1833 case BASE::TOP_LEFT:
1834 _right = _left + size._width;
1835 _bottom = _top + size._height;
1836 break;
1837 case BASE::TOP_RIGHT:
1838 _left = _right - size._width;
1839 _bottom = _top + size._height;
1840 break;
1841 case BASE::BOTTOM_LEFT:
1842 _right = _left + size._width;
1843 _top = _bottom - size._height;
1844 break;
1845 case BASE::BOTTOM_RIGHT:
1846 _left = _right - size._width;
1847 _top = _bottom - size._height;
1848 break;
1849 }
1850}
1851
1852//===========================================================================
1853// GxRectF
1854//===========================================================================
1855//---------------------------------------------------------------------------
1856// 代入(実数)
1859//---------------------------------------------------------------------------
1860GX_FORCE_INLINE GxRectF& GxRectF::operator = (const GxRectF& rect)
1861{
1862 _left = rect._left;
1863 _top = rect._top;
1864 _right = rect._right;
1865 _bottom = rect._bottom;
1866 return *this;
1867}
1868
1869//---------------------------------------------------------------------------
1870// 加算
1873//---------------------------------------------------------------------------
1874GX_FORCE_INLINE GxRectF& GxRectF::operator += (const GxRectF& rect)
1875{
1876 _left += rect._left;
1877 _top += rect._top;
1878 _right += rect._right;
1879 _bottom += rect._bottom;
1880 return *this;
1881}
1882
1883//---------------------------------------------------------------------------
1884// 減算
1887//---------------------------------------------------------------------------
1888GX_FORCE_INLINE GxRectF& GxRectF::operator -= (const GxRectF& rect)
1889{
1890 _left -= rect._left;
1891 _top -= rect._top;
1892 _right -= rect._right;
1893 _bottom -= rect._bottom;
1894 return *this;
1895}
1896
1897//---------------------------------------------------------------------------
1898// 加算
1901//---------------------------------------------------------------------------
1902GX_FORCE_INLINE GxRectF& GxRectF::operator += (const GxVector2& point)
1903{
1904 _left += point._x;
1905 _top += point._y;
1906 _right += point._x;
1907 _bottom += point._y;
1908 return *this;
1909}
1910
1911//---------------------------------------------------------------------------
1912// 減算
1915//---------------------------------------------------------------------------
1916GX_FORCE_INLINE GxRectF& GxRectF::operator -= (const GxVector2& point)
1917{
1918 _left -= point._x;
1919 _top -= point._y;
1920 _right -= point._x;
1921 _bottom -= point._y;
1922 return *this;
1923}
1924
1925//---------------------------------------------------------------------------
1926// 論理積
1929//---------------------------------------------------------------------------
1930GX_FORCE_INLINE GxRectF& GxRectF::operator &= (const GxRectF& rect)
1931{
1933 _top = GxMath::getMax(_top, rect._top);
1936 return *this;
1937}
1938
1939//---------------------------------------------------------------------------
1940// 論理和
1943//---------------------------------------------------------------------------
1944GX_FORCE_INLINE GxRectF& GxRectF::operator |= (const GxRectF& rect)
1945{
1947 _top = GxMath::getMin(_top, rect._top);
1950 return *this;
1951}
1952
1953//---------------------------------------------------------------------------
1954// 正
1957//---------------------------------------------------------------------------
1958GX_FORCE_INLINE const GxRectF operator + (const GxRectF& rect)
1959{
1960 return GxRectF(rect._left, rect._top, rect._right, rect._bottom);
1961}
1962
1963//---------------------------------------------------------------------------
1964// 負
1967//---------------------------------------------------------------------------
1968GX_FORCE_INLINE const GxRectF operator - (const GxRectF& rect)
1969{
1970 return GxRectF(-rect._left, -rect._top, -rect._right, -rect._bottom);
1971}
1972
1973//---------------------------------------------------------------------------
1974// 加算
1978//---------------------------------------------------------------------------
1979GX_FORCE_INLINE const GxRectF operator + (const GxRectF& rect0, const GxRectF& rect1)
1980{
1981 return GxRectF(rect0._left + rect1._left, rect0._top + rect1._top, rect0._right + rect1._right, rect0._bottom + rect1._bottom);
1982}
1983
1984//---------------------------------------------------------------------------
1985// 減算
1989//---------------------------------------------------------------------------
1990GX_FORCE_INLINE const GxRectF operator - (const GxRectF& rect0, const GxRectF& rect1)
1991{
1992 return GxRectF(rect0._left - rect1._left, rect0._top - rect1._top, rect0._right - rect1._right, rect0._bottom - rect1._bottom);
1993}
1994
1995//---------------------------------------------------------------------------
1996// 加算
2000//---------------------------------------------------------------------------
2001GX_FORCE_INLINE const GxRectF operator + (const GxRectF& rect, const GxVector2& point)
2002{
2003 return GxRectF(rect._left + point._x, rect._top + point._y, rect._right + point._x, rect._bottom + point._y);
2004}
2005
2006//---------------------------------------------------------------------------
2007// 減算
2011//---------------------------------------------------------------------------
2012GX_FORCE_INLINE const GxRectF operator - (const GxRectF& rect, const GxVector2& point)
2013{
2014 return GxRectF(rect._left - point._x, rect._top - point._y, rect._right - point._x, rect._bottom - point._y);
2015}
2016
2017//---------------------------------------------------------------------------
2018// 論理積
2022//---------------------------------------------------------------------------
2023GX_FORCE_INLINE const GxRectF operator & (const GxRectF& rect0, const GxRectF& rect1)
2024{
2025 return GxRectF(GxMath::getMax(rect0._left, rect1._left), GxMath::getMax(rect0._top, rect1._top), GxMath::getMin(rect0._right, rect1._right), GxMath::getMin(rect0._bottom, rect1._bottom));
2026}
2027
2028//---------------------------------------------------------------------------
2029// 論理和
2033//---------------------------------------------------------------------------
2034GX_FORCE_INLINE const GxRectF operator | (const GxRectF& rect0, const GxRectF& rect1)
2035{
2036 return GxRectF(GxMath::getMin(rect0._left, rect1._left), GxMath::getMin(rect0._top, rect1._top), GxMath::getMax(rect0._right, rect1._right), GxMath::getMax(rect0._bottom, rect1._bottom));
2037}
2038
2039//---------------------------------------------------------------------------
2040// 一致
2044//---------------------------------------------------------------------------
2045GX_FORCE_INLINE b32 operator == (const GxRectF& rect0, const GxRectF& rect1)
2046{
2047 return ((rect0._left == rect1._left) && (rect0._right == rect1._right) && (rect0._top == rect1._top) && (rect0._bottom == rect1._bottom));
2048}
2049
2050//---------------------------------------------------------------------------
2051// 不一致
2055//---------------------------------------------------------------------------
2056GX_FORCE_INLINE b32 operator != (const GxRectF& rect0, const GxRectF& rect1)
2057{
2058 return ((rect0._left != rect1._left) || (rect0._right != rect1._right) || (rect0._top != rect1._top) || (rect0._bottom != rect1._bottom));
2059}
2060
2061//---------------------------------------------------------------------------
2062// 衝突判定
2065//---------------------------------------------------------------------------
2066GX_INLINE b32 GxRectF::isHit(const GxRectF& rect) const
2067{
2068 auto andRect = *this & rect;
2069 if (andRect.getWidth() > 0 && andRect.getHeight() > 0)
2070 {
2071 return true;
2072 }
2073 return false;
2074}
2075
2076//---------------------------------------------------------------------------
2077// 内包判定
2080//---------------------------------------------------------------------------
2081GX_INLINE b32 GxRectF::isIncluding(const GxRectF& rect) const
2082{
2083 if (rect._left - _left >= 0 && rect._top - _top >= 0 && _right - rect._right >= 0 && _bottom - rect._bottom >= 0)
2084 {
2085 return true;
2086 }
2087 return false;
2088}
2089
2090//---------------------------------------------------------------------------
2091// 内包判定
2094//---------------------------------------------------------------------------
2095GX_INLINE b32 GxRectF::isIncluding(const GxVector2& point) const
2096{
2097 if (point._x - _left >= 0 && point._y - _top >= 0 && _right - point._x >= 0 && _bottom - point._y >= 0)
2098 {
2099 return true;
2100 }
2101 return false;
2102}
2103//---------------------------------------------------------------------------
2104// サイズ指定
2107//---------------------------------------------------------------------------
2108GX_INLINE void GxRectF::setSize(const GxSize& size, BASE base)
2109{
2110 switch (base)
2111 {
2112 case BASE::TOP_LEFT:
2113 _right = _left + size._width;
2114 _bottom = _top + size._height;
2115 break;
2116 case BASE::TOP_RIGHT:
2117 _left = _right - size._width;
2118 _bottom = _top + size._height;
2119 break;
2120 case BASE::BOTTOM_LEFT:
2121 _right = _left + size._width;
2122 _top = _bottom - size._height;
2123 break;
2124 case BASE::BOTTOM_RIGHT:
2125 _left = _right - size._width;
2126 _top = _bottom - size._height;
2127 break;
2128 }
2129}
2130
2131//---------------------------------------------------------------------------
2132// GxRect型を設定
2135//---------------------------------------------------------------------------
2136GX_FORCE_INLINE const GxRectF& GxRectF::setGxRect(const GxRect& rect)
2137{
2138 _top = static_cast<f32>(rect._top);
2139 _left = static_cast<f32>(rect._left);
2140 _right = static_cast<f32>(rect._right);
2141 _bottom = static_cast<f32>(rect._bottom);
2142 return *this;
2143}
2144
2145GX_CORE_NAMESPACE_END()
GX_FORCE_INLINE const GxSize operator&(const GxSize &size0, const GxSize &size1)
Definition GxStruct.inl:1192
GX_FORCE_INLINE const GxSize operator/(const GxSize &size, s32 scalar)
Definition GxStruct.inl:1156
GX_FORCE_INLINE const GxSize operator|(const GxSize &size0, const GxSize &size1)
Definition GxStruct.inl:1203
GX_FORCE_INLINE const GxSize operator*(const GxSize &size, s32 scalar)
Definition GxStruct.inl:1132
GX_FORCE_INLINE const GxSize operator+(const GxSize &size, s32 scalar)
Definition GxStruct.inl:1108
GX_FORCE_INLINE b32 operator!=(const GxSize &size0, const GxSize &size1)
Definition GxStruct.inl:1225
GX_FORCE_INLINE const GxSize operator-(const GxSize &size, s32 scalar)
Definition GxStruct.inl:1120
GX_FORCE_INLINE b32 operator==(const GxSize &size0, const GxSize &size1)
Definition GxStruct.inl:1214
static GX_FORCE_INLINE T getMax(const T value0, const T value1)
大きいほうを取得
Definition GxMath.h:174
static GX_FORCE_INLINE T getMin(const T value0, const T value1)
小さいほうを取得
Definition GxMath.h:172
2次元浮動小数点数(倍精度)クラス
Definition GxStruct.h:207
GX_FORCE_INLINE GxDouble2(void)
デフォルトコンストラクタ
Definition GxStruct.h:214
f64 _x
X値
Definition GxStruct.h:260
GX_FORCE_INLINE GxDouble2 & operator=(const GxDouble2 &double2)
代入
Definition GxStruct.inl:322
f64 _y
Y値
Definition GxStruct.h:265
3次元浮動小数点数(倍精度)クラス
Definition GxStruct.h:276
GX_FORCE_INLINE GxDouble3(void)
デフォルトコンストラクタ
Definition GxStruct.h:283
f64 _x
X値
Definition GxStruct.h:327
f64 _z
Z値
Definition GxStruct.h:329
f64 _y
Y値
Definition GxStruct.h:328
GX_FORCE_INLINE GxDouble3 & operator=(const GxVector3d &vector)
代入
Definition GxStruct.inl:394
4次元浮動小数点数(倍精度)クラス
Definition GxStruct.h:338
GX_FORCE_INLINE GxDouble4(void)
デフォルトコンストラクタ
Definition GxStruct.h:345
f64 _z
Z値
Definition GxStruct.h:375
f64 _w
W値
Definition GxStruct.h:376
f64 _x
X値
Definition GxStruct.h:373
GX_FORCE_INLINE GxDouble4 & operator=(const GxVector4d &vector)
代入
Definition GxStruct.inl:435
f64 _y
Y値
Definition GxStruct.h:374
16bit浮動小数
Definition GxStruct.h:386
static GX_FORCE_INLINE f32 f16ToF32(GxF16 valueF16)
16ビットから32ビットの変換
Definition GxStruct.inl:547
constexpr void setValueU16(u16 setValue)
u16で値を設定
Definition GxStruct.h:422
static GX_FORCE_INLINE GxF16 f32ToF16(f32 valueF32)
32ビットから16ビットの変換
Definition GxStruct.inl:486
GX_INLINE GxF16(void)
デフォルトコンストラクタ
Definition GxStruct.inl:450
constexpr u16 getValueU16(void) const
u16で値を取得
Definition GxStruct.h:420
16bit浮動小数2次元ベクトル
Definition GxStruct.h:440
GxF16 _value[2]
Definition GxStruct.h:474
GX_FORCE_INLINE GxF16x2 & operator=(const GxF16x2 &value)
代入
Definition GxStruct.inl:577
16bit浮動小数4次元ベクトル
Definition GxStruct.h:483
GxF16 _value[4]
Definition GxStruct.h:521
GX_FORCE_INLINE GxF16x4 & operator=(const GxF16x4 &value)
代入
Definition GxStruct.inl:619
2次元浮動小数点数クラス
Definition GxStruct.h:22
GX_FORCE_INLINE GxFloat2(void)
デフォルトコンストラクタ
Definition GxStruct.h:29
GX_FORCE_INLINE GxFloat2 & operator=(const GxFloat2 &float2)
代入
Definition GxStruct.inl:94
f32 _x
X値
Definition GxStruct.h:75
f32 _y
Y値
Definition GxStruct.h:80
3次元浮動小数点数クラス
Definition GxStruct.h:91
f32 _y
Y値
Definition GxStruct.h:143
f32 _x
X値
Definition GxStruct.h:142
GX_FORCE_INLINE GxFloat3(void)
デフォルトコンストラクタ
Definition GxStruct.h:98
GX_FORCE_INLINE GxFloat3 & operator=(const GxVector3 &vector)
代入
Definition GxStruct.inl:166
f32 _z
Z値
Definition GxStruct.h:144
4次元浮動小数点数クラス
Definition GxStruct.h:153
GX_FORCE_INLINE GxFloat4 & operator=(const GxVector4 &vector)
代入
Definition GxStruct.inl:219
f32 _x
X値
Definition GxStruct.h:192
f32 _y
Y値
Definition GxStruct.h:193
f32 _z
Z値
Definition GxStruct.h:194
GX_FORCE_INLINE GxFloat4(void)
デフォルトコンストラクタ
Definition GxStruct.h:160
f32 _w
W値
Definition GxStruct.h:195
32bit[-1, 1]正規化小数3次元ベクトル(11:11:10)
Definition GxStruct.h:646
GX_FORCE_INLINE f32 getValueF32(u32 index) const
f32で値を取得
Definition GxStruct.inl:902
GX_FORCE_INLINE GxPackedNx3 & operator=(const GxPackedNx3 &value)
代入
Definition GxStruct.h:683
static GX_FORCE_INLINE f32 s10NTof32(u32 valueS10N)
10ビットから32ビットの変換
Definition GxStruct.inl:829
static constexpr u32 SHIFT_Y
Y成分シフト量
Definition GxStruct.h:657
static GX_FORCE_INLINE u32 f32ToS10N(f32 valueF32)
32ビットから10ビットの変換
Definition GxStruct.inl:804
static constexpr u32 SHIFT_X
X成分シフト量
Definition GxStruct.h:655
GX_FORCE_INLINE void setValueF32(u32 index, f32 setValue)
f32で値を設定
Definition GxStruct.inl:939
static GX_FORCE_INLINE f32 s11NTof32(u32 valueS11N)
11ビットから32ビットの変換
Definition GxStruct.inl:878
static constexpr u32 SHIFT_Z
Z成分シフト量
Definition GxStruct.h:659
static GX_FORCE_INLINE u32 f32ToS11N(f32 valueF32)
32ビットから11ビットの変換
Definition GxStruct.inl:853
座標
Definition GxStruct.h:867
s32 _y
Y値
Definition GxStruct.h:942
GX_FORCE_INLINE GxPoint2 & operator-=(const GxPoint2 &point)
減算代入
Definition GxStruct.inl:1475
GX_FORCE_INLINE GxPoint2 & operator=(const GxPoint2 &point)
代入
Definition GxStruct.inl:1451
GX_FORCE_INLINE GxPoint2(void)
コンストラクタ
Definition GxStruct.h:885
s32 _x
X値
Definition GxStruct.h:941
GX_FORCE_INLINE GxPoint2 & operator+=(const GxPoint2 &point)
加算代入
Definition GxStruct.inl:1463
クォータニオン
Definition GxQuaternion.h:19
f32 _x
X値
Definition GxQuaternion.h:272
f32 _w
W値
Definition GxQuaternion.h:275
f32 _y
Y値
Definition GxQuaternion.h:273
f32 _z
Z値
Definition GxQuaternion.h:274
実数矩形
Definition GxStruct.h:1100
f32 _left
左辺
Definition GxStruct.h:1231
GX_INLINE b32 isHit(const GxRectF &rect) const
衝突判定
Definition GxStruct.inl:2066
GX_FORCE_INLINE GxRectF & operator+=(const GxRectF &rect)
加算
Definition GxStruct.inl:1874
f32 _bottom
底辺
Definition GxStruct.h:1234
f32 _top
上辺
Definition GxStruct.h:1232
GX_INLINE b32 isIncluding(const GxRectF &rect) const
内包判定
Definition GxStruct.inl:2081
GX_FORCE_INLINE const GxRectF & setGxRect(const GxRect &rect)
GxRect型をセット(セット後に自身を返す)
Definition GxStruct.inl:2136
GX_FORCE_INLINE GxRectF & operator-=(const GxRectF &rect)
減算
Definition GxStruct.inl:1888
BASE
基準位置
Definition GxStruct.h:1113
@ BOTTOM_RIGHT
右下
@ TOP_LEFT
左上
@ BOTTOM_LEFT
左下
@ TOP_RIGHT
右上
f32 _right
右辺
Definition GxStruct.h:1233
GX_INLINE void setSize(const GxSize &size, BASE base=BASE::TOP_LEFT)
サイズの変更
Definition GxStruct.inl:2108
GX_FORCE_INLINE GxRectF & operator|=(const GxRectF &rect)
論理和
Definition GxStruct.inl:1944
GX_FORCE_INLINE GxRectF & operator=(const GxRectF &rect)
代入
Definition GxStruct.inl:1860
GX_FORCE_INLINE GxRectF & operator&=(const GxRectF &rect)
論理積
Definition GxStruct.inl:1930
矩形
Definition GxStruct.h:951
GX_FORCE_INLINE GxRect & operator+=(const GxRect &rect)
加算
Definition GxStruct.inl:1594
GX_FORCE_INLINE GxRect & operator|=(const GxRect &rect)
論理和
Definition GxStruct.inl:1664
GX_FORCE_INLINE GxRect & operator&=(const GxRect &rect)
論理積
Definition GxStruct.inl:1650
GX_FORCE_INLINE GxRect & operator-=(const GxRect &rect)
減算
Definition GxStruct.inl:1608
s32 _bottom
底辺
Definition GxStruct.h:1091
GX_INLINE b32 isIncluding(const GxRect &rect) const
内包判定
Definition GxStruct.inl:1801
GX_FORCE_INLINE GxRect & operator=(const GxRect &rect)
代入
Definition GxStruct.inl:1580
GX_INLINE void setSize(const GxSize &size, BASE base=BASE::TOP_LEFT)
サイズの変更
Definition GxStruct.inl:1829
GX_INLINE b32 isHit(const GxRect &rect) const
衝突判定
Definition GxStruct.inl:1786
BASE
基準位置
Definition GxStruct.h:968
@ BOTTOM_RIGHT
右下
@ TOP_LEFT
左上
@ BOTTOM_LEFT
左下
@ TOP_RIGHT
右上
s32 _top
上辺
Definition GxStruct.h:1089
s32 _left
左辺
Definition GxStruct.h:1088
s32 _right
右辺
Definition GxStruct.h:1090
サイズ
Definition GxStruct.h:730
GX_FORCE_INLINE const GxSize & subScalar(s32 scalar)
スカラ減算
Definition GxStruct.inl:1338
GX_FORCE_INLINE GxSize & operator+=(s32 scalar)
スカラ加算代入
Definition GxStruct.inl:1017
GX_FORCE_INLINE GxSize & operator=(const GxSize &size)
代入
Definition GxStruct.inl:1005
GX_FORCE_INLINE GxSize & operator&=(const GxSize &size)
論理積
Definition GxStruct.inl:1083
GX_FORCE_INLINE GxSize & operator-=(s32 scalar)
スカラ減算代入
Definition GxStruct.inl:1028
GX_FORCE_INLINE const GxSize & mulScalar(s32 scalar)
スカラ乗算
Definition GxStruct.inl:1351
GX_FORCE_INLINE GxSize(void)
デフォルトコンストラクタ
Definition GxStruct.h:752
GX_FORCE_INLINE GxSize & operator|=(const GxSize &size)
論理和
Definition GxStruct.inl:1095
static GX_FORCE_INLINE const GxSize & getSubScalar(GxSize &dst, const GxSize &size, s32 scalar)
スカラ減算を取得
Definition GxStruct.inl:1252
GX_INLINE b32 isIncluding(const GxPoint2 &point) const
内包判定
Definition GxStruct.inl:1403
GX_FORCE_INLINE GxSize & operator*=(s32 scalar)
スカラ乗算代入
Definition GxStruct.inl:1039
GX_FORCE_INLINE const GxSize & subSize(const GxSize &size)
サイズ減算
Definition GxStruct.inl:1390
s32 _width
Definition GxStruct.h:857
static GX_FORCE_INLINE const GxSize & getDivScalar(GxSize &dst, const GxSize &size, s32 scalar)
スカラ除算を取得
Definition GxStruct.inl:1282
s32 _height
高さ
Definition GxStruct.h:858
static GX_FORCE_INLINE const GxSize & getAddSize(GxSize &dst, const GxSize &size0, const GxSize &size1)
サイズ加算を取得
Definition GxStruct.inl:1297
GX_FORCE_INLINE GxSize & operator/=(s32 scalar)
スカラ除算代入
Definition GxStruct.inl:1050
GX_FORCE_INLINE const GxSize & addSize(const GxSize &size)
サイズ加算
Definition GxStruct.inl:1377
GX_FORCE_INLINE const GxSize & addScalar(s32 scalar)
スカラ加算
Definition GxStruct.inl:1325
static GX_FORCE_INLINE const GxSize & getSubSize(GxSize &dst, const GxSize &size0, const GxSize &size1)
サイズ減算を取得
Definition GxStruct.inl:1312
static GX_FORCE_INLINE const GxSize & getMulScalar(GxSize &dst, const GxSize &size, s32 scalar)
スカラ乗算を取得
Definition GxStruct.inl:1267
static GX_FORCE_INLINE const GxSize & getAddScalar(GxSize &dst, const GxSize &size, s32 scalar)
スカラ加算を取得
Definition GxStruct.inl:1237
GX_FORCE_INLINE const GxSize & divScalar(s32 scalar)
スカラ除算
Definition GxStruct.inl:1364
8bit[0, 1]正規化小数
Definition GxStruct.h:530
static GX_FORCE_INLINE f32 u8NToF32(GxU8N valueU8N)
8ビットから32ビットの変換
Definition GxStruct.inl:715
static GX_FORCE_INLINE GxU8N f32ToU8N(f32 valueF32)
32ビットから8ビットの変換
Definition GxStruct.inl:700
constexpr u8 getValueU8(void) const
u8で値を取得する
Definition GxStruct.h:564
constexpr void setValueU8(u8 setValue)
u8で値を設定する
Definition GxStruct.h:566
GX_INLINE GxU8N(void)
デフォルトコンストラクタ
Definition GxStruct.inl:665
32bit[0, 1]正規化小数4次元ベクトル(8:8:8:8)
Definition GxStruct.h:583
GX_FORCE_INLINE GxU8Nx4 & operator=(const GxU8Nx4 &value)
代入
Definition GxStruct.inl:728
2次元ベクトル
Definition GxVector.h:34
f32 _y
Y値
Definition GxVector.h:235
f32 _x
X値
Definition GxVector.h:234
2次元ベクトル(倍精度)
Definition GxVectord.h:25
f64 _y
Y値
Definition GxVectord.h:226
f64 _x
X値
Definition GxVectord.h:225
3次元ベクトル
Definition GxVector.h:245
f32 _z
Z値
Definition GxVector.h:572
f32 _y
Y値
Definition GxVector.h:571
f32 _x
X値
Definition GxVector.h:570
3次元ベクトル(倍精度)
Definition GxVectord.h:235
f64 _y
Y値
Definition GxVectord.h:487
f64 _x
X値
Definition GxVectord.h:486
f64 _z
Z値
Definition GxVectord.h:488
4次元ベクトル
Definition GxVector.h:582
f32 _x
X値
Definition GxVector.h:793
f32 _w
W値
Definition GxVector.h:796
f32 _y
Y値
Definition GxVector.h:794
f32 _z
Z値
Definition GxVector.h:795
4次元ベクトル(倍精度)
Definition GxVectord.h:497
f64 _w
W値
Definition GxVectord.h:705
f64 _x
X値
Definition GxVectord.h:702
f64 _z
Z値
Definition GxVectord.h:704
f64 _y
Y値
Definition GxVectord.h:703
32bitブーリアン
Definition GxDefine.h:173