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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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
--- Entity and Game Object functions. 

--- Returns if the given param is a valid object, non yet destroyed by calling DoneObject.
-- @cstyle bool IsValid(object obj).
-- @param obj object.
-- @return type bool.

function IsValid(obj)
end

--- Returns index of a random spot of the speciifed type for the current or default state of the object (-1 if the object does not exists).
-- @cstyle int GetRandomSpot(string entity, int state, int typeID).
-- @param entity string.
-- @param state int.
-- @param typeID int.
-- @return int.

function GetRandomSpot(entity, state, typeID)
end

--- Returns the position of the spot in the given entity, relative to the entity center.
-- @cstyle point GetEntitySpotPos(string entity, int idx).
-- @param entity string entity name.
-- @param idx int the index of the spot.
-- @return point.

function GetEntitySpotPos(entity, idx)
end

--- Returns the angle(in minutes) of the spot in the given entity, relative to the entity center.
-- @cstyle int GetSpotAngle(string entity/object, int idx).
-- @param entity string entity name or object.
-- @param idx int the index of the spot.
-- @return int.

function GetEntitySpotAngle(entity, idx)
end

--- Returns the scale of the spot in the given entity
-- @cstyle int GetSpotScale(string entity, int idx) or object::GetSpotScale(, int idx).
-- @param entity string entity name or object.
-- @param idx int the index of the spot.
-- @return int.

function GetEntitySpotScale(entity, idx)
end

--- Returns the typeid of the given spot index.
-- @cstyle int GetSpotsType(string entity|object, int idx).
-- @param entity string.
-- @param idx int.
-- @return int returns the spot typeid.

function GetSpotsType(pchEnt, idx)
end

--- Returns true if the entity has this state.
-- @cstyle bool HasState(string entity, int state).
-- @param entity string; Entity name to be checked.
-- @param state int; State of the entity to be checked.
-- @return bool.

function HasState(entity, state)
end

-- Returns the step vector of the animation in state stateID of the given entity.
-- @cstyle point GetEntityStepVector(object self, [int stateID]).
-- @param entity string; name of the entity.
-- @param state int.
-- @return point.

function GetEntityStepVector(entity, state)
end

--- Places and inits object with some basic properties.

function PlaceAndInit(class, pos, angle, scale, axis)
end

--- Places and inits object with some basic properties, not using points to prevent unnecessary allocations.

function PlaceAndInit2(class, posx, posy, posz, angle, scale, axisx, axisy, axisz, state, groupID)
end

--- Groups specified objects together. NOTE: This calls Ungroup(list) first.
-- @cstyle void Group(objlist list).
-- @param list objlist.
-- @return void.

function Group(list)	
end

--- For all objects in list ungroups the WHOLE group the object is member of.
-- @cstyle void Ungroup(objlist list).
-- @param list objlist.
-- @return void.

function Ungroup(list)
end

--- Returns the topmost parent (the object itself, if not attached).
-- @cstyle object GetTopmostParent(object obj, string classname = false).
-- @param obj object.
-- @return type object.
function GetTopmostParent(obj, classname)
end

--- Creates a clone of an object copying all his properties to the clone
-- @cstyle object object:Clone(object self [, string classname]).
-- @param classname string; optional new class
-- @return object; Returns the clone created.
function object:Clone(classname)
end

--- Changes the class of an object. The new class should be compatible with the previous one (i.e. having the same class flags)
-- @cstyle object object:ChangeClass(object self, string classname).
-- @param classname string; the new class
function object:ChangeClass(classname)
end

--- Returns whether the object has an entity
-- @cstyle bool object::HasEntity(object self).
-- @return bool.
function object:HasEntity()
end

--- Returns the destlock of the specified object if any.
-- @cstyle object object::GetDestlock(object self).
-- @return object.

function object:GetDestlock()
end

--- If the given unit is moving, return his destination, otherwise returns his current position.
-- @cstyle point object::GetDestination(object self).
-- @return point.

function object:GetDestination()
end

--- For moving objects returns the vector difference between the starting and ending position of self object, but with length set to the distance traveled per second.
-- @cstyle point object::GetVelocityVector(object self, int delta = 0, extrapolate = false).
-- @return point.
function object:GetVelocityVector(delta, extrapolate)
end

--- For moving objects returns the length of the velocity vector.
-- @cstyle point object::GetVelocity(object self).
-- @return point.
function object:GetVelocity()
end

--- Returns the step length of the animation in state stateID.
-- @cstyle int object::GetStepLength(object this, int stateID).
-- @param stateID int; state for which to return the step length; if omitted the current state is used.
-- @return int.

function object:GetStepLength(stateID)
end

--- Returns the step vector of the animation in state stateID with the specified direction.
-- @cstyle int object::GetStepVector(object this, [int stateID], [int direction], [int phase], [int duration], [int step_mod]).
-- @param stateID int; state for which to return the step length; if omitted uses the current state.
-- @param direction int; angle in minutes at which the step vector is oriented;if omitted uses the current direction .
-- @param phase int; animation phase
-- @param duration int; duration in animation phases
-- @param step_mod int; percentage step modifier
-- @return int.
function object:GetStepVector(stateID, direction, phase, duration, step_mod)
end

--- Detaches the object from the map without destroying it (example - units entering buildings).
-- @cstyle void object::DetachFromMap(object this).
-- @return void.

function object:DetachFromMap()
end

--- Sets the entity of object this to newEntity.
-- @cstyle void object::ChangeEntity(object this, string newEntity).
-- @param newEntity string; name of the new entity to set.
-- @return void.

function object:ChangeEntity(newEntity)
end

--- Sets the color modifier for an object.
-- A per-component modifier to the final lit color of the object; RGB(100, 100, 100) means no modification.
-- @cstyle void object::SetColorModifier(object this, int colorModifier).
-- @param colorModifier int; the Color modifier.
-- @return void.

function object:SetColorModifier(colorModifier)
end

--- Returns the color modifier for an object.
-- A per-component modifier to the final lit color of the object; RGB(100, 100, 100) means no modification.
-- @cstyle int object::GetColorModifier(object this).
-- @return int.

function object:GetColorModifier()
end

