What it does
CreateObjectFromHeightMap brings a 3D object into being: it is how the rest of the program comes to have one. It takes szImageFile (a string), width (a float), height (a float), length (a float), smoothing (an integer) and split (an integer), and answers an integer. That is the first of 2 forms.
Syntax
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)Parameters
| Name | Type | In forms |
|---|---|---|
| szImageFile | string | all |
| width | float | all |
| height | float | all |
| length | float | all |
| smoothing | integer | all |
| split | integer | all |
| objID | integer | 2 |
What each form returns
| 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) | nothing |
Example · generated
Form 1, the command hands back the id
objectFromHeightMap = CreateObjectFromHeightMap("assets/model.obj", 64.0, 64.0, 1.0, 1, 1)DO Sync()LOOPForm 2, you choose the id yourself
CreateObjectFromHeightMap(1, "assets/model.obj", 64.0, 64.0, 1.0, 1, 1)DO Sync()LOOPCreateObjectFromHeightMap is called and its answer is printed every frame. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.