CreateObjectFromRawHeightMap

Family: 3D · 2 forms

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) → integer
2
CreateObjectFromRawHeightMap(objID integer, szFilename string, width float, height float, length float, smoothing integer, split integer, rawWidth integer, rawHeight integer)

Parameters

NameTypeIn forms
szFilenamestringall
widthfloatall
heightfloatall
lengthfloatall
smoothingintegerall
splitintegerall
rawWidthintegerall
rawHeightintegerall
objIDinteger2

What each form returns

1objectFromRawHeightMap = CreateObjectFromRawHeightMap("assets/model.obj", 64.0, 64.0, 1.0, 1, 1, 64, 64)integer
2CreateObjectFromRawHeightMap(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()LOOP

Form 2, you choose the id yourself

CreateObjectFromRawHeightMap(1, "assets/model.obj", 64.0, 64.0, 1.0, 1, 1, 64, 64)DO  Sync()LOOP

CreateObjectFromRawHeightMap 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.

286 commands in 3D