--- Set new animation speed modifier, as promiles of original animation duration.
-- Animation duration and action moment times are affected by that modifier!.
-- @cstyle void object::SetAnimSpeedModifier(object this, int modifier).
-- @param modifier integer; speed modifier.
-- @return void.

function object:SetAnimSpeedModifier(modifier)
end

--- Return the current animation speed modifier as a promile.
-- Affects both animation duration and action moment!.
-- @cstyle int object::GetAnimSpeedModifier(object this).
-- @return int.

function object:GetAnimSpeedModifier()
end

--- Returns the last frame mark for the object. Frame marks advance for each frame drawn(main, shadows, reflection, etc.)
-- @cstyle int object::GetLastFrame(object this).
-- @return type.

function object:GetFrameMark()
end

--- Runs a pathfinder from the objects' current position to dst, follows the path and moves the object where it would be along the path at the specified time.
-- NOTE: It shouldn't be called on object executing a command.
-- @cstyle int object::GotoFastForward(object self, point dst, int time).
-- @param dst point; Destination of the object.
-- @param time int; Time for the object to go toward the destination.
-- @return int; Retruns the status of the operation, i.e. InProgress, Failed and so on.

function object:GotoFastForward(dst, time)
end

--- Attaches game object to another game object at spot of the parent game object.
-- @cstyle void object::Attach(object this, object child, int spot).
-- @param child object object to attach.
-- @param spot int spot at which to attach child object.
-- @return void.

function object:Attach(child, spot)
end

--- Detaches game object from its parent (its position remains where it is).
-- @cstyle void object::Detach(object this).
-- @return void.

function object:Detach()
end

--- Returns the number of current attached objects to our object.
-- @cstyle int object::GetNumAttaches(object this).
-- @return int.

function object:GetNumAttaches()
end

--- Get object(s) attached to a given object.
-- @cstyle object object::GetAttach(object this, int idx).
-- @cstyle object object::GetAttach(object this, string class, function filter).
-- @param idx int index of the attached object to get.
-- @param class string class of attached objects to get. Returns all matching attaches as tuple.
-- @param filter function to test if an attach is a match.
-- @return object.

function object:GetAttach(idx)
end

--- Get the spot index at which our object is attached to its parent.
-- @cstyle int object::GetAttachSpot(object this).
-- @return int.

function object:GetAttachSpot()
end

--- Get the parent object (if any).
-- @cstyle object object::GetParent(object this).
-- @return object or nil; nil means no parent.

function object:GetParent()
end

--- Returns the index of the first spot from the given type for the given or default state of the object (-1 if the object does not exist).
-- @cstyle int object::GetSpotBeginIndex(object this, int state, int typeID) or GetSpotBeginIndex(entity, int state, int typeID).
-- @param state int; This parameter is optional.
-- @param typeID int.
-- @return int.

function object:GetSpotBeginIndex(state, typeID)
end

--- Returns the index of the last spot from the given type for the given or default state of the object (-1 if the object does not exist).
-- @cstyle int object::GetSpotEndIndex(object this, int state, int typeID) or GetSpotEndIndex(entity, int state, int typeID).
-- @param state int; This parameter is optional.
-- @param typeID int.
-- @return int.

function object:GetSpotEndIndex(state, typeID)
end

--- Returns the index of the first and the last spot from the given type for the given or default state of the object (-1 if the object does not exist).
-- @cstyle int object::GetSpotRange(object this, int state, int typeID) or GetSpotRange(entity, int state, int typeID).
-- @param state int; This parameter is optional.
-- @param typeID int.
-- @return int.

function object:GetSpotRange(state, typeID)
end

--- Returns the index of the nearest to pt spot of the specified type for the current or default state of the object (-1 if the object does not exists).
-- @cstyle int object::GetNearestSpot(object this, int state, int typeID, point pt).
-- @param state int Optional parameter.
-- @param typeID int.
-- @param pt point.
-- @return int.

function object:GetNearestSpot(state, typeID, pt)
end

--- Returns index of a random spot of the speciifed type for the current or default state of the object (-1 if the object does not exists).
-- @cstyle int object::GetRandomSpot(object this, int state, int typeID).
-- @param state int; Optional paramater.
-- @param typeID int.
-- @return int.

function object:GetRandomSpot(state, typeID)
end

--- Returns the position of a random spot of the speciifed type for the current or default state of the object; if the spot doesn't exist returns nil.
-- @cstyle point object::GetRandomSpotPos(object this, int state, int typeID).
-- @param state int; Optional paramater.
-- @param typeID int.
-- @return point or nil.

function object:GetRandomSpotPos(state, typeID)
end

--- Returns whether the object has a specific spot type.
-- @cstyle bool object::HasSpot(object this, int state, int typeID) or HasSpot(string entity, int stateID, int typeID).
-- @param state int; Optional parameter when the first one is a game object.
-- @param typeID int.
-- @return bool.

function object:HasSpot(state, typeID)
end

--- Returns the position of the spot with the specified spotID.
-- @cstyle point object::GetSpotPos(object this, int spotID).
-- @param spotID int.
-- @return point or nil.

function object:GetSpotPos(spotID)
end

--- If the self object has a render object returns the VISUAL position of the spot with the specified spotID; otherwise it acts as GetSpotPos
-- @cstyle point object::GetSpotVisualPos(object self, int spotID).
-- @param spotID int.
-- @return point or nil.

function object:GetSpotVisualPos(spotID)
end

--- Returns the rotation (angle + axis) of the spot with the specified spotID (0 if the object or the spot does not exist).
-- @cstyle int, point object::GetSpotAxisAngle(object this, int spotID).
-- @param spotID int.
-- @return point, int.

function object:GetSpotAxisAngle(spotID)
end

--- Returns the spot annotation - a string with no predefined meaning, that can carry extra information related to certain spots.
-- @cstyle string object::GetSpotAnnotation(object this, int spotID).
-- @param spotID int.
-- @return string.

function object:GetSpotAnnotation(spotID)
end

--- Returns the height of the object (-1 if the object does not exists).
-- @cstyle int object::GetHeight(object this).
-- @return int.

function object:GetHeight()
end

