-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathJoltJS.idl
3938 lines (3370 loc) · 137 KB
/
JoltJS.idl
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
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// SPDX-FileCopyrightText: 2022 Jorrit Rouwe
// SPDX-License-Identifier: MIT
interface JPHString {
void JPHString(DOMString str, long length);
[Const] DOMString c_str(); // TODO: This is not a nice way to get a string from an interface
unsigned long size();
};
interface ArrayVec3 {
boolean empty();
long size();
[Ref] Vec3 at(long inIndex);
void push_back([Const, Ref] Vec3 inValue);
void reserve(unsigned long inSize);
void resize(unsigned long inSize);
void clear();
Vec3MemRef data();
};
interface ArrayQuat {
boolean empty();
long size();
[Ref] Quat at(long inIndex);
void push_back([Const, Ref] Quat inValue);
void reserve(unsigned long inSize);
void resize(unsigned long inSize);
void clear();
QuatMemRef data();
};
interface ArrayMat44 {
boolean empty();
long size();
[Ref] Mat44 at(long inIndex);
void push_back([Const, Ref] Mat44 inValue);
void reserve(unsigned long inSize);
void resize(unsigned long inSize);
void clear();
Mat44MemRef data();
};
interface ArrayBodyID {
boolean empty();
long size();
[Ref] BodyID at(long inIndex);
void push_back([Const, Ref] BodyID inValue);
void reserve(unsigned long inSize);
void resize(unsigned long inSize);
void clear();
BodyIDMemRef data();
};
interface ArrayBodyPtr {
boolean empty();
long size();
Body at(long inIndex);
void push_back(Body inValue);
void reserve(unsigned long inSize);
void resize(unsigned long inSize);
void clear();
BodyPtrMemRef data();
};
enum EBodyType {
"EBodyType_RigidBody",
"EBodyType_SoftBody"
};
enum EMotionType {
"EMotionType_Static",
"EMotionType_Kinematic",
"EMotionType_Dynamic"
};
enum EMotionQuality {
"EMotionQuality_Discrete",
"EMotionQuality_LinearCast"
};
enum EActivation {
"EActivation_Activate",
"EActivation_DontActivate"
};
enum EShapeType {
"EShapeType_Convex",
"EShapeType_Compound",
"EShapeType_Decorated",
"EShapeType_Mesh",
"EShapeType_HeightField",
"EShapeType_Plane",
"EShapeType_Empty"
};
enum EShapeSubType {
"EShapeSubType_Sphere",
"EShapeSubType_Box",
"EShapeSubType_Capsule",
"EShapeSubType_TaperedCapsule",
"EShapeSubType_Cylinder",
"EShapeSubType_TaperedCylinder",
"EShapeSubType_ConvexHull",
"EShapeSubType_StaticCompound",
"EShapeSubType_MutableCompound",
"EShapeSubType_RotatedTranslated",
"EShapeSubType_Scaled",
"EShapeSubType_OffsetCenterOfMass",
"EShapeSubType_Mesh",
"EShapeSubType_HeightField",
"EShapeSubType_Plane",
"EShapeSubType_Empty"
};
enum EConstraintSpace {
"EConstraintSpace_LocalToBodyCOM",
"EConstraintSpace_WorldSpace"
};
enum ESpringMode {
"ESpringMode_FrequencyAndDamping",
"ESpringMode_StiffnessAndDamping",
};
enum EOverrideMassProperties {
"EOverrideMassProperties_CalculateMassAndInertia",
"EOverrideMassProperties_CalculateInertia",
"EOverrideMassProperties_MassAndInertiaProvided"
};
enum EAllowedDOFs {
"EAllowedDOFs_TranslationX",
"EAllowedDOFs_TranslationY",
"EAllowedDOFs_TranslationZ",
"EAllowedDOFs_RotationX",
"EAllowedDOFs_RotationY",
"EAllowedDOFs_RotationZ",
"EAllowedDOFs_Plane2D",
"EAllowedDOFs_All"
};
enum EStateRecorderState {
"EStateRecorderState_None",
"EStateRecorderState_Global",
"EStateRecorderState_Bodies",
"EStateRecorderState_Contacts",
"EStateRecorderState_Constraints",
"EStateRecorderState_All"
};
enum EBackFaceMode {
"EBackFaceMode_IgnoreBackFaces",
"EBackFaceMode_CollideWithBackFaces"
};
enum EGroundState {
"EGroundState_OnGround",
"EGroundState_OnSteepGround",
"EGroundState_NotSupported",
"EGroundState_InAir"
};
enum ValidateResult {
"ValidateResult_AcceptAllContactsForThisBodyPair",
"ValidateResult_AcceptContact",
"ValidateResult_RejectContact",
"ValidateResult_RejectAllContactsForThisBodyPair"
};
enum SoftBodyValidateResult {
"SoftBodyValidateResult_AcceptContact",
"SoftBodyValidateResult_RejectContact",
};
enum EActiveEdgeMode {
"EActiveEdgeMode_CollideOnlyWithActive",
"EActiveEdgeMode_CollideWithAll"
};
enum ECollectFacesMode {
"ECollectFacesMode_CollectFaces",
"ECollectFacesMode_NoFaces"
};
enum SixDOFConstraintSettings_EAxis {
"SixDOFConstraintSettings_EAxis_TranslationX",
"SixDOFConstraintSettings_EAxis_TranslationY",
"SixDOFConstraintSettings_EAxis_TranslationZ",
"SixDOFConstraintSettings_EAxis_RotationX",
"SixDOFConstraintSettings_EAxis_RotationY",
"SixDOFConstraintSettings_EAxis_RotationZ"
};
enum EConstraintType {
"EConstraintType_Constraint",
"EConstraintType_TwoBodyConstraint",
};
enum EConstraintSubType {
"EConstraintSubType_Fixed",
"EConstraintSubType_Point",
"EConstraintSubType_Hinge",
"EConstraintSubType_Slider",
"EConstraintSubType_Distance",
"EConstraintSubType_Cone",
"EConstraintSubType_SwingTwist",
"EConstraintSubType_SixDOF",
"EConstraintSubType_Path",
"EConstraintSubType_Vehicle",
"EConstraintSubType_RackAndPinion",
"EConstraintSubType_Gear",
"EConstraintSubType_Pulley",
};
enum EMotorState {
"EMotorState_Off",
"EMotorState_Velocity",
"EMotorState_Position"
};
enum ETransmissionMode {
"ETransmissionMode_Auto",
"ETransmissionMode_Manual",
};
enum ETireFrictionDirection {
"ETireFrictionDirection_Longitudinal",
"ETireFrictionDirection_Lateral",
};
enum ESwingType {
"ESwingType_Cone",
"ESwingType_Pyramid",
};
enum EPathRotationConstraintType {
"EPathRotationConstraintType_Free",
"EPathRotationConstraintType_ConstrainAroundTangent",
"EPathRotationConstraintType_ConstrainAroundNormal",
"EPathRotationConstraintType_ConstrainAroundBinormal",
"EPathRotationConstraintType_ConstrainToPath",
"EPathRotationConstraintType_FullyConstrained"
};
enum SoftBodySharedSettings_EBendType {
"SoftBodySharedSettings_EBendType_None",
"SoftBodySharedSettings_EBendType_Distance",
"SoftBodySharedSettings_EBendType_Dihedral"
};
enum SoftBodySharedSettings_ELRAType {
"SoftBodySharedSettings_ELRAType_None",
"SoftBodySharedSettings_ELRAType_EuclideanDistance",
"SoftBodySharedSettings_ELRAType_GeodesicDistance"
};
enum MeshShapeSettings_EBuildQuality {
"MeshShapeSettings_EBuildQuality_FavorRuntimePerformance",
"MeshShapeSettings_EBuildQuality_FavorBuildSpeed"
};
interface Vec3MemRef {
};
interface QuatMemRef {
};
interface Mat44MemRef {
};
interface BodyIDMemRef {
};
interface BodyPtrMemRef {
};
interface FloatMemRef {
};
interface Uint8MemRef {
};
interface UintMemRef {
};
interface Vec3 {
void Vec3();
void Vec3([Const, Ref] Float3 inV);
void Vec3(float inX, float inY, float inZ);
[Value] static Vec3 sZero();
[Value] static Vec3 sOne();
[Value] static Vec3 sAxisX();
[Value] static Vec3 sAxisY();
[Value] static Vec3 sAxisZ();
[Value] static Vec3 sReplicate(float inValue);
[Value] static Vec3 sMin([Const, Ref] Vec3 inLHS, [Const, Ref] Vec3 inRHS);
[Value] static Vec3 sMax([Const, Ref] Vec3 inLHS, [Const, Ref] Vec3 inRHS);
[Value] static Vec3 sClamp([Const, Ref] Vec3 inValue, [Const, Ref] Vec3 inMin, [Const, Ref] Vec3 inMax);
[Value] static Vec3 sFusedMultiplyAdd([Const, Ref] Vec3 inMul1, [Const, Ref] Vec3 inMul2, [Const, Ref] Vec3 inAdd);
[Value] static Vec3 sOr([Const, Ref] Vec3 inV1, [Const, Ref] Vec3 inV2);
[Value] static Vec3 sXor([Const, Ref] Vec3 inV1, [Const, Ref] Vec3 inV2);
[Value] static Vec3 sAnd([Const, Ref] Vec3 inV1, [Const, Ref] Vec3 inV2);
[Value] static Vec3 sUnitSpherical(float inTheta, float inPhi);
[Operator="[]"] float GetComponent(unsigned long inCoordinate);
[Operator="=="] boolean Equals([Const, Ref] Vec3 inV);
[Operator="!="] boolean NotEquals([Const, Ref] Vec3 inV);
float LengthSq();
float Length();
[Value] Vec3 Normalized();
[Value] Vec3 NormalizedOr([Const, Ref] Vec3 inZeroValue);
[Value] Vec3 GetNormalizedPerpendicular();
float GetX();
float GetY();
float GetZ();
void SetX(float inX);
void SetY(float inY);
void SetZ(float inZ);
void Set(float inX, float inY, float inZ);
void SetComponent(unsigned long inCoordinate, float inValue);
boolean IsNearZero(optional float inMaxDistSq);
boolean IsClose([Const, Ref] Vec3 inV, optional float inMaxDistSq);
boolean IsNormalized(optional float inTolerance);
long GetLowestComponentIndex();
long GetHighestComponentIndex();
[Const, Value] Vec3 Abs();
[Const, Value] Vec3 Reciprocal();
[Const, Value] Vec3 Cross([Const, Ref] Vec3 inRHS);
float Dot([Const, Ref] Vec3 inRHS);
[Value] Vec3 DotV([Const, Ref] Vec3 inRHS);
[Value] Vec4 DotV4([Const, Ref] Vec3 inRHS);
[Operator="+=", Ref] Vec3 Add([Const, Ref] Vec3 inV);
[Operator="-=", Ref] Vec3 Sub([Const, Ref] Vec3 inV);
[Operator="*=", Ref] Vec3 Mul(float inV);
[Operator="/=", Ref] Vec3 Div(float inV);
[Operator = "*", Value] Vec3 MulVec3([Const, Ref] Vec3 inV);
[Operator = "*", Value] Vec3 MulFloat(float inV);
[Operator = "/", Value] Vec3 DivVec3([Const, Ref] Vec3 inV);
[Operator = "/", Value] Vec3 DivFloat(float inV);
[Operator = "+", Value] Vec3 AddVec3([Const, Ref] Vec3 inV);
[Operator = "-", Value] Vec3 SubVec3([Const, Ref] Vec3 inV);
[Value] Vec4 SplatX();
[Value] Vec4 SplatY();
[Value] Vec4 SplatZ();
float ReduceMin();
float ReduceMax();
[Const, Value] Vec3 Sqrt();
[Const, Value] Vec3 GetSign();
};
interface RVec3 {
void RVec3();
void RVec3(double inX, double inY, double inZ);
[Value] static RVec3 sZero();
[Value] static RVec3 sOne();
[Value] static RVec3 sAxisX();
[Value] static RVec3 sAxisY();
[Value] static RVec3 sAxisZ();
[Value] static RVec3 sReplicate(double inValue);
[Value] static RVec3 sMin([Const, Ref] RVec3 inLHS, [Const, Ref] RVec3 inRHS);
[Value] static RVec3 sMax([Const, Ref] RVec3 inLHS, [Const, Ref] RVec3 inRHS);
[Value] static RVec3 sClamp([Const, Ref] RVec3 inValue, [Const, Ref] RVec3 inMin, [Const, Ref] RVec3 inMax);
[Operator="[]"] double GetComponent(unsigned long inCoordinate);
[Operator="=="] boolean Equals([Const, Ref] RVec3 inV);
[Operator="!="] boolean NotEquals([Const, Ref] RVec3 inV);
double LengthSq();
double Length();
[Value] RVec3 Normalized();
double GetX();
double GetY();
double GetZ();
void SetX(double inX);
void SetY(double inY);
void SetZ(double inZ);
void Set(double inX, double inY, double inZ);
void SetComponent(unsigned long inCoordinate, double inValue);
boolean IsNearZero(optional double inMaxDistSq);
boolean IsClose([Const, Ref] RVec3 inV, optional double inMaxDistSq);
boolean IsNormalized(optional double inTolerance);
[Const, Value] RVec3 Abs();
[Const, Value] RVec3 Reciprocal();
[Const, Value] RVec3 Cross([Const, Ref] RVec3 inRHS);
double Dot([Const, Ref] RVec3 inRHS);
[Operator="+=", Ref] RVec3 Add([Const, Ref] Vec3 inV);
[Operator="-=", Ref] RVec3 Sub([Const, Ref] Vec3 inV);
[Operator="*=", Ref] RVec3 Mul(double inV);
[Operator="/=", Ref] RVec3 Div(double inV);
[Operator = "*", Value] RVec3 MulRVec3([Const, Ref] RVec3 inV);
[Operator = "*", Value] RVec3 MulFloat(float inV);
[Operator = "/", Value] RVec3 DivRVec3([Const, Ref] RVec3 inV);
[Operator = "/", Value] RVec3 DivFloat(float inV);
[Operator = "+", Value] RVec3 AddRVec3([Const, Ref] RVec3 inV);
[Operator = "-", Value] RVec3 SubRVec3([Const, Ref] RVec3 inV);
[Const, Value] RVec3 Sqrt();
[Const, Value] RVec3 GetSign();
};
interface Vec4 {
void Vec4();
void Vec4([Const, Ref] Vec4 inV);
void Vec4([Ref] Vec3 inV, float inW);
void Vec4(float inX, float inY, float inZ, float inW);
[Value] static Vec4 sZero();
[Value] static Vec4 sOne();
[Value] static Vec4 sReplicate(float inV);
[Value] static Vec4 sMin([Const, Ref] Vec4 inLHS, [Const, Ref] Vec4 inRHS);
[Value] static Vec4 sMax([Const, Ref] Vec4 inLHS, [Const, Ref] Vec4 inRHS);
[Value] static Vec4 sFusedMultiplyAdd([Const, Ref] Vec4 inMul1, [Const, Ref] Vec4 inMul2, [Const, Ref] Vec4 inAdd);
[Value] static Vec4 sOr([Const, Ref] Vec4 inV1, [Const, Ref] Vec4 inV2);
[Value] static Vec4 sXor([Const, Ref] Vec4 inV1, [Const, Ref] Vec4 inV2);
[Value] static Vec4 sAnd([Const, Ref] Vec4 inV1, [Const, Ref] Vec4 inV2);
float GetX();
float GetY();
float GetZ();
float GetW();
void SetX(float inX);
void SetY(float inY);
void SetZ(float inZ);
void SetW(float inW);
void Set(float inX, float inY, float inZ, float inW);
[Operator="[]"] float GetComponent(unsigned long inCoordinate);
boolean IsClose([Const, Ref] Vec4 inV, optional float inMaxDistSq);
boolean IsNormalized(optional float inTolerance);
[Operator="+=", Ref] Vec4 Add([Const, Ref] Vec4 inV);
[Operator="-=", Ref] Vec4 Sub([Const, Ref] Vec4 inV);
[Operator="*=", Ref] Vec4 Mul(float inV);
[Operator="/=", Ref] Vec4 Div(float inV);
[Operator = "*", Value] Vec4 MulVec4([Const, Ref] Vec4 inV);
[Operator = "*", Value] Vec4 MulFloat(float inV);
[Operator = "/", Value] Vec4 DivVec4([Const, Ref] Vec4 inV);
[Operator = "/", Value] Vec4 DivFloat(float inV);
[Operator = "+", Value] Vec4 AddVec4([Const, Ref] Vec4 inV);
[Operator = "-", Value] Vec4 SubVec4([Const, Ref] Vec4 inV);
};
interface Vector2 {
void Vector2();
void SetZero();
void IsZero();
void IsClose([Const, Ref] Vector2 inV, optional float inMaxDistSq);
void IsNormalized(optional float inTolerance);
[Const, Value] Vector2 Normalized();
[Operator="[]"] float GetComponent(unsigned long inCoordinate);
[Operator="+=", Ref] Vector2 Add([Const, Ref] Vector2 inV);
[Operator="-=", Ref] Vector2 Sub([Const, Ref] Vector2 inV);
[Operator="*=", Ref] Vector2 Mul(float inV);
[Operator="/=", Ref] Vector2 Div(float inV);
[Operator = "*", Value] Vector2 MulFloat(float inV);
[Operator = "/", Value] Vector2 DivFloat(float inV);
[Operator = "+", Value] Vector2 AddVector2([Const, Ref] Vector2 inV);
[Operator = "-", Value] Vector2 SubVector2([Const, Ref] Vector2 inV);
float Dot([Const, Ref] Vector2 inRHS);
};
interface Quat {
void Quat();
void Quat(float inX, float inY, float inZ, float inW);
[Value] static Quat sZero();
[Value] static Quat sIdentity();
[Value] static Quat sRotation([Const, Ref] Vec3 inRotation, float inAngle);
[Value] static Quat sFromTo([Const, Ref] Vec3 inFrom, [Const, Ref] Vec3 inTo);
[Operator="=="] boolean Equals([Const, Ref] Quat inQ);
[Operator="!="] boolean NotEquals([Const, Ref] Quat inQ);
[Operator="*", Value] Quat MulQuat([Const, Ref] Quat inQ);
[Operator="*", Value] Vec3 MulVec3([Const, Ref] Vec3 inV);
[Operator="*", Value] Quat MulFloat(float inV);
boolean IsClose([Const, Ref] Quat inQ, optional float inMaxDistSq);
boolean IsNormalized(optional float inTolerance);
float Length();
float LengthSq();
[Value] Quat Normalized();
[Value] static Quat sEulerAngles([Const, Ref] Vec3 inInput);
[Const, Value] Vec3 GetEulerAngles();
float GetX();
float GetY();
float GetZ();
float GetW();
[Const, Value] Vec3 GetXYZ();
void SetX(float inX);
void SetY(float inY);
void SetZ(float inZ);
void SetW(float inW);
void Set(float inX, float inY, float inZ, float inW);
[Const, Value] Vec3 InverseRotate([Const, Ref] Vec3 inV);
[Const, Value] Vec3 RotateAxisX();
[Const, Value] Vec3 RotateAxisY();
[Const, Value] Vec3 RotateAxisZ();
float Dot([Const, Ref] Quat inQ);
[Const, Value] Quat Conjugated();
[Const, Value] Quat Inversed();
[Const, Value] Quat EnsureWPositive();
[Const, Value] Quat GetPerpendicular();
float GetRotationAngle([Const, Ref] Vec3 inAxis);
[Const, Value] Quat GetTwist([Const, Ref] Vec3 inAxis);
void GetSwingTwist([Ref] Quat outSwing, [Ref] Quat outTwist);
[Const, Value] Quat LERP([Const, Ref] Quat inDestination, float inFraction);
[Const, Value] Quat SLERP([Const, Ref] Quat inDestination, float inFraction);
};
interface Float3 {
void Float3(float inX, float inY, float inZ);
[Operator="=="] boolean Equals([Const, Ref] Float3 inV);
[Operator="!="] boolean NotEquals([Const, Ref] Float3 inV);
attribute float x;
attribute float y;
attribute float z;
};
interface Mat44 {
void Mat44();
[Value] static Mat44 sZero();
[Value] static Mat44 sIdentity();
[Value] static Mat44 sRotationX(float inX);
[Value] static Mat44 sRotationY(float inY);
[Value] static Mat44 sRotationZ(float inZ);
[Value] static Mat44 sRotation([Const, Ref] Quat inQ);
[Value, BindTo="sRotation"] static Mat44 sRotationAxisAngle([Const, Ref] Vec3 inAxis, float inAngle);
[Value] static Mat44 sTranslation([Const, Ref] Vec3 inTranslation);
[Value] static Mat44 sRotationTranslation([Const, Ref] Quat inRotation, [Const, Ref] Vec3 inTranslation);
[Value] static Mat44 sInverseRotationTranslation([Const, Ref] Quat inRotation, [Const, Ref] Vec3 inTranslation);
[Value] static Mat44 sScale(float inScale);
[Value, BindTo="sScale"] static Mat44 sScaleVec3([Const, Ref] Vec3 inScale);
[Value] static Mat44 sOuterProduct([Const, Ref] Vec3 inV1, [Const, Ref] Vec3 inV2);
[Value] static Mat44 sCrossProduct([Const, Ref] Vec3 inV);
[Value] static Mat44 sQuatLeftMultiply([Const, Ref] Quat inQ);
[Value] static Mat44 sQuatRightMultiply([Const, Ref] Quat inQ);
[Value] static Mat44 sLookAt([Const, Ref] Vec3 inPos, [Const, Ref] Vec3 inTarget, [Const, Ref] Vec3 inUp);
[Value] static Mat44 sPerspective(float inFovY, float inAspect, float inNear, float inFar);
[Value] Vec3 GetAxisX();
[Value] Vec3 GetAxisY();
[Value] Vec3 GetAxisZ();
[Value] Vec3 GetDiagonal3();
[Value] Vec4 GetDiagonal4();
[Value] Mat44 GetRotation();
[Value] Mat44 GetRotationSafe();
[Value] Quat GetQuaternion();
[Value] Vec3 GetTranslation();
[Operator="=="] boolean Equals([Const, Ref] Mat44 inV);
[Operator="!="] boolean NotEquals([Const, Ref] Mat44 inV);
boolean IsClose([Const, Ref] Mat44 inM, optional float inMaxDistSq);
[Operator="+=", Const, Ref] Mat44 Add([Const, Ref] Mat44 inM);
[Operator="*", Value] Mat44 MulFloat(float inV);
[Operator="*", Value] Mat44 MulMat44([Const, Ref] Mat44 inM);
[Operator="*", Value] Vec3 MulVec3([Const, Ref] Vec3 inV);
[Operator="*", Value] Vec4 MulVec4([Const, Ref] Vec4 inV);
[Operator="+", Value] Mat44 AddMat44([Const, Ref] Mat44 inM);
[Operator="-", Value] Mat44 SubMat44([Const, Ref] Mat44 inM);
[Value] Vec3 Multiply3x3([Const, Ref] Vec3 inV);
[Value] Vec3 Multiply3x3Transposed([Const, Ref] Vec3 inV);
[Value] Mat44 Multiply3x3LeftTransposed([Const, Ref] Mat44 inM);
[Value] Mat44 Multiply3x3RightTransposed([Const, Ref] Mat44 inM);
[Value] Mat44 Transposed();
[Value] Mat44 Transposed3x3();
[Value] Mat44 Inversed();
[Value] Mat44 InversedRotationTranslation();
[Value] Mat44 Adjointed3x3();
boolean SetInversed3x3([Const, Ref] Mat44 inM);
float GetDeterminant3x3();
[Value] Mat44 Inversed3x3();
[Value] Mat44 GetDirectionPreservingMatrix();
[Value] Mat44 PreTranslated([Const, Ref] Vec3 inTranslation);
[Value] Mat44 PostTranslated([Const, Ref] Vec3 inTranslation);
[Value] Mat44 PreScaled([Const, Ref] Vec3 inScale);
[Value] Mat44 PostScaled([Const, Ref] Vec3 inScale);
[Value] Mat44 Decompose([Ref] Vec3 outScale);
void SetColumn3(long inCol, [Const, Ref] Vec3 inV);
void SetColumn4(long inCol, [Const, Ref] Vec4 inV);
void SetAxisX([Const, Ref] Vec3 inV);
void SetAxisY([Const, Ref] Vec3 inV);
void SetAxisZ([Const, Ref] Vec3 inV);
void SetDiagonal3([Const, Ref] Vec3 inV);
void SetDiagonal4([Const, Ref] Vec4 inV);
void SetTranslation([Const, Ref] Vec3 inV);
[Value] Vec3 GetColumn3(long inCol);
[Value] Vec4 GetColumn4(long inCol);
};
interface RMat44 {
void RMat44();
[Value] static RMat44 sZero();
[Value] static RMat44 sIdentity();
[Value] static RMat44 sRotation([Const, Ref] Quat inQ);
[Value] static RMat44 sTranslation([Const, Ref] RVec3 inTranslation);
[Value] static RMat44 sRotationTranslation([Const, Ref] Quat inRotation, [Const, Ref] RVec3 inTranslation);
[Value] static RMat44 sInverseRotationTranslation([Const, Ref] Quat inRotation, [Const, Ref] RVec3 inTranslation);
[Value] Mat44 ToMat44();
[Operator="=="] boolean Equals([Const, Ref] RMat44 inV);
[Operator="!="] boolean NotEquals([Const, Ref] RMat44 inV);
[Operator="*", Value] RVec3 MulVec3([Const, Ref] Vec3 inV);
[Operator="*", Value] RVec3 MulRVec3([Const, Ref] RVec3 inV);
[Operator="*", Value] RMat44 MulMat44([Const, Ref] Mat44 inM);
[Operator="*", Value] RMat44 MulRMat44([Const, Ref] RMat44 inM);
[Value] Vec3 GetAxisX();
[Value] Vec3 GetAxisY();
[Value] Vec3 GetAxisZ();
[Value] Mat44 GetRotation();
void SetRotation([Const, Ref] Mat44 inRotation);
[Value] Quat GetQuaternion();
[Value] RVec3 GetTranslation();
boolean IsClose([Const, Ref] RMat44 inM, optional double inMaxDistSq);
[Value] Vec3 Multiply3x3([Const, Ref] Vec3 inV);
[Value] Vec3 Multiply3x3Transposed([Const, Ref] Vec3 inV);
[Value] Mat44 Transposed3x3();
[Value] RMat44 Inversed();
[Value] RMat44 InversedRotationTranslation();
[Value] RMat44 PreTranslated([Const, Ref] Vec3 inTranslation);
[Value] RMat44 PostTranslated([Const, Ref] Vec3 inTranslation);
[Value] RMat44 PreScaled([Const, Ref] Vec3 inScale);
[Value] RMat44 PostScaled([Const, Ref] Vec3 inScale);
[Value] Mat44 GetDirectionPreservingMatrix();
void SetColumn3(long inCol, [Const, Ref] Vec3 inV);
[Value] Vec3 GetColumn3(long inCol);
void SetAxisX([Const, Ref] Vec3 inV);
void SetAxisY([Const, Ref] Vec3 inV);
void SetAxisZ([Const, Ref] Vec3 inV);
void SetTranslation([Const, Ref] RVec3 inV);
void SetColumn4(long inCol, [Const, Ref] Vec4 inV);
[Value] Vec4 GetColumn4(long inCol);
[Value] RMat44 Decompose([Ref] Vec3 outScale);
};
interface AABox {
void AABox();
void AABox([Const, Ref] Vec3 inMin, [Const, Ref] Vec3 inMax);
[Value] static AABox sBiggest();
[Value] static AABox sFromTwoPoints([Const, Ref] Vec3 inP1, [Const, Ref] Vec3 inP2);
[Value] static AABox sFromTriangle([Const, Ref] VertexList inVertices, [Const, Ref] IndexedTriangle inTriangle);
[Operator="=="] boolean Equals([Const, Ref] AABox inB);
[Operator="!="] boolean NotEquals([Const, Ref] AABox inB);
void SetEmpty();
boolean IsValid();
[BindTo="Encapsulate"] void EncapsulateVec3([Const, Ref] Vec3 inV);
[BindTo="Encapsulate"] void EncapsulateAABox([Const, Ref] AABox inBox);
[BindTo="Encapsulate"] void EncapsulateTriangle([Const, Ref] Triangle inTriangle);
[BindTo="Encapsulate"] void EncapsulateIndexedTriangle([Const, Ref] VertexList inVertices, [Const, Ref] IndexedTriangle inTriangle);
[Value] AABox Intersect([Const, Ref] AABox inOther);
void EnsureMinimalEdgeLength(float inMinEdgeLength);
void ExpandBy([Const, Ref] Vec3 inV);
[Value] Vec3 GetCenter();
[Value] Vec3 GetExtent();
[Value] Vec3 GetSize();
float GetSurfaceArea();
float GetVolume();
[BindTo="Contains"] boolean ContainsVec3([Const, Ref] Vec3 inOther);
[BindTo="Contains"] boolean ContainsRVec3([Const, Ref] RVec3 inOther);
[BindTo="Overlaps"] boolean OverlapsAABox([Const, Ref] AABox inOther);
[BindTo="Overlaps"] boolean OverlapsPlane([Const, Ref] AABox inOther);
[BindTo="Translate"] void TranslateVec3([Const, Ref] Vec3 inOther);
[BindTo="Translate"] void TranslateRVec3([Const, Ref] RVec3 inOther);
[BindTo="Transformed", Value] AABox TransformedMat44([Const, Ref] Mat44 inOther);
[BindTo="Transformed", Value] AABox TransformedRMat44([Const, Ref] RMat44 inOther);
[Value] AABox Scaled([Const, Ref] Vec3 inScale);
[Value] Vec3 GetClosestPoint([Const, Ref] Vec3 inV);
float GetSqDistanceTo([Const, Ref] Vec3 inV);
[Value] attribute Vec3 mMin;
[Value] attribute Vec3 mMax;
};
interface OrientedBox {
void OrientedBox();
void OrientedBox([Const, Ref] Mat44 inOrientation, [Const, Ref] Vec3 inHalfExtents);
[Value] attribute Mat44 mOrientation;
[Value] attribute Vec3 mHalfExtents;
};
interface RayCast {
void RayCast();
void RayCast([Const, Ref] Vec3 inOrigin, [Const, Ref] Vec3 inDirection);
[Const, Value] RayCast Transformed([Const, Ref] Mat44 inTransform);
[Const, Value] RayCast Translated([Const, Ref] Vec3 inTranslation);
[Const, Value] Vec3 GetPointOnRay(float inFraction);
[Value] attribute Vec3 mOrigin;
[Value] attribute Vec3 mDirection;
};
interface RRayCast {
void RRayCast();
void RRayCast([Const, Ref] RVec3 inOrigin, [Const, Ref] Vec3 inDirection);
[Const, Value] RRayCast Transformed([Const, Ref] RMat44 inTransform);
[Const, Value] RRayCast Translated([Const, Ref] RVec3 inTranslation);
[Const, Value] RVec3 GetPointOnRay(float inFraction);
[Value] attribute RVec3 mOrigin;
[Value] attribute Vec3 mDirection;
};
interface BroadPhaseCastResult {
void BroadPhaseCastResult();
void Reset();
[Value] attribute BodyID mBodyID;
attribute float mFraction;
};
interface RayCastResult {
void RayCastResult();
[Value] attribute SubShapeID mSubShapeID2;
};
RayCastResult implements BroadPhaseCastResult;
interface AABoxCast {
void AABoxCast();
[Value] attribute AABox mBox;
[Value] attribute Vec3 mDirection;
};
interface ShapeCast {
void ShapeCast([Const] Shape inShape, [Const, Ref] Vec3 inScale, [Const, Ref] Mat44 inCenterOfMassStart, [Const, Ref] Vec3 inDirection);
[Const] readonly attribute Shape mShape;
[Const, Value] readonly attribute Vec3 mScale;
[Const, Value] readonly attribute Mat44 mCenterOfMassStart;
[Const, Value] readonly attribute Vec3 mDirection;
[Const, Value] Vec3 GetPointOnRay(float inFraction);
};
interface RShapeCast {
void RShapeCast([Const] Shape inShape, [Const, Ref] Vec3 inScale, [Const, Ref] RMat44 inCenterOfMassStart, [Const, Ref] Vec3 inDirection);
[Const] readonly attribute Shape mShape;
[Const, Value] readonly attribute Vec3 mScale;
[Const, Value] readonly attribute RMat44 mCenterOfMassStart;
[Const, Value] readonly attribute Vec3 mDirection;
[Const, Value] RVec3 GetPointOnRay(float inFraction);
};
interface Plane {
void Plane([Const, Ref] Vec3 inNormal, float inConstant);
[Value] Vec3 GetNormal();
void SetNormal([Const, Ref] Vec3 inNormal);
float GetConstant();
void SetConstant(float inConstant);
[Const, Value] Plane sFromPointAndNormal([Const, Ref] Vec3 inPoint, [Const, Ref] Vec3 inNormal);
[Const, Value] Plane sFromPointsCCW([Const, Ref] Vec3 inPoint1, [Const, Ref] Vec3 inPoint2, [Const, Ref] Vec3 inPoint3);
[Const, Value] Plane Offset(float inDistance);
[Const, Value] Plane Scaled([Const, Ref] Vec3 inScale);
[Const, Value] Plane GetTransformed([Const, Ref] Mat44 inTransform);
[Const, Value] Vec3 ProjectPointOnPlane([Const, Ref] Vec3 inPoint);
float SignedDistance([Const, Ref] Vec3 inPoint);
};
interface TransformedShape {
void TransformedShape();
void CastRay([Const, Ref] RRayCast inRay, [Ref] RayCastResult ioHit);
void CastRay([Const, Ref] RRayCast inRay, [Const, Ref] RayCastSettings inRayCastSettings, [Ref] CastRayCollector ioCollector, [Const, Ref] ShapeFilter inShapeFilter);
void CollidePoint([Const, Ref] RVec3 inPoint, [Ref] CollidePointCollector ioCollector, [Const, Ref] ShapeFilter inShapeFilter);
void CollideShape([Const] Shape inShape, [Const, Ref] Vec3 inShapeScale, [Const, Ref] RMat44 inCenterOfMassTransform, [Const, Ref] CollideShapeSettings inCollideShapeSettings, [Const, Ref] RVec3 inBaseOffset, [Ref] CollideShapeCollector ioCollector, [Const, Ref] ShapeFilter inShapeFilter);
void CastShape([Const, Ref] RShapeCast inShapeCast, [Const, Ref] ShapeCastSettings inShapeCastSettings, [Const, Ref] RVec3 inBaseOffset, [Ref] CastShapeCollector ioCollector, [Const, Ref] ShapeFilter inShapeFilter);
void CollectTransformedShapes([Const, Ref] AABox inBox, [Ref] TransformedShapeCollector ioCollector, [Const, Ref] ShapeFilter inShapeFilter);
[Value] Vec3 GetShapeScale();
void SetShapeScale([Const, Ref] Vec3 inScale);
[Value] RMat44 GetCenterOfMassTransform();
[Value] RMat44 GetInverseCenterOfMassTransform();
void SetWorldTransform([Const, Ref] RVec3 inPosition, [Const, Ref] Quat inRotation, [Const, Ref] Vec3 inScale);
void SetWorldTransform([Const, Ref] RMat44 inTransform);
[Value] RMat44 GetWorldTransform();
[Value] AABox GetWorldSpaceBounds();
[Value] Vec3 GetWorldSpaceSurfaceNormal([Const, Ref] SubShapeID inSubShapeID, [Const, Ref] RVec3 inPosition);
[Const] PhysicsMaterial GetMaterial([Const, Ref] SubShapeID inSubShapeID);
[Value] attribute RVec3 mShapePositionCOM;
[Value] attribute Quat mShapeRotation;
[Const] attribute Shape mShape;
[Value] attribute Float3 mShapeScale;
[Value] attribute BodyID mBodyID;
};
interface PhysicsMaterial {
void PhysicsMaterial();
unsigned long GetRefCount();
void AddRef();
void Release();
};
interface PhysicsMaterialList {
void PhysicsMaterialList();
boolean empty();
long size();
[Const] PhysicsMaterial at(long inIndex);
void push_back([Const] PhysicsMaterial inMaterial);
void reserve(unsigned long inSize);
void resize(unsigned long inSize);
void clear();
};
interface Triangle {
void Triangle();
void Triangle([Const, Ref] Vec3 inV1, [Const, Ref] Vec3 inV2, [Const, Ref] Vec3 inV3, optional unsigned long inMaterialIndex, optional unsigned long inUserData);
[Value] attribute Float3[] mV;
attribute unsigned long mMaterialIndex;
attribute unsigned long mUserData;
};
interface TriangleList {
void TriangleList();
boolean empty();
long size();
[Ref] Triangle at(long inIndex);
void push_back([Const, Ref] Triangle inTriangle);
void reserve(unsigned long inSize);
void resize(unsigned long inSize);
void clear();
};
interface VertexList {
void VertexList();
boolean empty();
long size();
[Ref] Float3 at(long inIndex);
void push_back([Const, Ref] Float3 inVertex);
void reserve(unsigned long inSize);
void resize(unsigned long inSize);
void clear();
};
interface IndexedTriangle {
void IndexedTriangle();
void IndexedTriangle(unsigned long inI1, unsigned long inI2, unsigned long inI3, unsigned long inMaterialIndex, optional unsigned long inUserData);
attribute unsigned long[] mIdx;
attribute unsigned long mMaterialIndex;
attribute unsigned long mUserData;
};
interface IndexedTriangleList {
void IndexedTriangleList();
boolean empty();
long size();
[Ref] IndexedTriangle at(long inIndex);
void push_back([Const, Ref] IndexedTriangle inTriangle);
void reserve(unsigned long inSize);
void resize(unsigned long inSize);
void clear();
};
[Prefix="Shape::"]
interface ShapeResult {
boolean IsValid();
boolean HasError();
[Const, Ref] JPHString GetError();
Shape Get();
void Clear();
};
// Shape
interface ShapeSettings {
unsigned long GetRefCount();
void AddRef();
void Release();
[Value] ShapeResult Create();
void ClearCachedResult();
attribute unsigned long long mUserData;
};
interface Shape {
unsigned long GetRefCount();
void AddRef();
void Release();
EShapeType GetType();
EShapeSubType GetSubType();
boolean MustBeStatic();
[Value] AABox GetLocalBounds();
[Value] AABox GetWorldSpaceBounds([Const, Ref] Mat44 inCenterOfMassTransform, [Const, Ref] Vec3 inScale);
[Value] Vec3 GetCenterOfMass();
unsigned long long GetUserData();
void SetUserData(unsigned long long inUserData);
unsigned long GetSubShapeIDBitsRecursive();
float GetInnerRadius();
[Value] MassProperties GetMassProperties();
[Const] Shape GetLeafShape([Const, Ref] SubShapeID inSubShapeID, [Ref] SubShapeID outRemainder);
[Const] PhysicsMaterial GetMaterial([Const, Ref] SubShapeID inSubShapeID);
[Value] Vec3 GetSurfaceNormal([Const, Ref] SubShapeID inSubShapeID, [Const, Ref] Vec3 inLocalSurfacePosition);
unsigned long long GetSubShapeUserData([Const, Ref] SubShapeID inSubShapeID);
[Value] TransformedShape GetSubShapeTransformedShape([Const, Ref] SubShapeID inSubShapeID, [Const, Ref] Vec3 inPositionCOM, [Const, Ref] Quat inRotation, [Const, Ref] Vec3 inScale, [Ref] SubShapeID outRemainder);
float GetVolume();
boolean IsValidScale([Const, Ref] Vec3 inScale);
[Value] Vec3 MakeScaleValid([Const, Ref] Vec3 inScale);
[Value] ShapeResult ScaleShape([Const, Ref] Vec3 inScale);
};
interface ShapeGetTriangles {
void ShapeGetTriangles(Shape inShape, [Const, Ref] AABox inBox, [Const, Ref] Vec3 inPositionCOM, [Const, Ref] Quat inRotation, [Const, Ref] Vec3 inScale);
long GetNumTriangles();
long GetVerticesSize();
[Const] any GetVerticesData();
[Const] PhysicsMaterial GetMaterial(long inTriangle);
};
// Convex shape
interface ConvexShapeSettings {
[Const] attribute PhysicsMaterial mMaterial;
attribute float mDensity;
};
ConvexShapeSettings implements ShapeSettings;
interface ConvexShape {
void SetMaterial([Const] PhysicsMaterial inMaterial);
float GetDensity();
void SetDensity(float inDensity);
};
ConvexShape implements Shape;
// Sphere
interface SphereShapeSettings {
void SphereShapeSettings(float inRadius, [Const] optional PhysicsMaterial inMaterial);
attribute float mRadius;
};
SphereShapeSettings implements ConvexShapeSettings;
interface SphereShape {
void SphereShape(float inRadius, [Const] optional PhysicsMaterial inMaterial);
float GetRadius();
};
SphereShape implements ConvexShape;
// Box
interface BoxShapeSettings {
void BoxShapeSettings([Ref] Vec3 inHalfExtent, optional float inConvexRadius, [Const] optional PhysicsMaterial inMaterial);
[Value] attribute Vec3 mHalfExtent;
attribute float mConvexRadius;
};
BoxShapeSettings implements ConvexShapeSettings;
interface BoxShape {
void BoxShape([Ref] Vec3 inHalfExtent, optional float inConvexRadius, [Const] optional PhysicsMaterial inMaterial);
[Value] Vec3 GetHalfExtent();
};
BoxShape implements ConvexShape;
// Cylinder
interface CylinderShapeSettings {
void CylinderShapeSettings(float inHalfHeight, float inRadius, optional float inConvexRadius, [Const] optional PhysicsMaterial inMaterial);
attribute float mHalfHeight;
attribute float mRadius;
attribute float mConvexRadius;
};
CylinderShapeSettings implements ConvexShapeSettings;
interface CylinderShape {
void CylinderShape(float inHalfHeight, float inRadius, float inConvexRadius, [Const] optional PhysicsMaterial inMaterial);
float GetRadius();
float GetHalfHeight();
};
CylinderShape implements ConvexShape;
// TaperedCylinder
interface TaperedCylinderShapeSettings {
void TaperedCylinderShapeSettings(float inHalfHeightOfTaperedCylinder, float inTopRadius, float inBottomRadius, optional float inConvexRadius, [Const] optional PhysicsMaterial inMaterial);
attribute float mHalfHeight;
attribute float mTopRadius;
attribute float mBottomRadius;
attribute float mConvexRadius;
};
TaperedCylinderShapeSettings implements ConvexShapeSettings;
interface TaperedCylinderShape {
float GetHalfHeight();
float GetTopRadius();
float GetBottomRadius();
float GetConvexRadius();
};
TaperedCylinderShape implements ConvexShape;
// Capsule
interface CapsuleShapeSettings {
void CapsuleShapeSettings(float inHalfHeight, float inRadius, [Const] optional PhysicsMaterial inMaterial);
attribute float mRadius;
attribute float mHalfHeightOfCylinder;
};
CapsuleShapeSettings implements ConvexShapeSettings;
interface CapsuleShape {
void CapsuleShape(float inHalfHeight, float inRadius, [Const] optional PhysicsMaterial inMaterial);
float GetRadius();
float GetHalfHeightOfCylinder();
};