1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
|
diff -ur fox1.2-1.2.13.orig/include/FXCharset.h fox1.2-1.2.13/include/FXCharset.h
--- fox1.2-1.2.13.orig/include/FXCharset.h 2004-02-08 17:17:33.000000000 +0000
+++ fox1.2-1.2.13/include/FXCharset.h 2006-03-10 00:48:51.722421154 +0000
@@ -27,6 +27,15 @@
namespace FX {
/// A set of characters
+
+class FXCharset;
+
+/// Save set to a stream
+FXAPI FXStream& operator<<(FXStream& store,const FXCharset& cs);
+
+/// Load set from a stream
+FXAPI FXStream& operator>>(FXStream& store,FXCharset& cs);
+
class FXAPI FXCharset {
private:
FXuint s[8]; // Because 8*32 is 256 characters
diff -ur fox1.2-1.2.13.orig/include/FXMat3d.h fox1.2-1.2.13/include/FXMat3d.h
--- fox1.2-1.2.13.orig/include/FXMat3d.h 2004-02-08 17:17:33.000000000 +0000
+++ fox1.2-1.2.13/include/FXMat3d.h 2006-03-10 00:48:03.526775898 +0000
@@ -29,6 +29,42 @@
/// Double-precision 3x3 matrix
+
+class FXMat3d;
+
+/// Other operators
+FXAPI FXMat3d operator+(const FXMat3d& a,const FXMat3d& b);
+FXAPI FXMat3d operator-(const FXMat3d& a,const FXMat3d& b);
+FXAPI FXMat3d operator-(const FXMat3d& a);
+FXAPI FXMat3d operator*(const FXMat3d& a,const FXMat3d& b);
+FXAPI FXMat3d operator*(FXdouble x,const FXMat3d& a);
+FXAPI FXMat3d operator*(const FXMat3d& a,FXdouble x);
+FXAPI FXMat3d operator/(const FXMat3d& a,FXdouble x);
+FXAPI FXMat3d operator/(FXdouble x,const FXMat3d& a);
+
+/// Multiply matrix and vector
+FXAPI FXVec3d operator*(const FXVec3d& v,const FXMat3d& m);
+FXAPI FXVec3d operator*(const FXMat3d& a,const FXVec3d& v);
+
+/// Mutiply matrix and vector, for non-projective matrix
+FXAPI FXVec2d operator*(const FXVec2d& v,const FXMat3d& m);
+FXAPI FXVec2d operator*(const FXMat3d& a,const FXVec2d& v);
+
+/// Determinant
+FXAPI FXdouble det(const FXMat3d& m);
+
+/// Transpose
+FXAPI FXMat3d transpose(const FXMat3d& m);
+
+/// Invert
+FXAPI FXMat3d invert(const FXMat3d& m);
+
+/// Save to a stream
+FXAPI FXStream& operator<<(FXStream& store,const FXMat3d& m);
+
+/// Load from a stream
+FXAPI FXStream& operator>>(FXStream& store,FXMat3d& m);
+
class FXAPI FXMat3d {
protected:
FXVec3d m[3];
diff -ur fox1.2-1.2.13.orig/include/FXMat3f.h fox1.2-1.2.13/include/FXMat3f.h
--- fox1.2-1.2.13.orig/include/FXMat3f.h 2004-02-08 17:17:33.000000000 +0000
+++ fox1.2-1.2.13/include/FXMat3f.h 2006-03-10 01:04:38.131634188 +0000
@@ -29,6 +29,42 @@
/// Single-precision 3x3 matrix
+
+class FXMat3f;
+
+/// Other operators
+FXAPI FXMat3f operator+(const FXMat3f& a,const FXMat3f& b);
+FXAPI FXMat3f operator-(const FXMat3f& a,const FXMat3f& b);
+FXAPI FXMat3f operator-(const FXMat3f& a);
+FXAPI FXMat3f operator*(const FXMat3f& a,const FXMat3f& b);
+FXAPI FXMat3f operator*(FXfloat x,const FXMat3f& a);
+FXAPI FXMat3f operator*(const FXMat3f& a,FXfloat x);
+FXAPI FXMat3f operator/(const FXMat3f& a,FXfloat x);
+FXAPI FXMat3f operator/(FXfloat x,const FXMat3f& a);
+
+/// Multiply matrix and vector
+FXAPI FXVec3f operator*(const FXVec3f& v,const FXMat3f& m);
+FXAPI FXVec3f operator*(const FXMat3f& a,const FXVec3f& v);
+
+/// Mutiply matrix and vector, for non-projective matrix
+FXAPI FXVec2f operator*(const FXVec2f& v,const FXMat3f& m);
+FXAPI FXVec2f operator*(const FXMat3f& a,const FXVec2f& v);
+
+/// Determinant
+FXAPI FXfloat det(const FXMat3f& m);
+
+/// Transpose
+FXAPI FXMat3f transpose(const FXMat3f& m);
+
+/// Invert
+FXAPI FXMat3f invert(const FXMat3f& m);
+
+/// Save to a stream
+FXAPI FXStream& operator<<(FXStream& store,const FXMat3f& m);
+
+/// Load from a stream
+FXAPI FXStream& operator>>(FXStream& store,FXMat3f& m);
+
class FXAPI FXMat3f {
protected:
FXVec3f m[3];
diff -ur fox1.2-1.2.13.orig/include/FXMat4d.h fox1.2-1.2.13/include/FXMat4d.h
--- fox1.2-1.2.13.orig/include/FXMat4d.h 2004-02-08 17:17:33.000000000 +0000
+++ fox1.2-1.2.13/include/FXMat4d.h 2006-03-10 00:52:32.796271887 +0000
@@ -29,6 +29,42 @@
/// Double-precision 4x4 matrix
+
+class FXMat4d;
+
+/// Other operators
+FXAPI FXMat4d operator+(const FXMat4d& a,const FXMat4d& b);
+FXAPI FXMat4d operator-(const FXMat4d& a,const FXMat4d& b);
+FXAPI FXMat4d operator-(const FXMat4d& a);
+FXAPI FXMat4d operator*(const FXMat4d& a,const FXMat4d& b);
+FXAPI FXMat4d operator*(FXdouble x,const FXMat4d& a);
+FXAPI FXMat4d operator*(const FXMat4d& a,FXdouble x);
+FXAPI FXMat4d operator/(const FXMat4d& a,FXdouble x);
+FXAPI FXMat4d operator/(FXdouble x,const FXMat4d& a);
+
+/// Multiply matrix and vector
+FXAPI FXVec4d operator*(const FXVec4d& v,const FXMat4d& m);
+FXAPI FXVec4d operator*(const FXMat4d& a,const FXVec4d& v);
+
+/// Mutiply matrix and vector, for non-projective matrix
+FXAPI FXVec3d operator*(const FXVec3d& v,const FXMat4d& m);
+FXAPI FXVec3d operator*(const FXMat4d& a,const FXVec3d& v);
+
+/// Determinant
+FXAPI FXdouble det(const FXMat4d& m);
+
+/// Transpose
+FXAPI FXMat4d transpose(const FXMat4d& m);
+
+/// Invert
+FXAPI FXMat4d invert(const FXMat4d& m);
+
+/// Save to a stream
+FXAPI FXStream& operator<<(FXStream& store,const FXMat4d& m);
+
+/// Load from a stream
+FXAPI FXStream& operator>>(FXStream& store,FXMat4d& m);
+
class FXAPI FXMat4d {
protected:
FXVec4d m[4];
diff -ur fox1.2-1.2.13.orig/include/FXMat4f.h fox1.2-1.2.13/include/FXMat4f.h
--- fox1.2-1.2.13.orig/include/FXMat4f.h 2004-02-08 17:17:33.000000000 +0000
+++ fox1.2-1.2.13/include/FXMat4f.h 2006-03-10 00:56:14.302065666 +0000
@@ -29,6 +29,42 @@
/// Single-precision 4x4 matrix
+
+class FXMat4f;
+
+/// Other operators
+FXAPI FXMat4f operator+(const FXMat4f& a,const FXMat4f& b);
+FXAPI FXMat4f operator-(const FXMat4f& a,const FXMat4f& b);
+FXAPI FXMat4f operator-(const FXMat4f& a);
+FXAPI FXMat4f operator*(const FXMat4f& a,const FXMat4f& b);
+FXAPI FXMat4f operator*(FXfloat x,const FXMat4f& a);
+FXAPI FXMat4f operator*(const FXMat4f& a,FXfloat x);
+FXAPI FXMat4f operator/(const FXMat4f& a,FXfloat x);
+FXAPI FXMat4f operator/(FXfloat x,const FXMat4f& a);
+
+/// Multiply matrix and vector
+FXAPI FXVec4f operator*(const FXVec4f& v,const FXMat4f& m);
+FXAPI FXVec4f operator*(const FXMat4f& a,const FXVec4f& v);
+
+/// Mutiply matrix and vector, for non-projective matrix
+FXAPI FXVec3f operator*(const FXVec3f& v,const FXMat4f& m);
+FXAPI FXVec3f operator*(const FXMat4f& a,const FXVec3f& v);
+
+/// Determinant
+FXAPI FXfloat det(const FXMat4f& m);
+
+/// Transpose
+FXAPI FXMat4f transpose(const FXMat4f& m);
+
+/// Invert
+FXAPI FXMat4f invert(const FXMat4f& m);
+
+/// Save to a stream
+FXAPI FXStream& operator<<(FXStream& store,const FXMat4f& m);
+
+/// Load from a stream
+FXAPI FXStream& operator>>(FXStream& store,FXMat4f& m);
+
class FXAPI FXMat4f {
protected:
FXVec4f m[4];
diff -ur fox1.2-1.2.13.orig/include/FXPoint.h fox1.2-1.2.13/include/FXPoint.h
--- fox1.2-1.2.13.orig/include/FXPoint.h 2004-02-08 17:17:34.000000000 +0000
+++ fox1.2-1.2.13/include/FXPoint.h 2006-03-10 00:46:23.623948393 +0000
@@ -28,6 +28,15 @@
namespace FX {
/// Point
+
+class FXPoint;
+
+/// Save object to a stream
+FXAPI FXStream& operator<<(FXStream& store,const FXPoint& p);
+
+/// Load object from a stream
+FXAPI FXStream& operator>>(FXStream& store,FXPoint& p);
+
class FXAPI FXPoint {
public:
FXshort x;
diff -ur fox1.2-1.2.13.orig/include/FXQuatd.h fox1.2-1.2.13/include/FXQuatd.h
--- fox1.2-1.2.13.orig/include/FXQuatd.h 2004-02-27 18:30:06.000000000 +0000
+++ fox1.2-1.2.13/include/FXQuatd.h 2006-03-10 00:51:04.020977182 +0000
@@ -29,6 +29,36 @@
/// double-precision quaternion
+
+class FXQuatd;
+
+/// Exponentiate quaternion
+FXAPI FXQuatd exp(const FXQuatd& q);
+
+/// Take logarithm of quaternion
+FXAPI FXQuatd log(const FXQuatd& q);
+
+/// Invert quaternion
+FXAPI FXQuatd invert(const FXQuatd& q);
+
+/// Invert unit quaternion
+FXAPI FXQuatd unitinvert(const FXQuatd& q);
+
+/// Conjugate quaternion
+FXAPI FXQuatd conj(const FXQuatd& q);
+
+/// Multiply quaternions
+FXAPI FXQuatd operator*(const FXQuatd& p,const FXQuatd& q);
+
+// Rotation of a vector by a quaternion
+FXAPI FXVec3d operator*(const FXQuatd& quat,const FXVec3d& vec);
+
+/// Construct quaternion from arc a->b on unit sphere
+FXAPI FXQuatd arc(const FXVec3d& a,const FXVec3d& b);
+
+/// Spherical lerp
+FXAPI FXQuatd lerp(const FXQuatd& u,const FXQuatd& v,FXdouble f);
+
class FXAPI FXQuatd : public FXVec4d {
public:
diff -ur fox1.2-1.2.13.orig/include/FXQuatf.h fox1.2-1.2.13/include/FXQuatf.h
--- fox1.2-1.2.13.orig/include/FXQuatf.h 2004-02-27 18:30:06.000000000 +0000
+++ fox1.2-1.2.13/include/FXQuatf.h 2006-03-10 00:54:14.995796565 +0000
@@ -29,6 +29,36 @@
/// Single-precision quaternion
+
+class FXQuatf;
+
+/// Exponentiate quaternion
+FXAPI FXQuatf exp(const FXQuatf& q);
+
+/// Take logarithm of quaternion
+FXAPI FXQuatf log(const FXQuatf& q);
+
+/// Invert quaternion
+FXAPI FXQuatf invert(const FXQuatf& q);
+
+/// Invert unit quaternion
+FXAPI FXQuatf unitinvert(const FXQuatf& q);
+
+/// Conjugate quaternion
+FXAPI FXQuatf conj(const FXQuatf& q);
+
+/// Multiply quaternions
+FXAPI FXQuatf operator*(const FXQuatf& p,const FXQuatf& q);
+
+// Rotation of a vector by a quaternion
+FXAPI FXVec3f operator*(const FXQuatf& quat,const FXVec3f& vec);
+
+/// Construct quaternion from arc a->b on unit sphere
+FXAPI FXQuatf arc(const FXVec3f& a,const FXVec3f& b);
+
+/// Spherical lerp
+FXAPI FXQuatf lerp(const FXQuatf& u,const FXQuatf& v,FXfloat f);
+
class FXAPI FXQuatf : public FXVec4f {
public:
diff -ur fox1.2-1.2.13.orig/include/FXRanged.h fox1.2-1.2.13/include/FXRanged.h
--- fox1.2-1.2.13.orig/include/FXRanged.h 2004-02-29 17:54:17.000000000 +0000
+++ fox1.2-1.2.13/include/FXRanged.h 2006-03-10 00:49:50.525667765 +0000
@@ -32,6 +32,24 @@
/// Bounds
+
+class FXRanged;
+
+/// Test if bounds overlap
+FXAPI FXbool overlap(const FXRanged& a,const FXRanged& b);
+
+/// Union of two boxes
+FXAPI FXRanged unite(const FXRanged& a,const FXRanged& b);
+
+/// Intersection of two boxes
+FXAPI FXRanged intersect(const FXRanged& a,const FXRanged& b);
+
+/// Save object to a stream
+FXAPI FXStream& operator<<(FXStream& store,const FXRanged& bounds);
+
+/// Load object from a stream
+FXAPI FXStream& operator>>(FXStream& store,FXRanged& bounds);
+
class FXAPI FXRanged {
public:
FXVec3d lower;
diff -ur fox1.2-1.2.13.orig/include/FXRangef.h fox1.2-1.2.13/include/FXRangef.h
--- fox1.2-1.2.13.orig/include/FXRangef.h 2004-02-29 17:54:17.000000000 +0000
+++ fox1.2-1.2.13/include/FXRangef.h 2006-03-10 00:53:08.458569703 +0000
@@ -32,6 +32,24 @@
/// Bounds
+
+class FXRangef;
+
+/// Test if boxes a and b overlap
+FXAPI FXbool overlap(const FXRangef& a,const FXRangef& b);
+
+/// Union of two boxes
+FXAPI FXRangef unite(const FXRangef& a,const FXRangef& b);
+
+/// Intersection of two boxes
+FXAPI FXRangef intersect(const FXRangef& a,const FXRangef& b);
+
+/// Save object to a stream
+FXAPI FXStream& operator<<(FXStream& store,const FXRangef& bounds);
+
+/// Load object from a stream
+FXAPI FXStream& operator>>(FXStream& store,FXRangef& bounds);
+
class FXAPI FXRangef {
public:
FXVec3f lower;
diff -ur fox1.2-1.2.13.orig/include/FXRectangle.h fox1.2-1.2.13/include/FXRectangle.h
--- fox1.2-1.2.13.orig/include/FXRectangle.h 2004-02-11 20:33:36.000000000 +0000
+++ fox1.2-1.2.13/include/FXRectangle.h 2006-03-10 00:59:02.699861899 +0000
@@ -28,6 +28,18 @@
namespace FX {
/// Rectangle
+
+class FXRectangle;
+
+/// Rectangles overlap
+FXAPI FXbool overlap(const FXRectangle& a,const FXRectangle& b);
+
+/// Save object to a stream
+FXAPI FXStream& operator<<(FXStream& store,const FXRectangle& r);
+
+/// Load object from a stream
+FXAPI FXStream& operator>>(FXStream& store,FXRectangle& r);
+
class FXAPI FXRectangle {
public:
FXshort x;
diff -ur fox1.2-1.2.13.orig/include/FXRegion.h fox1.2-1.2.13/include/FXRegion.h
--- fox1.2-1.2.13.orig/include/FXRegion.h 2004-02-11 20:33:36.000000000 +0000
+++ fox1.2-1.2.13/include/FXRegion.h 2006-03-10 01:00:28.133597198 +0000
@@ -27,6 +27,27 @@
namespace FX {
/// Region
+
+class FXRegion;
+
+/// Union of region r1 and region r2
+FXAPI FXRegion operator+(const FXRegion& r1,const FXRegion& r2);
+
+/// Intersection of region r1 and region r2
+FXAPI FXRegion operator*(const FXRegion& r1,const FXRegion& r2);
+
+/// Substract region r2 from region r1
+FXAPI FXRegion operator-(const FXRegion& r1,const FXRegion& r2);
+
+/// Xor of region r1 and region r2
+FXAPI FXRegion operator^(const FXRegion& r1,const FXRegion& r2);
+
+/// Return TRUE if region equal to this one
+FXAPI FXbool operator==(const FXRegion& r1,const FXRegion& r2);
+
+/// Return TRUE if region not equal to this one
+FXAPI FXbool operator!=(const FXRegion& r1,const FXRegion& r2);
+
class FXAPI FXRegion {
friend class FXDC;
friend class FXDCWindow;
diff -ur fox1.2-1.2.13.orig/include/FXRex.h fox1.2-1.2.13/include/FXRex.h
--- fox1.2-1.2.13.orig/include/FXRex.h 2004-02-08 17:17:34.000000000 +0000
+++ fox1.2-1.2.13/include/FXRex.h 2006-03-10 00:53:42.405093749 +0000
@@ -96,6 +96,17 @@
* or line end. The flag REX_NOT_EMPTY causes a match to fail if
* the empty string was matched.
*/
+
+class FXRex;
+
+/// Comparison operators
+FXAPI FXbool operator==(const FXRex &r1,const FXRex &r2);
+FXAPI FXbool operator!=(const FXRex &r1,const FXRex &r2);
+
+/// Saving and loading
+FXAPI FXStream& operator<<(FXStream& store,const FXRex& s);
+FXAPI FXStream& operator>>(FXStream& store,FXRex& s);
+
class FXAPI FXRex {
private:
FXint *code;
diff -ur fox1.2-1.2.13.orig/include/FXSize.h fox1.2-1.2.13/include/FXSize.h
--- fox1.2-1.2.13.orig/include/FXSize.h 2004-02-08 17:17:34.000000000 +0000
+++ fox1.2-1.2.13/include/FXSize.h 2006-03-10 00:42:11.995126427 +0000
@@ -28,6 +28,14 @@
namespace FX {
/// Size
+class FXSize;
+
+/// Save object to a stream
+FXAPI FXStream& operator<<(FXStream& store,const FXSize& s);
+
+/// Load object from a stream
+FXAPI FXStream& operator>>(FXStream& store,FXSize& s);
+
class FXAPI FXSize {
public:
FXshort w;
diff -ur fox1.2-1.2.13.orig/include/FXSphered.h fox1.2-1.2.13/include/FXSphered.h
--- fox1.2-1.2.13.orig/include/FXSphered.h 2004-03-21 19:07:57.000000000 +0000
+++ fox1.2-1.2.13/include/FXSphered.h 2006-03-10 00:50:26.049983775 +0000
@@ -32,6 +32,24 @@
// Spherical bounds
+
+class FXSphered;
+
+/// Test if box overlaps with sphere
+FXAPI FXbool overlap(const FXRanged& a,const FXSphered& b);
+
+/// Test if sphere overlaps with box
+FXAPI FXbool overlap(const FXSphered& a,const FXRanged& b);
+
+/// Test if spheres overlap
+FXAPI FXbool overlap(const FXSphered& a,const FXSphered& b);
+
+/// Save object to a stream
+FXAPI FXStream& operator<<(FXStream& store,const FXSphered& sphere);
+
+/// Load object from a stream
+FXAPI FXStream& operator>>(FXStream& store,FXSphered& sphere);
+
class FXAPI FXSphered {
public:
FXVec3d center;
diff -ur fox1.2-1.2.13.orig/include/FXSpheref.h fox1.2-1.2.13/include/FXSpheref.h
--- fox1.2-1.2.13.orig/include/FXSpheref.h 2004-03-21 19:07:57.000000000 +0000
+++ fox1.2-1.2.13/include/FXSpheref.h 2006-03-10 00:51:38.656410394 +0000
@@ -32,6 +32,24 @@
// Spherical bounds
+
+class FXSpheref;
+
+/// Test if box overlaps with sphere
+FXAPI FXbool overlap(const FXRangef& a,const FXSpheref& b);
+
+/// Test if sphere overlaps with box
+FXAPI FXbool overlap(const FXSpheref& a,const FXRangef& b);
+
+/// Test if spheres overlap
+FXAPI FXbool overlap(const FXSpheref& a,const FXSpheref& b);
+
+/// Save object to a stream
+FXAPI FXStream& operator<<(FXStream& store,const FXSpheref& sphere);
+
+/// Load object from a stream
+FXAPI FXStream& operator>>(FXStream& store,FXSpheref& sphere);
+
class FXAPI FXSpheref {
public:
FXVec3f center;
diff -ur fox1.2-1.2.13.orig/include/FXString.h fox1.2-1.2.13/include/FXString.h
--- fox1.2-1.2.13.orig/include/FXString.h 2004-08-28 02:10:02.000000000 +0100
+++ fox1.2-1.2.13/include/FXString.h 2006-03-10 00:41:13.793800451 +0000
@@ -30,6 +30,108 @@
/**
* FXString provides essential string manipulation capabilities.
*/
+class FXString;
+
+/// Compare
+FXAPI FXint compare(const FXchar* s1,const FXchar* s2);
+FXAPI FXint compare(const FXchar* s1,const FXString& s2);
+FXAPI FXint compare(const FXString& s1,const FXchar* s2);
+FXAPI FXint compare(const FXString& s1,const FXString& s2);
+
+/// Compare up to n
+FXAPI FXint compare(const FXchar* s1,const FXchar* s2,FXint n);
+FXAPI FXint compare(const FXchar* s1,const FXString& s2,FXint n);
+FXAPI FXint compare(const FXString& s1,const FXchar* s2,FXint n);
+FXAPI FXint compare(const FXString& s1,const FXString& s2,FXint n);
+
+/// Compare case insensitive
+FXAPI FXint comparecase(const FXchar* s1,const FXchar* s2);
+FXAPI FXint comparecase(const FXchar* s1,const FXString& s2);
+FXAPI FXint comparecase(const FXString& s1,const FXchar* s2);
+FXAPI FXint comparecase(const FXString& s1,const FXString& s2);
+
+/// Compare case insensitive up to n
+FXAPI FXint comparecase(const FXchar* s1,const FXchar* s2,FXint n);
+FXAPI FXint comparecase(const FXchar* s1,const FXString& s2,FXint n);
+FXAPI FXint comparecase(const FXString& s1,const FXchar* s2,FXint n);
+FXAPI FXint comparecase(const FXString& s1,const FXString& s2,FXint n);
+
+/// Comparison operators
+FXAPI FXbool operator==(const FXString& s1,const FXString& s2);
+FXAPI FXbool operator==(const FXString& s1,const FXchar* s2);
+FXAPI FXbool operator==(const FXchar* s1,const FXString& s2);
+
+FXAPI FXbool operator!=(const FXString& s1,const FXString& s2);
+FXAPI FXbool operator!=(const FXString& s1,const FXchar* s2);
+FXAPI FXbool operator!=(const FXchar* s1,const FXString& s2);
+
+FXAPI FXbool operator<(const FXString& s1,const FXString& s2);
+FXAPI FXbool operator<(const FXString& s1,const FXchar* s2);
+FXAPI FXbool operator<(const FXchar* s1,const FXString& s2);
+
+FXAPI FXbool operator<=(const FXString& s1,const FXString& s2);
+FXAPI FXbool operator<=(const FXString& s1,const FXchar* s2);
+FXAPI FXbool operator<=(const FXchar* s1,const FXString& s2);
+
+FXAPI FXbool operator>(const FXString& s1,const FXString& s2);
+FXAPI FXbool operator>(const FXString& s1,const FXchar* s2);
+FXAPI FXbool operator>(const FXchar* s1,const FXString& s2);
+
+FXAPI FXbool operator>=(const FXString& s1,const FXString& s2);
+FXAPI FXbool operator>=(const FXString& s1,const FXchar* s2);
+FXAPI FXbool operator>=(const FXchar* s1,const FXString& s2);
+
+/// Concatenate two strings
+FXAPI FXString operator+(const FXString& s1,const FXString& s2);
+FXAPI FXString operator+(const FXString& s1,const FXchar* s2);
+FXAPI FXString operator+(const FXchar* s1,const FXString& s2);
+
+/// Concatenate with single character
+FXAPI FXString operator+(const FXString& s,FXchar c);
+FXAPI FXString operator+(FXchar c,const FXString& s);
+
+/// Saving to a stream
+FXAPI FXStream& operator<<(FXStream& store,const FXString& s);
+
+/// Load from a stream
+FXAPI FXStream& operator>>(FXStream& store,FXString& s);
+
+/// Format a string a-la printf
+FXAPI FXString FXStringFormat(const FXchar* fmt,...) FX_PRINTF(1,2) ;
+FXAPI FXString FXStringVFormat(const FXchar* fmt,va_list args);
+
+/**
+* Convert integer number to a string, using the given number
+* base, which must be between 2 and 16.
+*/
+FXAPI FXString FXStringVal(FXint num,FXint base=10);
+FXAPI FXString FXStringVal(FXuint num,FXint base=10);
+
+/**
+* Convert real number to a string, using the given procision and
+* exponential notation mode, which may be FALSE (never), TRUE (always), or
+* MAYBE (when needed).
+*/
+FXAPI FXString FXStringVal(FXfloat num,FXint prec=6,FXbool exp=MAYBE);
+FXAPI FXString FXStringVal(FXdouble num,FXint prec=6,FXbool exp=MAYBE);
+
+/// Convert string to a integer number, assuming given number base
+FXAPI FXint FXIntVal(const FXString& s,FXint base);
+FXAPI FXuint FXUIntVal(const FXString& s,FXint base);
+
+/// Convert string into real number
+FXAPI FXfloat FXFloatVal(const FXString& s);
+FXAPI FXdouble FXDoubleVal(const FXString& s);
+
+/// Escape special characters in a string
+FXAPI FXString escape(const FXString& s);
+
+/// Unescape special characters in a string
+FXAPI FXString unescape(const FXString& s);
+
+/// Swap two strings
+FXAPI void swap(FXString& a,FXString& b);
+
class FXAPI FXString {
private:
FXchar* str;
@@ -359,25 +461,21 @@
FXuint hash() const;
/// Compare
- friend FXAPI FXint compare(const FXchar* s1,const FXchar* s2);
friend FXAPI FXint compare(const FXchar* s1,const FXString& s2);
friend FXAPI FXint compare(const FXString& s1,const FXchar* s2);
friend FXAPI FXint compare(const FXString& s1,const FXString& s2);
/// Compare up to n
- friend FXAPI FXint compare(const FXchar* s1,const FXchar* s2,FXint n);
friend FXAPI FXint compare(const FXchar* s1,const FXString& s2,FXint n);
friend FXAPI FXint compare(const FXString& s1,const FXchar* s2,FXint n);
friend FXAPI FXint compare(const FXString& s1,const FXString& s2,FXint n);
/// Compare case insensitive
- friend FXAPI FXint comparecase(const FXchar* s1,const FXchar* s2);
friend FXAPI FXint comparecase(const FXchar* s1,const FXString& s2);
friend FXAPI FXint comparecase(const FXString& s1,const FXchar* s2);
friend FXAPI FXint comparecase(const FXString& s1,const FXString& s2);
/// Compare case insensitive up to n
- friend FXAPI FXint comparecase(const FXchar* s1,const FXchar* s2,FXint n);
friend FXAPI FXint comparecase(const FXchar* s1,const FXString& s2,FXint n);
friend FXAPI FXint comparecase(const FXString& s1,const FXchar* s2,FXint n);
friend FXAPI FXint comparecase(const FXString& s1,const FXString& s2,FXint n);
@@ -431,21 +529,6 @@
friend FXAPI FXString FXStringFormat(const FXchar* fmt,...) FX_PRINTF(1,2) ;
friend FXAPI FXString FXStringVFormat(const FXchar* fmt,va_list args);
- /**
- * Convert integer number to a string, using the given number
- * base, which must be between 2 and 16.
- */
- friend FXAPI FXString FXStringVal(FXint num,FXint base=10);
- friend FXAPI FXString FXStringVal(FXuint num,FXint base=10);
-
- /**
- * Convert real number to a string, using the given procision and
- * exponential notation mode, which may be FALSE (never), TRUE (always), or
- * MAYBE (when needed).
- */
- friend FXAPI FXString FXStringVal(FXfloat num,FXint prec=6,FXbool exp=MAYBE);
- friend FXAPI FXString FXStringVal(FXdouble num,FXint prec=6,FXbool exp=MAYBE);
-
/// Convert string to a integer number, assuming given number base
friend FXAPI FXint FXIntVal(const FXString& s,FXint base=10);
friend FXAPI FXuint FXUIntVal(const FXString& s,FXint base=10);
@@ -454,12 +537,6 @@
friend FXAPI FXfloat FXFloatVal(const FXString& s);
friend FXAPI FXdouble FXDoubleVal(const FXString& s);
- /// Escape special characters in a string
- friend FXAPI FXString escape(const FXString& s);
-
- /// Unescape special characters in a string
- friend FXAPI FXString unescape(const FXString& s);
-
/// Swap two strings
friend FXAPI void swap(FXString& a,FXString& b){ FXchar *t=a.str; a.str=b.str; b.str=t; }
diff -ur fox1.2-1.2.13.orig/include/FXVec2d.h fox1.2-1.2.13/include/FXVec2d.h
--- fox1.2-1.2.13.orig/include/FXVec2d.h 2004-02-13 22:48:37.000000000 +0000
+++ fox1.2-1.2.13/include/FXVec2d.h 2006-03-10 00:55:10.350497877 +0000
@@ -29,6 +29,26 @@
/// Double-precision 2-element vector
+
+class FXVec2d;
+
+/// Length and square of length
+FXAPI FXdouble len2(const FXVec2d& a);
+FXAPI FXdouble len(const FXVec2d& a);
+
+/// Normalize vector
+FXAPI FXVec2d normalize(const FXVec2d& a);
+
+/// Lowest or highest components
+FXAPI FXVec2d lo(const FXVec2d& a,const FXVec2d& b);
+FXAPI FXVec2d hi(const FXVec2d& a,const FXVec2d& b);
+
+/// Save vector to a stream
+FXAPI FXStream& operator<<(FXStream& store,const FXVec2d& v);
+
+/// Load vector from a stream
+FXAPI FXStream& operator>>(FXStream& store,FXVec2d& v);
+
class FXAPI FXVec2d {
public:
FXdouble x;
diff -ur fox1.2-1.2.13.orig/include/FXVec2f.h fox1.2-1.2.13/include/FXVec2f.h
--- fox1.2-1.2.13.orig/include/FXVec2f.h 2004-02-13 22:48:37.000000000 +0000
+++ fox1.2-1.2.13/include/FXVec2f.h 2006-03-10 00:58:11.589600944 +0000
@@ -29,6 +29,26 @@
/// Single-precision 2-element vector
+
+class FXVec2f;
+
+/// Length and square of length
+FXAPI FXfloat len2(const FXVec2f& a);
+FXAPI FXfloat len(const FXVec2f& a);
+
+/// Normalize vector
+FXAPI FXVec2f normalize(const FXVec2f& a);
+
+/// Lowest or highest components
+FXAPI FXVec2f lo(const FXVec2f& a,const FXVec2f& b);
+FXAPI FXVec2f hi(const FXVec2f& a,const FXVec2f& b);
+
+/// Save vector to a stream
+FXAPI FXStream& operator<<(FXStream& store,const FXVec2f& v);
+
+/// Load vector from a stream
+FXAPI FXStream& operator>>(FXStream& store,FXVec2f& v);
+
class FXAPI FXVec2f {
public:
FXfloat x;
diff -ur fox1.2-1.2.13.orig/include/FXVec3d.h fox1.2-1.2.13/include/FXVec3d.h
--- fox1.2-1.2.13.orig/include/FXVec3d.h 2004-02-13 22:48:37.000000000 +0000
+++ fox1.2-1.2.13/include/FXVec3d.h 2006-03-10 00:57:09.046847398 +0000
@@ -29,6 +29,26 @@
/// Double-precision 3-element vector
+
+class FXVec3d;
+
+/// Length and square of length
+FXAPI FXdouble len2(const FXVec3d& a);
+FXAPI FXdouble len(const FXVec3d& a);
+
+/// Normalize vector
+FXAPI FXVec3d normalize(const FXVec3d& a);
+
+/// Lowest or highest components
+FXAPI FXVec3d lo(const FXVec3d& a,const FXVec3d& b);
+FXAPI FXVec3d hi(const FXVec3d& a,const FXVec3d& b);
+
+/// Save vector to a stream
+FXAPI FXStream& operator<<(FXStream& store,const FXVec3d& v);
+
+/// Load vector from a stream
+FXAPI FXStream& operator>>(FXStream& store,FXVec3d& v);
+
class FXAPI FXVec3d {
public:
FXdouble x;
diff -ur fox1.2-1.2.13.orig/include/FXVec3f.h fox1.2-1.2.13/include/FXVec3f.h
--- fox1.2-1.2.13.orig/include/FXVec3f.h 2004-05-13 23:36:05.000000000 +0100
+++ fox1.2-1.2.13/include/FXVec3f.h 2006-03-10 00:44:21.585039599 +0000
@@ -29,6 +29,26 @@
/// Single-precision 3-element vector
+
+class FXVec3f;
+
+/// Length and square of length
+FXAPI FXfloat len2(const FXVec3f& a);
+FXAPI FXfloat len(const FXVec3f& a);
+
+/// Normalize vector
+FXAPI FXVec3f normalize(const FXVec3f& a);
+
+/// Lowest or highest components
+FXAPI FXVec3f lo(const FXVec3f& a,const FXVec3f& b);
+FXAPI FXVec3f hi(const FXVec3f& a,const FXVec3f& b);
+
+/// Save vector to a stream
+FXAPI FXStream& operator<<(FXStream& store,const FXVec3f& v);
+
+/// Load vector from a stream
+FXAPI FXStream& operator>>(FXStream& store,FXVec3f& v);
+
class FXAPI FXVec3f {
public:
FXfloat x;
diff -ur fox1.2-1.2.13.orig/include/FXVec4d.h fox1.2-1.2.13/include/FXVec4d.h
--- fox1.2-1.2.13.orig/include/FXVec4d.h 2004-06-04 05:32:23.000000000 +0100
+++ fox1.2-1.2.13/include/FXVec4d.h 2006-03-10 00:45:40.856587401 +0000
@@ -29,6 +29,26 @@
/// Double-precision 4-element vector
+
+class FXVec4d;
+
+/// Length and square of length
+FXAPI FXdouble len2(const FXVec4d& a);
+FXAPI FXdouble len(const FXVec4d& a);
+
+/// Normalize vector
+FXAPI FXVec4d normalize(const FXVec4d& a);
+
+/// Lowest or highest components
+FXAPI FXVec4d lo(const FXVec4d& a,const FXVec4d& b);
+FXAPI FXVec4d hi(const FXVec4d& a,const FXVec4d& b);
+
+/// Save to a stream
+FXAPI FXStream& operator<<(FXStream& store,const FXVec4d& v);
+
+/// Load from a stream
+FXAPI FXStream& operator>>(FXStream& store,FXVec4d& v);
+
class FXAPI FXVec4d {
public:
FXdouble x;
diff -ur fox1.2-1.2.13.orig/include/FXVec4f.h fox1.2-1.2.13/include/FXVec4f.h
--- fox1.2-1.2.13.orig/include/FXVec4f.h 2004-06-04 05:32:23.000000000 +0100
+++ fox1.2-1.2.13/include/FXVec4f.h 2006-03-10 01:02:29.506593795 +0000
@@ -29,6 +29,26 @@
/// Single-precision 4-element vector
+
+class FXVec4f;
+
+/// Length and square of length
+FXAPI FXfloat len2(const FXVec4f& a);
+FXAPI FXfloat len(const FXVec4f& a);
+
+/// Normalize vector
+FXAPI FXVec4f normalize(const FXVec4f& a);
+
+/// Lowest or highest components
+FXAPI FXVec4f lo(const FXVec4f& a,const FXVec4f& b);
+FXAPI FXVec4f hi(const FXVec4f& a,const FXVec4f& b);
+
+/// Save to a stream
+FXAPI FXStream& operator<<(FXStream& store,const FXVec4f& v);
+
+/// Load from a stream
+FXAPI FXStream& operator>>(FXStream& store,FXVec4f& v);
+
class FXAPI FXVec4f {
public:
FXfloat x;
diff -ur fox1.2-1.2.13.orig/include/FXWString.h fox1.2-1.2.13/include/FXWString.h
--- fox1.2-1.2.13.orig/include/FXWString.h 2004-02-08 17:17:34.000000000 +0000
+++ fox1.2-1.2.13/include/FXWString.h 2006-03-10 00:41:09.187407818 +0000
@@ -34,6 +34,75 @@
/**
* FXWString provides a "wide" string class suitable for storing Unicode strings.
*/
+class FXWString;
+
+/// Compare
+FXAPI FXint compare(const FXwchar *s1,const FXwchar *s2);
+FXAPI FXint compare(const FXwchar *s1,const FXWString &s2);
+FXAPI FXint compare(const FXWString &s1,const FXwchar *s2);
+FXAPI FXint compare(const FXWString &s1,const FXWString &s2);
+
+/// Compare up to n
+FXAPI FXint compare(const FXwchar *s1,const FXwchar *s2,FXint n);
+FXAPI FXint compare(const FXwchar *s1,const FXWString &s2,FXint n);
+FXAPI FXint compare(const FXWString &s1,const FXwchar *s2,FXint n);
+FXAPI FXint compare(const FXWString &s1,const FXWString &s2,FXint n);
+
+/// Compare case insensitive
+FXAPI FXint comparecase(const FXwchar *s1,const FXwchar *s2);
+FXAPI FXint comparecase(const FXwchar *s1,const FXWString &s2);
+FXAPI FXint comparecase(const FXWString &s1,const FXwchar *s2);
+FXAPI FXint comparecase(const FXWString &s1,const FXWString &s2);
+
+/// Compare case insensitive up to n
+FXAPI FXint comparecase(const FXwchar *s1,const FXwchar *s2,FXint n);
+FXAPI FXint comparecase(const FXwchar *s1,const FXWString &s2,FXint n);
+FXAPI FXint comparecase(const FXWString &s1,const FXwchar *s2,FXint n);
+FXAPI FXint comparecase(const FXWString &s1,const FXWString &s2,FXint n);
+
+/// Comparison operators
+FXAPI FXbool operator==(const FXWString &s1,const FXWString &s2);
+FXAPI FXbool operator==(const FXWString &s1,const FXwchar *s2);
+FXAPI FXbool operator==(const FXwchar *s1,const FXWString &s2);
+
+FXAPI FXbool operator!=(const FXWString &s1,const FXWString &s2);
+FXAPI FXbool operator!=(const FXWString &s1,const FXwchar *s2);
+FXAPI FXbool operator!=(const FXwchar *s1,const FXWString &s2);
+
+FXAPI FXbool operator<(const FXWString &s1,const FXWString &s2);
+FXAPI FXbool operator<(const FXWString &s1,const FXwchar *s2);
+FXAPI FXbool operator<(const FXwchar *s1,const FXWString &s2);
+
+FXAPI FXbool operator<=(const FXWString &s1,const FXWString &s2);
+FXAPI FXbool operator<=(const FXWString &s1,const FXwchar *s2);
+FXAPI FXbool operator<=(const FXwchar *s1,const FXWString &s2);
+
+FXAPI FXbool operator>(const FXWString &s1,const FXWString &s2);
+FXAPI FXbool operator>(const FXWString &s1,const FXwchar *s2);
+FXAPI FXbool operator>(const FXwchar *s1,const FXWString &s2);
+
+FXAPI FXbool operator>=(const FXWString &s1,const FXWString &s2);
+FXAPI FXbool operator>=(const FXWString &s1,const FXwchar *s2);
+FXAPI FXbool operator>=(const FXwchar *s1,const FXWString &s2);
+
+/// Concatenate two strings
+FXAPI FXWString operator+(const FXWString& s1,const FXWString& s2);
+FXAPI FXWString operator+(const FXWString& s1,const FXwchar* s2);
+FXAPI FXWString operator+(const FXwchar* s1,const FXWString& s2);
+
+/// Concatenate with single character
+FXAPI FXWString operator+(const FXWString& s,FXwchar c);
+FXAPI FXWString operator+(FXwchar c,const FXWString& s);
+
+/// Saving to a stream
+FXAPI FXStream& operator<<(FXStream& store,const FXWString& s);
+
+/// Load from a stream
+FXAPI FXStream& operator>>(FXStream& store,FXWString& s);
+
+/// Swap two strings
+FXAPI void swap(FXWString& a,FXWString& b);
+
class FXAPI FXWString {
private:
FXwchar* str;
@@ -363,25 +432,21 @@
FXuint hash() const;
/// Compare
- friend FXAPI FXint compare(const FXwchar *s1,const FXwchar *s2);
friend FXAPI FXint compare(const FXwchar *s1,const FXWString &s2);
friend FXAPI FXint compare(const FXWString &s1,const FXwchar *s2);
friend FXAPI FXint compare(const FXWString &s1,const FXWString &s2);
/// Compare up to n
- friend FXAPI FXint compare(const FXwchar *s1,const FXwchar *s2,FXint n);
friend FXAPI FXint compare(const FXwchar *s1,const FXWString &s2,FXint n);
friend FXAPI FXint compare(const FXWString &s1,const FXwchar *s2,FXint n);
friend FXAPI FXint compare(const FXWString &s1,const FXWString &s2,FXint n);
/// Compare case insensitive
- friend FXAPI FXint comparecase(const FXwchar *s1,const FXwchar *s2);
friend FXAPI FXint comparecase(const FXwchar *s1,const FXWString &s2);
friend FXAPI FXint comparecase(const FXWString &s1,const FXwchar *s2);
friend FXAPI FXint comparecase(const FXWString &s1,const FXWString &s2);
/// Compare case insensitive up to n
- friend FXAPI FXint comparecase(const FXwchar *s1,const FXwchar *s2,FXint n);
friend FXAPI FXint comparecase(const FXwchar *s1,const FXWString &s2,FXint n);
friend FXAPI FXint comparecase(const FXWString &s1,const FXwchar *s2,FXint n);
friend FXAPI FXint comparecase(const FXWString &s1,const FXWString &s2,FXint n);
|