--- Returns the radius of the bounding sphere of the current state of the object.
-- @cstyle int object::GetRadius(object this).
-- @return int.

function object:GetRadius()
end

--- Returns the bounding sphere of the current state of the object.
-- @cstyle point, int object::GetBSphere(object this).
-- @return point, int; center and radius of the object.

function object:GetBSphere()
end

--- Returns the bounding box of the current state of the object with mirroring applied, but without applying object's position, scale and orientation.
-- @cstyle box object::GetEntityBBox(object this).
-- @return box; The bounding box of the object's current state.

function object:GetEntityBBox()
end

--- Returns the name of the spot at index spotID.
-- @cstyle string object::GetSpotName(object this, int spotID) or string GetSpotName(string entity, int spotID)..
-- @param entity string or object instance.
-- @param spotID int.
-- @return string.

function object:GetSpotName(spotID)
end

--- Gets all GameObject flags of the object, ORed together ANDed the mask specified. 
-- @cstyle int object::GetGameFlags(object this, int mask = ~0).
-- @param mask int; Default mask = ~0.
-- @return int.

function object:GetGameFlags(object, mask)
end

--- Clears to 0 the specified GameObject game flags of the object.
-- @cstyle void object::ClearGameFlags(object this, int flags).
-- @param flags int; Specifies the flags to be cleared.
-- @return void.

function object:ClearGameFlags(flags)
end

--- Clears to 0 the specified GameObject game flags of the object and its attaches.
-- @cstyle void object::ClearHierarchyGameFlags(object this, int flags).
-- @param flags int; Specifies the flags to be cleared.
-- @return void.

function object:ClearHierarchyGameFlags(flags)
end

--- Sets to 1 the specified GameObject game flags of the object.
-- @cstyle void object::SetGameFlags(object this, int flags).
-- @param flags int; specifies the flags to be set.
-- @return void.

function object:SetGameFlags(flags)
end

--- Sets to 1 the specified GameObject game flags of the object and its attaches.
-- @cstyle void object::SetHierarchyFlags(object this, int flags).
-- @param flags int; specifies the flags to be set.
-- @return void.

function object:SetHierarchyGameFlags(flags)
end

--- Gets all MapObject flags of the object, ORed together ANDed the mask specified. 
-- @cstyle int object::GetEnumFlags(object this, int mask = ~0).
-- @param mask int; Default mask = ~0.
-- @return int.

function object:GetEnumFlags(mask)
end

--- Clears to 0 the specified MapObject flags of the object.
-- @cstyle void object::ClearEnumFlags(object this, int flags).
-- @param flags int; Specifies the flags to be cleared.
-- @return void.

function object:ClearEnumFlags(flags)
end

--- Clears to 0 the specified MapObject flags of the object and its attaches.
-- @cstyle void object::ClearHierarchyEnumFlags(object this, int flags).
-- @param flags int; Specifies the flags to be cleared.
-- @return void.

function object:ClearHierarchyEnumFlags(flags)
end

--- Sets to 1 the specified MapObject flags of the object.
-- @cstyle void object::SetEnumFlags(object this, int flags).
-- @param flags int; specifies the flags to be set.
-- @return void.

function object:SetEnumFlags(flags)
end

--- Gets all class flags of the object, ORed together ANDed the mask specified. 
-- @cstyle int object::GetClassFlags(object this, int mask = ~0).
-- @param mask int; Default mask = ~0.
-- @return int.

function object:GetClassFlags(mask)
end

--- Sets to 1 the specified MapObject flags of the object its attaches.
-- @cstyle void object::SetHierarchyEnumFlags(object this, int flags).
-- @param flags int; specifies the flags to be set.
-- @return void.

function object:SetHierarchyEnumFlags(flags)
end

--- Returns the interpolated position of the object, including a valid Z taken from the terrain.
-- @cstyle point object::GetVisualPos(object this, int time_offset, bool bExtrapolate).
-- @return point; the position of the object.

function object:GetVisualPos(time_offset, bExtrapolate)
end

function object:GetVisualPosXYZ(time_offset, bExtrapolate)
end

--- Returns the interpolated position of the object, including a valid Z taken from the terrain multiplied by factor.
-- @cstyle point object::GetVisualPosPrecise(object this, int factor).
-- @return point; the position of the object.

function object:GetVisualPosPrecise()
end

--- Returns the position of the object as point if it exists. Else returns point with invalid coordinates (-MAX_INT).
-- @cstyle point object::GetPos(object self).
-- @return point; The posiotion of the object.

function object:GetPos()
end

function object:HasFov(map_pos, fov_arc_angle, pos_offset_z, use_velocity_vector)
end

function object:GetRollPitchYaw()
end
function object:SetRollPitchYaw(roll, pitch, yaw)
end

--- Check if the object has a position on the map.
-- @cstyle bool object::IsValidPos().
-- @return bool;

function object:IsValidPos()
end

--- Converts a world position to local space.
-- @cstyle point object::GetLocalPoint(point world_pos).
-- @return point; the position in local space.

function object:GetLocalPoint(world_pos) end
function object:GetLocalPoint(x, y, z) end
function object:GetLocalPointXYZ(world_pos) end
function object:GetLocalPointXYZ(x, y, z) end

--- Converts a local position to world space.
-- @cstyle point object::GetRelativePoint(point local_pos).
-- @return point; the position in world space.

function object:GetRelativePoint(local_pos) end
function object:GetRelativePoint(x, y, z) end
function object:GetRelativePointXYZ(local_pos) end
function object:GetRelativePointXYZ(x, y, z) end

--- Returns the angle(in minutes) of the spot in the given object and its axis.
-- @cstyle int, point object:GetSpotAngle(int idx).
-- @param idx int the index of the spot.
-- @return int, point.

function object:GetSpotAngle(idx)
end

--- Returns the scale of the spot in the.
-- @cstyle int object:GetSpotScale(int idx) or object::GetSpotScale(, int idx).
-- @param idx int the index of the spot.
-- @return int.

function object:GetSpotScale(idx)
end

--- Returns the interpolated position of the object, without the Z value
-- @cstyle point object::GetVisualPos2D(object this).
-- @return point; the position of the object.

function object:GetVisualPos2D()
end

