new Terrain(terrainSize, minElevation, maxElevation, numLevels, material, detail)
Terrain provides a paged terrain engine with dynamic LOD. The heightmapping itself happens in the Material.
Parameters:
Name | Type | Description |
---|---|---|
terrainSize |
The world size for the entire terrain. |
|
minElevation |
The minimum elevation for the terrain (maps to heightmap value 0) |
|
maxElevation |
The maximum elevation for the terrain (maps to heightmap value 1) |
|
numLevels |
The amount of levels the page tree should contain. More levels means more(!) triangles. |
|
material |
The |
|
detail |
The grid size. |
Properties:
Name | Type | Description |
---|---|---|
terrainSize |
number | The world size for the entire terrain. |
Extends
Members
-
euler
-
The rotation of the object.
- Inherited From:
-
matrix
-
The matrix representing the transform.
- Inherited From:
-
position
-
The position of the object.
- Inherited From:
-
rotation
-
The rotation of the object.
- Inherited From:
-
scale
-
The scale of the object.
- Inherited From:
Methods
-
applyFunction(func [, thisRef])
-
Applies a function recursively to all child nodes.
Parameters:
Name Type Argument Description func
The function to call (using the traversed node as argument)
thisRef
<optional>
Optional reference to "this" in the calling function, to keep the scope of "this" in the called method.
- Inherited From:
-
attach()
-
Attaches a child SceneNode to this node.
- Inherited From:
-
attachAfter(child, refChild)
-
Attaches a child SceneNode to this node.
Parameters:
Name Type Description child
SceneNode The child to be attached.
refChild
SceneNode The scene node after which to add the new child.
- Inherited From:
-
contains()
-
Returns whether or not a child is contained in a parent. This works recursively!
- Inherited From:
-
copyTransform()
-
Copies the state of another Transform object
- Inherited From:
-
destroy()
-
Removes the scene node from the scene and destroys it and all of its children.
- Inherited From:
-
detach()
-
Removes a child SceneNode from this node.
- Inherited From:
-
findMaterialByName()
-
Finds a material with the given name somewhere in this node's children.
- Inherited From:
-
findNodeByName()
-
Finds a scene node with the given name somewhere in this node's children.
- Inherited From:
-
getChild()
-
Retrieves a child SceneNode with the given index.
- Inherited From:
-
getChildIndex(child)
-
Returns the index of a child SceneNode.
Parameters:
Name Type Description child
- Inherited From:
Returns:
- Type
- *
-
isContainedIn()
-
Returns whether or not this scene node is contained by a parent. This works recursively.
- Inherited From:
-
lookAt()
-
Orients the object in such a way as to face the target point.
- Inherited From: