What it does
CreateObjectFromRawHeightMap brings a 3D object into being: it is how the rest of the program comes to have one. It takes szFilename (a string), width (a float), height (a float), length (a float), smoothing (an integer), split (an integer), rawWidth (an integer) and rawHeight (an integer), and answers an integer. That is the first of 2 forms.
Syntax
1
CreateObjectFromRawHeightMap(szFilename string, width float, height float, length float, smoothing integer, split integer, rawWidth integer, rawHeight integer) → integer2
CreateObjectFromRawHeightMap(objID integer, szFilename string, width float, height float, length float, smoothing integer, split integer, rawWidth integer, rawHeight integer)Parameters
| Name | Type | In forms |
|---|---|---|
| szFilename | string | all |
| width | float | all |
| height | float | all |
| length | float | all |
| smoothing | integer | all |
| split | integer | all |
| rawWidth | integer | all |
| rawHeight | integer | all |
| objID | integer | 2 |
What each form returns
| 1 | objectFromRawHeightMap = CreateObjectFromRawHeightMap("assets/model.obj", 64.0, 64.0, 1.0, 1, 1, 64, 64) | integer |
| 2 | CreateObjectFromRawHeightMap(1, "assets/model.obj", 64.0, 64.0, 1.0, 1, 1, 64, 64) | nothing |
Example · generated
Form 1, the command hands back the id
objectFromRawHeightMap = CreateObjectFromRawHeightMap("assets/model.obj", 64.0, 64.0, 1.0, 1, 1, 64, 64)DO Sync()LOOPForm 2, you choose the id yourself
CreateObjectFromRawHeightMap(1, "assets/model.obj", 64.0, 64.0, 1.0, 1, 1, 64, 64)DO Sync()LOOPCreateObjectFromRawHeightMap 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.