--- Returns the sound position and distance relative to the closest listener
-- @cstyle point, int object::GetSoundPosAndDist(object this).
-- @return point; the sound position.
-- @return int; the sound dist.

function object:GetSoundPosAndDist()
end

--- Set gravity acceleration for this object
-- @cstyle void object::SetGravity(int accel).
-- @param accel int.
-- @return void.

function object:SetGravity(accel)
end

--- Compute free fall time
-- @cstyle int object:GetGravityFallTime(int fall_height, int start_speed_z, int accel).
-- @param fall_height int
-- @param start_speed_z int; optional
-- @param accel int; optional
-- @return int.

function object:GetGravityFallTime(fall_height, start_speed_z, accel)
end

--- Compute such a travel time that the object would reach the specified z level
-- @cstyle int object::GetGravityHeightTime(point target, int height, int accel).
-- @param target point
-- @param height int; height to reach above the start/end positions
-- @param accel int; optional.
-- @return void.

function object:GetGravityHeightTime(target, height, accel)
end

--- Compute travel time for a given starting angle
-- @cstyle int object::GetGravityAngleTime(Point target, int angle, int accel).
-- @param target point
-- @param angle int; angle in minutes
-- @param accel int; optional.
-- @return void.

function object:GetGravityAngleTime(target, angle, accel)
end

--- Set linear acceleration for this object
-- @cstyle void object::SetAcceleration(int accel).
-- @param accel int.
-- @return void.
function object:SetAcceleration(accel)
end

--- Compute the acceleration and time needed to reach the target destination with the desired final velocity
-- @cstyle int object::GetAccelerationAndTime(Point destination, int final_speed, int starting_speed = object.GetVelocity()).
-- @param destination point
-- @param final_speed int; final speed when reaching the destination
-- @param starting_speed int; optional. The current speed when starting the interpolation.
-- @return int, int.

function object:GetAccelerationAndTime(destination, final_speed, starting_speed)
end

--- Compute the acceleration and starting speed needed to reach the target destination with the desired final velocity within given time period.
-- @cstyle int object::GetAccelerationAndStartSpeed(Point destination, int final_speed, int time).
-- @param destination point
-- @param final_speed int; final speed when reaching the destination
-- @param time int; movement time.
-- @return int, int.

function object:GetAccelerationAndStartSpeed(destination, final_speed, time)
end

--- Compute the acceleration and final speed needed to reach the target destination with the desired starting velocity within given time period.
-- @cstyle int object::GetAccelerationAndStartSpeed(Point destination, int final_speed, int time).
-- @param destination point
-- @param starting_speed int; starting speed
-- @param time int; movement time.
-- @return int, int.

function object:GetAccelerationAndFinalSpeed(destination, starting_speed, time)
end

function object:GetFinalSpeedAndTime(destination, acceleration, starting_speed)
end

function object:GetFinalPosAndTime(final_speed, acceleration)
end

--- Activates arc movement
-- @cstyle void object::SetCurvature(bool set)
function object:SetCurvature(set)
end

--- Checks if arc movement is active
-- @cstyle bool object::GetCurvature()
function object:GetCurvature()
end

--- Computes arc movement time
-- @cstyle int object::GetCurvatureTime(point pos, int angle [, point axis, int speed])
-- @param pos point; target point.
-- @param angle int; target angle.
-- @param axis point; optional axis. If not provided, the object's current axis is used.
-- @param speed int; optional speed. If not provided, the object's current speed is used.
-- @return int.
function object:GetCurvatureTime(pos, angle, axis, speed)
end

--- Changes postion of the object to pos smoothly for the specified time.
-- @cstyle void object::SetPos(object this, point pos, int time).
-- @param pos point; the new position of the object; must be in the map rectangle.
-- @param time int.
-- @return void.

function object:SetPos(pos, time)
end

--- Changes postion of the object to the current position of the given spot of the target object smoothly for the specified time.
-- @cstyle point object::SetLocationToObjSpot(object this, object target_obj, int spotidx, int time = 0).
-- @param target_obj object; specifies the target object.
-- @param spotidx int; specifies the spot of the target object.
-- @param time int; if time is nil the default value is 0 i.e set the new position right away.
-- @return void.

function object:SetLocationToObjSpot(this, target_obj, spotidx, time)
end

--- Changes postion of the object to the current position of a random spot of given type of the target object smoothly for the specified time.
-- @cstyle point object::SetLocationToRandomObjSpot(object this, object target_obj, int spot_type, int time = 0).
-- @param target_obj object specifies the target object.
-- @param spot_type int specifies the spot type.
-- @param time if time is nil the default value is 0, or set the new position right away.
-- @return void.

function object:SetLocationToRandomObjSpot(this, target_obj, spot_type, time)
end

--- Changes postion of the object to the current position of a random spot of given type in specified state of the target object smoothly for the specified time.
-- @cstyle point object::SetLocationToRandomObjSpot(object this, object target_obj, int spotidx, int time = 0).
-- @param target_obj object specifies the target object.
-- @param state int specifies the state.
-- @param spot_type int specifies the spot type.
-- @param time if time is nil the default value is 0, or set the new position right away.
-- @return void.

function object:SetLocationToRandomObjStateSpot(this, target_obj, state, spot_type, time)
end

--- Returns the angle of the object at which it is rotated around its rotation axis.
-- @cstyle int object::GetAngle(object this).
-- @return int in minutes.

function object:GetAngle()
end

--- Smoothly turns the object to the given angle around the rotation axis for the specified time.
-- @cstyle void object::SetAngle(object this, int angle, int time).
-- @param angle int; the angle in minutes.
-- @param time int; the time in ms for which the angle should be changed.
-- @return void.

function object:SetAngle(angle, time)
end

--- Returns the interpolated angle of the object in arcseconds.
-- @cstyle int object::GetVisualAngle(object this).
-- @return int; in minutes.

function object:GetVisualAngle()
end

--- Smoothly turns the object this to face point pt for the specified time.
-- @cstyle void object::Face(object this, point target, int time).
-- @cstyle void object::Face(object this, object target, int time).
-- @cstyle void object::Face(object this, object target, int time, spot, point offset).
-- @param target point/object; The point or object to face.
-- @param spot/offset; offset is relative to spot coordinate systemn 
-- @param time int; The time in 1/1000 sec for which the full turn should be performed.
-- @return void.

