forked from adamredwoods/minib3d-monkey
-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.monkey
1526 lines (1288 loc) · 41.2 KB
/
functions.monkey
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
' Procedural Interfaces
Import minib3d
#rem
bbdoc: Minib3d Only
about:
This command is included as MiniB3D currently does Not have the same buffer commands as Blitz3D.
Use this command To copy a region of the backbuffer To a texture.
The region copied from the backbuffer will start at (0,0), And End at the texture's width and height.
Therefore If you want To copy the whole of a 3D scene To a texture, you must first resize the camera viewport To the size of
the texture, use RenderWorld To render the camera, Then use this command To copy the backbuffer To the texture.
Note that If a texture has the mipmap flag enabled (by Default it does), Then this command must be called For each mipmap,
otherwise the texture will appear To fade into a different, non-matching mipmap as you move away from it. A routine similar To
the one below will copy the backbuffer To each mipmap, making sure the camera viewport is the same size as the mipmap.
For i=0 Until tex.CountMipmaps()
CameraViewport 0,0,tex.MipmapWidth(),tex.MipmapHeight()
Renderworld
BackBufferToTex(tex,i)
Next
It may be easier To disable the mipmap flag For the texture. To do so, use ClearTextureFilters after calling Graphics3D
(the mipmap flag is a Default filter).
If you are using this command To copy To a cubemap texture, use SetCubeFace To first Select which portion of the texture you
will be copying To. Note that in MiniB3D mipmaps are Not used by cubemaps, so ignore the information about mipmaps For normal
textures above.
See the cubemap.bmx example included with MiniB3D To learn more about cubemapping.
#End
Function BackBufferToTex(tex:TTexture,mipmap_no=0,frame=0)
tex.BackBufferToTex(mipmap_no,frame)
End
#rem
bbdoc: Minib3d Only
about:
This command is the equivalent of Blitz3D's MeshCullBox command.
It is used To set the radius of a mesh's 'cull sphere' - if the 'cull sphere' is not inside the viewing area, the mesh will not
be rendered.
A mesh's cull radius is set automatically, therefore in most cases you will not have to use this command.
One time you may have To use it is For animated meshes where the Default cull radius may Not take into account all animation
positions, resulting in the mesh being wrongly culled at extreme positions.
#End
Function MeshCullRadius(ent:TEntity,radius#)
ent.MeshCullRadius(radius)
End
' Blitz3D functions, A-Z
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=AddMesh">Online Help</a>
#End
Function AddMesh:TMesh(mesh1:TMesh,mesh2:TMesh)
mesh1.AddMesh(mesh2)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=AddTriangle">Online Help</a>
#End
Function AddTriangle:Int(surf:TSurface,v0,v1,v2)
Return surf.AddTriangle(v0,v1,v2)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=AddVertex">Online Help</a>
#End
Function AddVertex:Int(surf:TSurface,x#,y#,z#,u#=0.0,v#=0.0,w#=0.0)
Return surf.AddVertex(x,y,z,u,v,w)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=AlignToVector">Online Help</a>
#End
Function AlignToVector(ent:TEntity, vx:Float,vy:Float,vz:Float,axis:Int,rate:Float=1.0)
ent.AlignToVector(vx,vy,vz,axis,rate)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=AmbientLight">Online Help</a>
#End
Function AmbientLight(r#,g#,b#)
TLight.AmbientLight(r,g,b)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=AntiAlias">Online Help</a>
#End
Function AntiAlias(samples)
TRender.AntiAlias(samples)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=Animate">Online Help</a>
#End
Function Animate(ent:TEntity,mode=1,speed#=1.0,seq%=0,trans%=0)
ent.Animate(mode,speed,seq,trans)
End
Function AnimateTexture(ent:TEntity, frame:Int, loop:Bool=False, i:Int=0)
ent.AnimateTexture(frame, loop, i)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=Animating">Online Help</a>
#End
Function Animating(ent:TEntity)
Return ent.Animating()
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=AnimLength">Online Help</a>
#End
Function AnimLength(ent:TEntity)
Return ent.AnimLength()
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=AnimSeq">Online Help</a>
#End
Function AnimSeq(ent:TEntity)
Return ent.AnimSeq()
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=AnimTime">Online Help</a>
#End
Function AnimTime#(ent:TEntity)
Return ent.AnimTime()
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=BrushAlpha">Online Help</a>
#End
Function BrushAlpha(brush:TBrush,a#)
brush.BrushAlpha(a)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=BrushBlend">Online Help</a>
#End
Function BrushBlend(brush:TBrush,blend)
brush.BrushBlend(blend)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=BrushColor">Online Help</a>
#End
Function BrushColor(brush:TBrush,r#,g#,b#)
brush.BrushColor(r,g,b)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=BrushFX">Online Help</a>
#End
Function BrushFX(brush:TBrush,fx)
brush.BrushFX(fx)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=BrushShininess">Online Help</a>
#End
Function BrushShininess(brush:TBrush,s#)
brush.BrushShininess(s)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=BrushTexture">Online Help</a>
#End
Function BrushTexture(brush:TBrush,tex:TTexture,frame:Int=0,index:Int=0)
brush.BrushTexture(tex,frame,index)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CameraClsColor">Online Help</a>
#End
Function CameraClsColor(cam:TCamera,r#,g#,b#)
cam.CameraClsColor(r,g,b)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CameraClsMode">Online Help</a>
#End
Function CameraClsMode(cam:TCamera,cls_depth,cls_zbuffer)
cam.CameraClsMode(cls_depth,cls_zbuffer)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CameraFogColor">Online Help</a>
#End
Function CameraFogColor(cam:TCamera,r#,g#,b#)
cam.CameraFogColor(r,g,b)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CameraFogMode">Online Help</a>
#End
Function CameraFogMode(cam:TCamera,mode)
cam.CameraFogMode(mode)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CameraFogRange">Online Help</a>
#End
Function CameraFogRange(cam:TCamera,near#,far#)
cam.CameraFogRange(near,far)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CameraPick">Online Help</a>
#End
Function CameraPick:TEntity(cam:TCamera,x#,y#)
Return TPick.CameraPick(cam,x,y)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CameraProject">Online Help</a>
#End
Function CameraProject(cam:TCamera,x#,y#,z#)
cam.CameraProject(x,y,z)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CameraProjMode">Online Help</a>
#End
Function CameraProjMode(cam:TCamera,mode)
cam.CameraProjMode(mode)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CameraRange">Online Help</a>
#End
Function CameraRange(cam:TCamera,near#,far#)
cam.CameraRange(near,far)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CameraViewport">Online Help</a>
#End
Function CameraViewport(cam:TCamera,x,y,width,height)
cam.CameraViewport(x,y,width,height)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CameraZoom">Online Help</a>
#End
Function CameraZoom(cam:TCamera,zoom#)
cam.CameraZoom(zoom)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=ClearCollisions">Online Help</a>
#End
Function ClearCollisions()
TCollisionPair.Clear()
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=ClearSurface">Online Help</a>
#End
Function ClearSurface(surf:TSurface,clear_verts=True,clear_tris=True)
surf.ClearSurface(clear_verts,clear_tris)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=ClearTextureFilters">Online Help</a>
#End
Function ClearTextureFilters()
TTexture.ClearTextureFilters()
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=ClearWorld">Online Help</a>
#End
Function ClearWorld(entities=True,brushes=True,textures=True)
TRender.ClearWorld(entities,brushes,textures)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CollisionEntity">Online Help</a>
#End
Function CollisionEntity:TEntity(ent:TEntity,index)
Return ent.CollisionEntity(index)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=Collisions">Online Help</a>
#End
Function Collisions(src_no,dest_no,method_no,response_no:Int=0)
TCollisionPair.Collisions(src_no,dest_no,method_no,response_no)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CollisionNX">Online Help</a>
#End
Function CollisionNX#(ent:TEntity,index)
Return ent.CollisionNX(index)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CollisionNY">Online Help</a>
#End
Function CollisionNY#(ent:TEntity,index)
Return ent.CollisionNY(index)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CollisionNZ">Online Help</a>
#End
Function CollisionNZ#(ent:TEntity,index)
Return ent.CollisionNZ(index)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CollisionSurface">Online Help</a>
#End
Function CollisionSurface:TSurface(ent:TEntity,index)
Return ent.CollisionSurface(index)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CollisionTime">Online Help</a>
#End
Function CollisionTime#(ent:TEntity,index)
Return ent.CollisionTime(index)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CollisionTriangle">Online Help</a>
#End
Function CollisionTriangle(ent:TEntity,index)
Return ent.CollisionTriangle(index)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CollisionX">Online Help</a>
#End
Function CollisionX#(ent:TEntity,index)
Return ent.CollisionX(index)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CollisionY">Online Help</a>
#End
Function CollisionY#(ent:TEntity,index)
Return ent.CollisionY(index)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CollisionZ">Online Help</a>
#End
Function CollisionZ#(ent:TEntity,index)
Return ent.CollisionZ(index)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CountChildren">Online Help</a>
#End
Function CountChildren(ent:TEntity)
Return ent.CountChildren()
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CountCollisions">Online Help</a>
#End
Function CountCollisions(ent:TEntity)
Return ent.CountCollisions()
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CopyEntity">Online Help</a>
#End
Function CopyEntity:TEntity(ent:TEntity,parent:TEntity=Null)
Return ent.CopyEntity(parent)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CopyMesh">Online Help</a>
#End
Function CopyMesh:TMesh(mesh:TMesh,parent:TEntity=Null)
Return mesh.CopyMesh(parent)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CountSurfaces">Online Help</a>
#End
Function CountSurfaces(mesh:TMesh)
Return mesh.CountSurfaces()
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CountTriangles">Online Help</a>
#End
Function CountTriangles(surf:TSurface)
Return surf.CountTriangles()
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CountVertices">Online Help</a>
#end
Function CountVertices(surf:TSurface)
Return surf.CountVertices()
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CreateBrush">Online Help</a>
#end
Function CreateBrush:TBrush(r#=255.0,g#=255.0,b#=255.0)
Return TBrush.CreateBrush(r,g,b)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CreateCamera">Online Help</a>
#end
Function CreateCamera:TCamera(parent:TEntity=Null)
Return TCamera.CreateCamera(parent)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CreateCone">Online Help</a>
#End
Function CreateCone:TMesh(segments=8,solid=True,parent:TEntity=Null)
Return TMesh.CreateCone(segments,solid,parent)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CreateCylinder">Online Help</a>
#End
Function CreateCylinder:TMesh(segments=8,solid=True,parent:TEntity=Null)
Return TMesh.CreateCylinder(segments,solid,parent)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CreateCube">Online Help</a>
#End
Function CreateCube:TMesh(parent:TEntity=Null)
Return TMesh.CreateCube(parent)
End
Function CreateGrid:TMesh(x_seg:Int, y_seg:Int, repeat_tex:Bool=False , parent:TEntity=Null)
Return TMesh.CreateGrid(x_seg, y_seg, repeat_tex, parent)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CreateMesh">Online Help</a>
#End
Function CreateMesh:TMesh(parent:TEntity=Null)
Return TMesh.CreateMesh(parent)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CreateLight">Online Help</a>
#End
Function CreateLight:TLight(light_type=1,parent:TEntity=Null)
Return TLight.CreateLight(light_type,parent)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CreatePivot">Online Help</a>
#End
Function CreatePivot:TPivot(parent:TEntity=Null)
Return TPivot.CreatePivot(parent)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CreateSphere">Online Help</a>
#End
Function CreateSphere:TMesh(segments=8,parent:TEntity=Null)
Return TMesh.CreateSphere(segments,parent)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CreateSprite">Online Help</a>
#End
' Sprite
Function CreateSprite:TSprite(parent:TEntity=Null)
Return TSprite.CreateSprite(parent)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CreateSurface">Online Help</a>
#End
Function CreateSurface:TSurface(mesh:TMesh,brush:TBrush=Null)
Return mesh.CreateSurface(brush)
End
Function CreateText3D:TText(str$ = "", font$="", num_chars:Int = 96, c_pixels:Int=9, pad:Int = 0 )
Local tt:TText = TText.CreateText(Null, str,font,num_chars,c_pixels,pad, False)
Return tt
End
Function CreateText2D:TText(camx:TCamera, str$ = "", font$="", num_chars:Int = 96, c_pixels:Int=9, pad:Int = 0 )
Local tt:TText = TText.CreateText(camx,str,font,num_chars,c_pixels,pad, True)
Return tt
End
Function CreateText2D:TText(str$ = "", font$="", num_chars:Int = 96, c_pixels:Int=9, pad:Int = 0 )
Local tt:TText = TText.CreateText(Null,str,font,num_chars,c_pixels,pad, True)
Return tt
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=CreateTexture">Online Help</a>
#End
Function CreateTexture:TTexture(width,height,flags=1,frames=1)
Return TTexture.CreateTexture(width,height,flags,frames)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=DeltaPitch">Online Help</a>
#End
Function DeltaPitch#(ent1:TEntity,ent2:TEntity)
Return ent1.DeltaPitch(ent2)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=DeltaYaw">Online Help</a>
#End
Function DeltaYaw#(ent1:TEntity,ent2:TEntity)
Return ent1.DeltaYaw(ent2)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=EntityAlpha">Online Help</a>
#End
Function EntityAlpha(ent:TEntity,alpha#)
ent.EntityAlpha(alpha)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=EntityAutoFade">Online Help</a>
#End
Function EntityAutoFade(ent:TEntity,near#,far#)
ent.EntityAutoFade(near,far)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=EntityBlend">Online Help</a>
#End
Function EntityBlend(ent:TEntity,blend)
ent.EntityBlend(blend)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=EntityBox">Online Help</a>
#End
Function EntityBox(ent:TEntity,x#,y#,z#,w#,h#,d#)
ent.EntityBox(x,y,z,w,h,d)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=EntityClass">Online Help</a>
#End
Function EntityClass$(ent:TEntity)
Return ent.EntityClass()
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=EntityCollided">Online Help</a>
#End
Function EntityCollided:TEntity(ent:TEntity,type_no)
Return ent.EntityCollided(type_no)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=EntityColor">Online Help</a>
#End
Function EntityColor(ent:TEntity,red#,green#,blue#)
ent.EntityColor(red,green,blue)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=EntityDistance">Online Help</a>
#End
Function EntityDistance#(ent1:TEntity,ent2:TEntity)
Return ent1.EntityDistance(ent2)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=EntityFX">Online Help</a>
#End
Function EntityFX(ent:TEntity,fx)
ent.EntityFX(fx)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=EntityInView">Online Help</a>
#End
Function EntityInView(ent:TEntity,cam:TCamera)
Return cam.EntityInView(ent)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=EntityName">Online Help</a>
#End
Function EntityName$(ent:TEntity)
Return ent.EntityName()
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=EntityOrder">Online Help</a>
#End
Function EntityOrder(ent:TEntity,order%)
ent.EntityOrder(order)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=EntityParent">Online Help</a>
#End
Function EntityParent(ent:TEntity,parent_ent:TEntity,glob:Int=True)
ent.EntityParent(parent_ent,glob)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=EntityPick">Online Help</a>
#End
Function EntityPick:TEntity(ent:TEntity,range#)
Return TPick.EntityPick(ent,range)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=EntityPickMode">Online Help</a>
#End
Function EntityPickMode(ent:TEntity,pick_mode%,obscurer?=True)
ent.EntityPickMode(pick_mode,obscurer)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=EntityPitch">Online Help</a>
#End
Function EntityPitch#(ent:TEntity,glob?=False)
Return ent.EntityPitch(glob)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=EntityRadius">Online Help</a>
#End
Function EntityRadius(ent:TEntity,radius_x#,radius_y#=0.0)
ent.EntityRadius(radius_x,radius_y)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=EntityRoll">Online Help</a>
#End
Function EntityRoll#(ent:TEntity,glob?=False)
Return ent.EntityRoll(glob)
End
Function EntityScaleX:Float(ent:TEntity,glob?=False)
Return ent.EntityScaleX(glob)
End
Function EntityScaleY:Float(ent:TEntity,glob?=False)
Return ent.EntityScaleY(glob)
End
Function EntityScaleZ:Float(ent:TEntity,glob?=False)
Return ent.EntityScaleZ(glob)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=EntityShininess">Online Help</a>
#End
Function EntityShininess(ent:TEntity,shine#)
ent.EntityShininess(shine)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=EntityTexture">Online Help</a>
#End
Function EntityTexture(ent:TEntity,tex:TTexture,frame%=0,index%=0)
TMesh(ent).EntityTexture(tex,frame,index)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=EntityType">Online Help</a>
#End
Function EntityType(ent:TEntity,type_no%,recursive?=False)
ent.EntityType(type_no,recursive)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=EntityVisible">Online Help</a>
#End
Function EntityVisible(src_ent:TEntity,dest_ent:TEntity)
Return TPick.EntityVisible(src_ent,dest_ent)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=EntityX">Online Help</a>
#End
Function EntityX#(ent:TEntity,glob?=False)
Return ent.EntityX(glob)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=EntityY">Online Help</a>
#End
Function EntityY#(ent:TEntity,glob?=False)
Return ent.EntityY(glob)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=EntityYaw">Online Help</a>
#End
Function EntityYaw#(ent:TEntity,glob?=False)
Return ent.EntityYaw(glob)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=EntityZ">Online Help</a>
#End
Function EntityZ#(ent:TEntity,glob?=False)
Return ent.EntityZ(glob)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=ExtractAnimSeq">Online Help</a>
#End
Function ExtractAnimSeq(ent:TEntity,first_frame%,last_frame%,seq%=0)
Return ent.ExtractAnimSeq(first_frame,last_frame,seq)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=FindChild">Online Help</a>
#End
Function FindChild:TEntity(ent:TEntity,child_name$)
Return ent.FindChild(child_name)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=FindSurface">Online Help</a>
#End
Function FindSurface:TSurface(mesh:TMesh,brush:TBrush)
Return mesh.FindSurface(brush)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=FitMesh">Online Help</a><p>
#End
Function FitMesh:TMesh(mesh:TMesh,x#,y#,z#,width#,height#,depth#,uniform%=False)
mesh.FitMesh(x,y,z,width,height,depth,uniform)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=FlipMesh">Online Help</a>
#End
Function FlipMesh:TMesh(mesh:TMesh)
mesh.FlipMesh()
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=FreeBrush">Online Help</a>
#End
Function FreeBrush(brush:TBrush)
brush.FreeBrush()
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=FreeEntity">Online Help</a>
#End
Function FreeEntity(ent:TEntity)
ent.FreeEntity()
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=FreeTexture">Online Help</a>
#End
Function FreeTexture:TTexture(tex:TTexture)
tex.FreeTexture()
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=GetBrushTexture">Online Help</a>
#End
Function GetBrushTexture:TTexture(brush:TBrush,index%=0)
Return TTexture.GetBrushTexture(brush,index)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=GetChild">Online Help</a>
#End
Function GetChild:TEntity(ent:TEntity,child_no)
Return ent.GetChild(child_no)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=GetEntityBrush">Online Help</a>
#End
Function GetEntityBrush:TBrush(ent:TEntity)
TBrush.GetEntityBrush(ent)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=GetEntityType">Online Help</a>
#End
Function GetEntityType(ent:TEntity)
Return ent.GetEntityType()
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=ResetEntity">Online Help</a>
#End
Function GetMatElement#(ent:TEntity,row,col)
ent.GetMatElement(row,col)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=GetParent">Online Help</a>
#End
Function GetParent:TEntity(ent:TEntity)
Return ent.GetParent()
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=GetSurface">Online Help</a>
#End
Function GetSurface:TSurface(mesh:TMesh,surf_no)
Return mesh.GetSurface(surf_no)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=GetSurfaceBrush">Online Help</a>
#End
Function GetSurfaceBrush:TBrush(surf:TSurface)
Return TBrush.GetSurfaceBrush(surf)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=Graphics3DInit">Online Help</a>
#End
Function Graphics3DInit()
TRender.render.GraphicsInit()
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=HandleSprite">Online Help</a>
#End
Function HandleSprite(sprite:TSprite,h_x#,h_y#)
sprite.HandleSprite(h_x,h_y)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=HideEntity">Online Help</a>
#End
Function HideEntity(ent:TEntity)
ent.HideEntity()
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=LightColor">Online Help</a>
#End
Function LightColor(light:TLight,red#,green#,blue#)
light.LightColor(red,green,blue)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=LightConeAngles">Online Help</a>
#End
Function LightConeAngles(light:TLight,inner_ang#,outer_ang#)
light.LightConeAngles(inner_ang,outer_ang)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=LightRange">Online Help</a>
#End
Function LightRange(light:TLight,range#)
light.LightRange(range)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=LinePick">Online Help</a>
#End
Function LinePick:TEntity(x#,y#,z#,dx#,dy#,dz#,radius#=0.0)
Return TPick.LinePick(x,y,z,dx,dy,dz,radius)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=LoadAnimMesh">Online Help</a>
#End
Function LoadAnimMesh:TMesh(file$,parent:TEntity=Null, override_texflags:Int=-1)
Return TMesh.LoadAnimMesh(file,parent, override_texflags)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=LoadAnimTexture">Online Help</a>
#End
Function LoadAnimTexture:TTexture(file$,flags,frame_width,frame_height,first_frame%=0,frame_count%=-1)
Return TTexture.LoadAnimTexture(file,flags,frame_width,frame_height,first_frame,frame_count)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=LoadBrush">Online Help</a>
#End
Function LoadBrush:TBrush(file$,flags=1,u_scale#=1.0,v_scale#=1.0)
Return TBrush.LoadBrush(file,flags,u_scale,v_scale)
End
Function LoadAnimBrush:TBrush(file$,flags=1,frame_width,frame_height,first_frame%=0,frame_count%=-1)
Return TBrush.LoadAnimBrush(file,flags,frame_width,frame_height,first_frame,frame_count)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=LoadMesh">Online Help</a>
#End
Function LoadMesh:TMesh(file$,parent:TEntity=Null, override_texflags:Int=-1)
Return TMesh.LoadMesh(file,parent, override_texflags)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=LoadTexture">Online Help</a>
#End
Function LoadTexture:TTexture(file$,flags%=1)
Return TTexture.LoadTexture(file,flags)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=LoadSprite">Online Help</a>
#End
Function LoadSprite:TSprite(tex_file$,tex_flag%=1,parent:TEntity=Null)
Return TSprite.LoadSprite(tex_file,tex_flag,parent)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=MeshDepth">Online Help</a>
#End
Function MeshDepth#(mesh:TMesh)
Return mesh.MeshDepth()
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=MeshHeight">Online Help</a>
#End
Function MeshHeight#(mesh:TMesh)
Return mesh.MeshHeight()
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=MeshWidth">Online Help</a>
#End
Function MeshWidth#(mesh:TMesh)
Return mesh.MeshWidth()
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=MeshesIntersect">Online Help</a>
#End
Function MeshesIntersect:Bool(mesh1:TMesh,mesh2:TMesh)
Return mesh1.MeshesIntersect(mesh2)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=MoveEntity">Online Help</a>
#End
Function MoveEntity(ent:TEntity,x#,y#,z#)
ent.MoveEntity(x,y,z)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=NameEntity">Online Help</a>
#End
Function NameEntity(ent:TEntity,name$)
ent.NameEntity(name)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=PaintEntity">Online Help</a>
#End
Function PaintEntity(ent:TEntity,brush:TBrush)
TMesh(ent).PaintEntity(brush)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=PaintMesh">Online Help</a>
#End
Function PaintMesh:TMesh(mesh:TMesh,brush:TBrush)
mesh.PaintMesh(brush)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=PaintSurface">Online Help</a>
#End
Function PaintSurface(surf:TSurface,brush:TBrush)
Return surf.PaintSurface(brush)
End
#rem
bbdoc: <a href="http://www.blitzbasic.com/b3ddocs/command.php?name=PickedEntity">Online Help</a>
#End
Function PickedEntity:TEntity()