Ce que fait la commande
CreateObjectFromHeightMap fait exister un objet 3D : c'est par lui que la suite du programme en a un. Il prend szImageFile (une chaîne), width (un flottant), height (un flottant), length (un flottant), smoothing (un entier) et split (un entier), et rend un entier. C'est la première de 2 formes.
Syntaxe
1
CreateObjectFromHeightMap(szImageFile string, width float, height float, length float, smoothing integer, split integer) → integer2
CreateObjectFromHeightMap(objID integer, szImageFile string, width float, height float, length float, smoothing integer, split integer)Paramètres
| Nom | Type | Dans les formes |
|---|---|---|
| szImageFile | string | toutes |
| width | float | toutes |
| height | float | toutes |
| length | float | toutes |
| smoothing | integer | toutes |
| split | integer | toutes |
| objID | integer | 2 |
Ce que rend chaque forme
| 1 | objectFromHeightMap = CreateObjectFromHeightMap("assets/model.obj", 64.0, 64.0, 1.0, 1, 1) | integer |
| 2 | CreateObjectFromHeightMap(1, "assets/model.obj", 64.0, 64.0, 1.0, 1, 1) | rien |
Exemple · engendré
Forme 1 : la commande rend l'identifiant
objectFromHeightMap = CreateObjectFromHeightMap("assets/model.obj", 64.0, 64.0, 1.0, 1, 1)DO Sync()LOOPForme 2 : vous choisissez l'identifiant
CreateObjectFromHeightMap(1, "assets/model.obj", 64.0, 64.0, 1.0, 1, 1)DO Sync()LOOPCreateObjectFromHeightMap est appelé et sa réponse est affichée à chaque image. La boucle DO … LOOP n'est pas décorative : un programme BASIC classique s'arrête dès qu'il n'a plus de lignes, et c'est Sync() qui dessine l'image.