function object:Face(pt, time)
end

--- Returns the rotation axis of the object.
-- @cstyle point object::GetAxis(object this).
-- @return point; The axis vector of the given object.

function object:GetAxis()
end

--- Returns the intepolated rotation axis of the object.
-- @cstyle point object::GetVisualAxis(object this).
-- @return point; The exact axis vector of the given object.

function object:GetVisualAxis()
end


function object:GetVisualAxisXYZ()
end

--- Smoothly changes the object rotation axis over the specified time.
-- @cstyle void object::SetAxis(object this, point axis, int time).
-- @param axis point; that is the axis vector.
-- @param time int; the time in 1/1000 sec for which the angle should be changed.
-- @return void.

function object:SetAxis(axis, time)
end

--- Smoothly turns the object to the given axis and angle for the specified time. This method ensures proper interpolation avoiding discontinuities.
-- @cstyle void object::SetAxisAngle(object this, point axis, int angle, int time).
-- @param axis point; that is the axis vector.
-- @param angle int; the angle in minutes.
-- @param time int; the rotation time in ms.
-- @return void.

function object:SetAxisAngle(axis, angle, time)
end

function object:SetPosAxisAngle(pos, axis, angle, time)
end

--- Inverts the object's rotation axis.
-- @cstyle void object::InvertAxis().
-- @return void.

function object:InvertAxis()
end

--- Sets the direction (a 3D vector) the object's top is facing with an optional angle of rotation around the direction axis. If the 'time' property is specified, the object will reach the orientation specified in 'time' ms.
-- @cstyle void object::SetOrientation(point direction, int angle = 0, int time = 0).
-- @param direction point.
-- @param angle int; in minutes.
-- @param time int; in ms.

function object:SetOrientation(dir, angle, time)
end

--- Returns the direction the object's top is facing and the angle it's rotated around this axis.
-- @cstyle point, int object::GetOrientation().
-- @param time point, int.

function object:GetOrientation()
end

--- Rotates the object around the given axis and angle taking into account current object's orientation.
-- @cstyle void object::Rotate(object this, point axis, int angle, int time).
-- @param axis point; that is the axis vector.
-- @param angle int; the angle in minutes.
-- @param time int; the time in 1/1000 sec for which the angle should be changed.
-- @return point.

function object:Rotate(this, axis, angle, time)
end

--- Returns the object's visual face direction.
-- @cstyle int object::GetFaceDir(object self, int len).
-- @param len int; The desired length of the result vector.
-- @return point.

function object:GetFaceDir(len)
end

--- Returns angle to add to the current orientation angle of self object, so that the self object would face the other object.
-- @cstyle int object::AngleToObject(object self, object other).
-- @param other object.
-- @return int; angle from -180*60 to 180*60 (minutes).

function object:AngleToObject(other)
end

--- Returns angle to add to the current orientation angle of self object, so that the self object would face the point specified.
-- @cstyle int object::AngleToObject(object self, point pt).
-- @param pt point.
-- @return int; angle from -180*60 to 180*60 (minutes).

function object:AngleToPoint(point)
end

--- Returns the vector difference between the positions of self and other objects.
-- @cstyle int object::VectorTo2D(object self, object other).
-- @param other object.
-- @return int.

function object:VectorTo2D(other)
end

--- Returns the distance from self to the given object.
-- @cstyle int object::GetDist2D(object self, object other).
-- @param other object.
-- @return int.
function object:GetDist2D(other)
end

--- Returns a predicted position of the object after a time interval elapses.
-- The function uses the interpolation data from the last call to the object's 'SetPos' to return
-- a predicted position if no other call to 'SetPos' is made in the meantime. Have in mind that
-- this prediction has some problems with attached object if the extrapolate flag is true.
-- @cstyle point object::PredictPos(object self, int time, bool extrapolate).
-- @param time int - how many milliseconds ahead to predict; negative values will return former object positions.
-- @param extrapolate bool - whether to extrapolate beyond the time of the last 'SetPos'.
-- @return point.

function object:PredictPos(time, extrapolate)
end

--- Returns the visual(EXACT) distance from self to the given object.
-- @cstyle int object::GetVisualDist2D(object self, object other).
-- @param other object.
-- @return int.

function object:GetVisualDist2D(other)
end

--- Returns the distance from self to the given object.
-- @cstyle int object::GetDist(object self, object other).
-- @param other object.
-- @return int.

function object:GetDist(other)
end

--- Returns the visual(EXACT) distance from self to the given object.
-- @cstyle int object::GetVisualDist(object self, object other).
-- @param other object.
-- @return int.
function object:GetVisualDist(other)
end


--- Returns integer identifying the player whose is this object. Returns -1 if the object does not exist.
-- @cstyle int object::GetPlayer(object this).
-- @return int.

function object:GetPlayer()
end

--- Changes the player whose is this object to specified player.
-- @cstyle void object::SetPlayer(object this, int player).
-- @param player int; player number.
-- @return void.

function object:SetPlayer(player)
end

--- Set state nState to the object.
-- @cstyle int object::SetState(object this, int nState, int nFlags, int tCrossfade, int nSpeed, bool bChangeOnly).
-- @param nState int.
-- @param nFlags int; optional anim flags
-- @param tCrossfade int; optional custom crossfade time
-- @param nSpeed int; optional custom anim speed
-- @param bChangeOnly bool; optional skip the anim set if already the same
-- @return int; duration of the animation.

function object:SetState(nState, nFlags, tCrossfade, nSpeed, bChangeOnly)
end

--- Set state nState to the object and sleep the calling thread for a number of animation cycles or time.
-- @cstyle int object::PlayState(object this, int nState, int count).
-- @param nState int.
-- @param count int; if positive it's the number of animation loops to sleep; otherwise it specifies the amount of time to sleep.

function object:PlayState(nState, count)
end

--- Returns the current state of the object (-1 on invalid object).
-- @cstyle int object::GetState(object this).
-- @return int.

function object:GetState()
end

--- Freezes the object in a single frame of the specified animation; the frame is speficied by the time from animation start.
-- @cstyle void object::SetStaticFrame(object this, int nState, int nTime).
-- @param nState int.
-- @param nTime int.
-- @return void.

function object:SetStaticFrame(nState, time)
end

--- Returns true if the object's entity has this state.
-- @cstyle bool object::HasState(object this, int state).
-- @param state state of the obejct's entity to be checked.
-- @return bool.

function object:HasState(state)
end


--- Returns the scale of the object (-1 if the object does not exist).
-- @cstyle int object::GetScale(object this).
-- @return int.

function object:GetScale()
end

--- Sets the specified scale to the object if it exists.
-- @cstyle void object::SetScale(object this, int scale).
-- @param scale int.
-- @return void.

function object:SetScale(scale)
end

--- Return the final scaling of an object, that take into account parent object scale and spot's scale to which the object is attached.
-- @cstyle int object::GetWorldScale(object this).
-- @return int.

function object:GetWorldScale()
end

--- Returns the duration of the animation assigned with the specified state (returns -1 if the object does not exist);apply speed modifiers when used with object parameter.
-- @cstyle int object::GetAnimDuration(object this, int state) or GetAnimDuration(entity, int state).
-- @param state int; If parameter is ommited the funtion return the animation duration of the current state.
-- @return int.

function object:GetAnimDuration(state)
end

--- Returns how much time has passed since current animation started (time from last call to SetState).
-- @cstyle int object::TimeFromAnimStart(object this).
-- @return int.

function object:TimeFromAnimStart()
end

--- Returns remaining time to the end of currently played animation of the object. Modified by animation speed modifier!.
-- @cstyle int object::TimeToAnimEnd(object this).
-- @return int.

function object:TimeToAnimEnd()
end

--- Returns remaining time to the end of currently interpolated position change.
-- @cstyle int object::TimeToPosInterpolationEnd(object this).
-- @return int.

function object:TimeToPosInterpolationEnd()
end

--- Returns remaining time to the end of currently interpolated angle change.
-- @cstyle int object::TimeToAngleInterpolationEnd(object this).
-- @return int.

function object:TimeToAngleInterpolationEnd()
end

--- Returns remaining time to the end of currently interpolated angle change.
-- @cstyle int object::TimeToAxisInterpolationEnd(object this).
-- @return int.

function object:TimeToAxisInterpolationEnd()
end

--- Returns the max remaining time to the end of currently interpolated pos, angle and axis changes.
-- @cstyle int object::TimeToInterpolationEnd(object this).
-- @return int.

function object:TimeToInterpolationEnd()
end

--- Stops the pos, angle and axis interpolations.
-- @cstyle void object::StopInterpolation(object this).
-- @return void.

function object:StopInterpolation()
end

--- Returns whether an object is in a group.
-- @cstyle bool object::IsGrouped(object this).
-- @return bool.
-- @see Group.
-- @see Ungroup.

function object:IsGrouped()
end

--- Changes object's sound.
-- @cstyle void object::SetSound(string sound[, string type], int volume = -1, int fade_time = 0, bool looping).
-- @param sound string; either a sound file or a sound bank.
-- @param type string; sound type. used if sound is a file name. if sound is a sound bank it has to be omitted.
-- @param volume int; specifying the volume of the sound between 0 and 1000 (default is used the sound bank volume).
-- @param fade_time int; the cross-fade time if changing the sound state.
-- @param looping bool; specifies if the sound should be looping. (Use the sound bank flag by default)
-- @param loud_distance int; specifies if the distance whithin which the sound is played at max volume
-- @return bool; true if the operation is successful;

function object:SetSound(sound, __type, volume, fade_time, looping, loud_distance)
end

--- Changes object's sound state to silent. Breaks the current object sound, if playing.
-- @cstyle void object::StopSound(object this, int fade_time = 0).
-- @return void.

function object:StopSound(fade_time)
end

--- Changes object's sound volume.
-- @cstyle void object::SetSoundVolume(int volume, int time = 0).
-- @param volume int; volume between 0 and 1000.
-- @param time int; interpolation time, 0 by default.
-- @return void.

function object:SetSoundVolume(volume, time)
end

--- Returns the color modifier of an object.
-- @cstyle int object::GetColorModifier().
-- @return int; As argb.

function object:GetColorModifier()
end

--- Sets the color modifier of an object.
-- @cstyle void object::SetColorModifier(int argb).
-- @param argb int as argb.
-- @return void.

function object:SetColorModifier(argb)
end

--- Returns the opacity the object is rendered with.
-- @cstyle int object::GetOpacity(object this).
-- @return int; Returns the opacitiy of the object - 0 for invisible to 100 for visible intransparent.
function object:GetOpacity()
end

--- Set object's rendering opacity.
-- @cstyle void object::SetOpacity(object this, int val, int time, bool recursive).
-- @param val int; 0 for invisible to 100 for visible intransparent.
-- @return void.

function object:SetOpacity(val, time, recursive)
end

--- Specifies a new texture for the objetct's model; DEBUG PURPOSES ONLY!.
-- @cstyle void object::SetDebugTexture(string texture_file).
-- @param texture_file string; the path to the new texture.
-- @return void.
function object:SetDebugTexture(texture_file)
end

--- Destroys the render object of the self object.
-- @cstyle void object::DestroyRenderObj(object self).
-- @return void.

function object:DestroyRenderObj()
end

--- Return the number of triangles in the given object's model; use these only for diagnostic, because they precache object geometry.
-- @cstyle int object::GetNumTris(object self).
-- @return int.
function object:GetNumTris()
end

--- Return the number of vertices in the given object's model; use these only for diagnostic, because they precache object geometry.
-- @cstyle int object::GetNumVertices(object self).
-- @return int.
function object:GetNumVertices()
end

--- Returns the name of the self particle object.
-- @cstyle string object::GetParticlesName(object self).
-- @return string.
function object:GetParticlesName()
end

--- Gets the current self illumination modulation.
-- @cstyle int object::GetSIModulation().
-- @return int; 0 for no self illumination; 100 for max self illumination.

function GetSIModulation()
end

--- Sets the current self illumination modulation.
-- @cstyle void object::SetSIModulation(int modulation).
-- @param modulation int; 0 for no self illumination; 100 for max self illumination.
-- @return void.

function SetSIModulation(modulation)
end

--- Finds the nearest object from the given object list to the given point.
-- @cstyle object FindNearestObject(objlist ol, point pt[, function filter]).
-- @param ol; the object list to search in.
-- @param pt; the point or object to which distance is measured; if the point is with invalid Z the measured distances are 2D, otherwise they are 3D.
-- @param filter; optional object filter.
-- @return object or false (if the object list is empty).

function FindNearestObject(objlist, pt, filter)
end

-- Returns a table with all valid states for current object.
-- @cstyle table EnumValidStates() or EnumValidStates(entity)
function EnumValidStates()
end

function object:GetAnim(channel)
end

--- Returns a table with all anim info.
-- @cstyle table object::GetAnimDebug( int channel ).
-- @param channel int; the index of the channel, 1 <= channel <= 8.
-- @return table; The channel animation info.
function object:GetAnimDebug(channel)
end

--- Set new animation to an object's animation channel.
-- @cstyle void object::SetAnim( int channel, int anim, int flags = 0, int crossfade = -1, int speed = 1000, int weight = 100, int phase = 0 ).
-- @param channel int; the index of the channel, 1 <= channel <= 8.
-- @param anim int; the animation (state) to set.
-- @param flags int; the animation flags, see geObject.h for details.
-- @param crossfade int; the animation crossfade time, see geObject.h for details.
-- @param speed int; the animation speed, normal speed is 1000, can be ignored via the flags.
-- @param weight int; the animation weight, relative to the other animation weights. weight = 0 will hide the animation.
-- @param phase int; the animation phase.
-- @return void.

function object:SetAnim(channel,anim,flags,crossfade,speed,weight,phase)
end

--- Returns the animation flags of object's animation channel.
-- @cstyle int object::GetAnimFlags( int channel = 0 ).
-- @param channel int; the index of the channel, 1 <=  channel <= 8
-- @return int; The channel animation flags.

function object:GetAnimFlags(channel)
end

--- Return the current animation speed for an object's channel
-- @cstyle int object::GetAnimSpeed( int channel = 0 ).
-- @param channel int; the index of the channel, 1 <= channel <= 8.
-- @return int; Current animation speed in promiles.

function object:GetAnimSpeed(channel)
end

--- Set the new object's animation channel speed.
-- @cstyle void object::SetAnimSpeed( int channel, int speed, int time = 0 ).
-- @param channel int; the index of the channel, 1 <= channel <= 8.
-- @param speed int; the new speed to set in promiles, speed >= 0.
-- @param time int; the time we want the animation to reach the given speed, relative to the current time, so time=0 means right now.
-- @return void.

function object:SetAnimSpeed(channel,speed,time)
end

--- Return the animation weight of object's animation channel.
-- @cstyle int object::GetAnimWeight( int channel = 0 ).
-- @param channel int; the index of the channel, 1 <= channel <= 8.
-- @return int; Current animation weight.

function object:GetAnimWeight(channel)
end

--- Set the new object's animation channel weight.
-- @cstyle void object::SetAnimWeight( int channel, int weight, int time = 0 ).
-- @param channel int; the index of the channel, 1 <= channel <= 8.
-- @param weight int; the new weight to set, weight >= 0.
-- @param time int; the time we want the animation to reach the given weight, relative to the current time, so time=0 means right now.
-- @return void.

function object:SetAnimWeight(channel,weight,time,easing)
end

--- Return the animation start time of object's animation channel.
-- @cstyle int object::GetAnimStartTime( int channel ).
-- @param channel int; the index of the channel, 1 <= channel <= 8.
-- @return int; Animation start time.

function object:GetAnimStartTime(channel)
end

--- Set the object's animation channel animation start time.
-- @cstyle void object::SetAnimStartTime( int channel, int time ).
-- @param channel int; the index of the channel, 1 <= channel <= 8.
-- @param time int; the new animation start time, absolute.
-- @return void.

function object:SetAnimStartTime(channel,time)
end

--- Returns the object's animation channel current animation phase (offset from the beginning, 0 <= phase <= duration), which can be zero only for non-looping animations.
-- @cstyle int object::GetAnimPhase( int channel = 0 ).
-- @param channel int; the index of the channel, 1 <= channel <= 8.
-- @return int; animation phase.

function object:GetAnimPhase(channel)
end

--- Set the object's animation channel new phase.
-- @cstyle void object::SetAnimPhase( int channel, int phase ).
-- @param channel int; the index of the channel, 1 <= channel <= 8.
-- @return void.

function object:SetAnimPhase(channel,phase)
end

--- Clears the animation channel of an object. Works only for 2 <= channel <= 8.
-- @cstyle void object::ClearAnim( int channel ).
-- @param channel int; the index of the channel, 2 <= channel <= 8.
-- @return void.

function object:ClearAnim(channel)
end

--- Returns if an animation is used in any animation channel of an object.
-- @cstyle bool object::HasAnim( int anim ).
-- @param anim int; the animation (state) to check for.
-- @return bool; animation is used.

function object:HasAnim(anim)
end

--- Returns if an animation is used in any animation channel of an object and in what channel exactly.
-- @cstyle int object::FindAnimChannel( int anim ).
-- @param anim int; the animation (state) to check for.
-- @return int; the first animation channel who uses the animation, 0 if not present.

function object:FindAnimChannel(anim)
end

--- Returns if the base state (channel=1) is static (not animated).
-- @cstyle bool object::IsStaticAnim() or IsStaticAnim(entity).
-- @return bool; true if the state is not-animated, false otherwise.

function object:IsStaticAnim()
end

--- Returns if an object's animation channel animation is looping or not.
-- @cstyle bool object::IsAnimLooping( int channel = 0 ).
-- @param channel int; the index of the channel, 1 <= channel <= 8.
-- @return bool; true if the animation is looping, false otherwise.

function object:IsAnimLooping(channel)
end

--- Returns the index of the animation component of the current animation of channel with the specified label
-- @cstyle int object::GetAnimComponentIndexFromLabel(int channel)
-- @param channel int; the index of the channel, 1 <= channel <= 8.
-- @param label string; the label of the desired animation component, specified in the AnimComponentDef
-- @ return int; a positive index if the animation component exists, 0 otherwise

function object:GetAnimComponentIndexFromLabel(channel, label)
end

--- Sets the runtime parameters for the animation component running on channel
-- @cstyle void object::SetAnimComponentTarget(int channel, int animComponentIndex, params...)
-- @param channel int; the index of the channel, 1 <= channel <= 8.
-- @param animComponentIndex int; the index of the animation component, 1 <= index <= 3
-- @param params ...; number and type of parameters depends on the animation component type. can be gameObject and spotName, position or other special values
-- @ return void; 

function object:SetAnimComponentTarget(channel, animComponentIndex, params)
end

--- Removes the targets of an animation component(s) running on a channel
-- @cstyle int object::RemoveAnimComponentTarget(int channel)
-- @cstyle int object::RemoveAnimComponentTarget(int channel, int animComponentIndex)
-- @param channel int; the index of the channel, 1 <= channel <= 8.
-- @param animComponentIndex int; the index of the animation component, 1 <= index <= 3. if missing, removes the targets of all components
-- @ return void;

function object:RemoveAnimComponentTarget(channel, animComponentIndex)
end

--- Return whether an error occured while loading this state; precaches the state if it isn't loaded (slow!).
-- @cstyle bool IsErrorState( entity, anim ) or  bool object::IsErrorState( entity, anim ).
-- @param entity string; the entity name.
-- @param anim int; the animation (state).
-- @return bool; is this an "error" state (rotating cube).

function IsErrorState(entity, anim)
end

--- Return if the animation (state) is looping or not.
-- @cstyle bool IsEntityAnimLooping( entity, anim ).
-- @param entity string; the entity name.
-- @param anim int; the animation (state).
-- @return bool; Is animation looped or not.

function IsEntityAnimLooping(entity, anim)
end

--- Returns the number of valid states for current object.
--@cstyle int obj:GetNumStates() or int GetNumStates(entity).
function GetNumStates()
end

--- Returns the state of the Mirrored flag for current object.
-- @cstyle bool GetMirrored()
-- @return bool, true if Mirrored is set
function GetMirrored()
end

--- Tests if a vertical ray through given point is intersecting the current object or not.
-- @cstyle bool IsPointOverObject()
-- @return bool; true if there is intersection point.
function IsPointOverObject()
end

--- Sets an indexed userdata value for current object.
-- @cstyle void SetCustomData(int index, value)
-- @param index int; the index of the userdata value
-- @param value uint32 or pstr; the value to set
function SetCustomData(index, value)
end

--- Gets an indexed userdata value from current object.
-- @cstyle uint32 GetCustomData(int index)
-- @param index int; the index of the userdata value
-- @return int; the specified userdata value
function GetCustomData(index)
end

--- Gets the bbox formed by the requested surfaces of the coresponding object.
-- @cstyle box, int GameObject::GetSurfacesBBox(int request_surfaces = -1, int fallback_surfaces = 0)
-- @param request_surfaces int; the requested surfaces (e.g. EntitySurfaces.Selection + EntitySurfaces.Build). By default (-1) all surfaces are requested.
-- @param fallback_surfaces int; fallback case if the requested surfaces are missing. By default (0) no falllback will be matched.
-- @return box; the resulting bounding box
-- @return int; the matched surface flags
function object:GetSurfacesBBox(request_surfaces, fallback_surfaces)
end


--- Return a list with attached objects.
-- @cstyle GameObject* GameObject::GetAttaches(string *classes = null)
-- @param classes table; List of attach classes. This parameter is optional.
function object:GetAttaches(classes)
end

--- Destroy attached objects and return their count.
-- @cstyle int GameObject::DestroyAttaches(string *classes = null, function filter = null)
-- @param classes table; List of class names or single class name. This parameter is optional.
-- @param exec function; Callback function. First parameter if class is omitted. This parameter is optional. Accepts variable number of parameters.
function object:DestroyAttaches(classes, filter, ...)
end

--- Count attached objects.
-- @cstyle int GameObject::CountAttaches(string *classes = null, function filter = null)
-- @param classes table; List of class names or single class name. This parameter is optional.
-- @param exec function; optional callback function. First parameter if class is omitted. This parameter is optional. Accepts variable number of parameters.
function object:CountAttaches(classes, filter, ...)
end

--- Call a lua callback function for each attach and return the number of callbacks.
-- @cstyle int GameObject::ForEachAttach(string *classes, function exec)
-- @param classes table; List of class names or single class name. This parameter is optional.
-- @param exec function; Callback function. First parameter if class is omitted. The loop is terminated if true equivalent value is returned. Accepts variable number of parameters.
function object:ForEachAttach(classes, exec, ...)
end

--- Check if the object has a valid Z coordinate.
-- @cstyle bool GameObject::IsValidZ()
function object:IsValidZ()
end

--- Check if the object has the same position.
-- @cstyle bool object::IsEqualPos(point).
-- @return bool;
function object:IsEqualPos(pos)
end

--- Check if the object has the same 2D position.
-- @cstyle bool object::IsEqualPos2D(point).
-- @return bool;
function object:IsEqualPos2D(pos)
end

--- Check if the object has the same visual position.
-- @cstyle bool object::IsEqualVisualPos(point).
-- @return bool;
function object:IsEqualVisualPos(pos)
end

--- Check if the object has the same visual 2D position.
-- @cstyle bool object::IsEqualVisualPos2D(point).
-- @return bool;
function object:IsEqualVisualPos2D(pos)
end

--- Computes an average point from N points or objects.
-- @cstyle point AveragePoint(point pt1, object pt2, ...)
-- @cstyle point AveragePoint(table pts [, int count])
-- @return point;
function AveragePoint(pt1, pt2, ...)
end

--- Computes an average 2D point from N points or objects.
-- @cstyle point AveragePoint2D(point pt1, object pt2, ...)
-- @cstyle point AveragePoint2D(table pts [, int count])
-- @return point;
function AveragePoint2D(pt1, pt2, ...)
end

-- @cstyle int object::GetPfClass().
function object:GetPfClass()
end