API / geotoolkit3d / scene / surface / AbstractSurface / AbstractSurface
surface.AbstractSurface.AbstractSurface
Type Aliases
Ƭ CommonShaderOptions: Object
| Name | Type | Description |
|---|---|---|
enableshading | boolean | Set false to disable the lighting and shading effect of the surface. Default is true. |
polygonoffset | boolean | True to use offset preventing Z-fighting/occlusion when overlaying other objects. Default is false. |
polygonoffsetfactor | number | Factor for polygon offset, > 0 will make surface closer to camera, < 0 will make it farther. Default is 1. |
smoothshadingfactor | number | How smooth the shading of the surface should be. On a scale of 1 to 0, 1 being 100% smooth, 0 being flat-shaded. Using 1 for 100% smooth shading might be faster on very large surfaces, due to using precomputed normals exclusively. Default is 1. |
wireframe | boolean | If this surface should render in wireframe mode. Default is false. |
Ƭ TextureOptions: Object
Texture options for the surface.
Only supported by Heightmap surface and GridSurface.
| Name | Type | Description |
|---|---|---|
clipoutofrange? | boolean | If enabled, the textured area will be limited to the texture size. By default is true (to allow OpenGL texture repeating outside of range, this need to be set to false) |
coordinatemode? | TextureCoordinateMode | The texture coordinate mapping type. Determine how the texture size, offset and rotation are interpreted. Default is TextureCoordinateMode.Local |
enable? | boolean | Enable or disable (show or hide) the texture, for convenience. |
fliphorizontal? | boolean | Mirror the texture on its own horizontal axis (U axis in UV mapping terms). |
flipvertical? | boolean | Mirror the texture on its own vertical axis (V axis in UV mapping terms). |
offset? | Vector2 | The position of the Texture origin (the bottom left corner of the image, assuming X increase on the right and Y increase upward). Default value is Vector2(0, 0) |
opacity? | number | The texture opacity, default is 1.0 (opaque) |
rotation? | number | The texture rotation around the origin point, in radian. Default value is 0. |
scale? | Vector2 | Scale the texture X/Y axis using scalar values. Will multiply with the texture size. Conveniently allow to modify the texture scale when computing the size is too complex (ex: using Patterns). Default value is Vector2(1, 1) |
size? | Vector2 | The position of the Texture origin (the bottom left corner of the image, assuming X increase on the right and Y increase upward). Default is set to the local size of the Surface (ex: surface.boundingBox.size()), meaning the texture will cover the entire Surface boundaries. |
Ƭ TextureOptionsIn: Object
| Name | Type | Description |
|---|---|---|
texture? | Texture | The diffuse color texture, to paint on the surface. Only supported by Heightmap surface and GridSurface. |
textureoptions? | TextureOptions | Transformation options to use on the diffuse color texture. (No effect if option.texture has not been set yet) |
Ƭ TextureOptionsOut: Object
| Name | Type | Description |
|---|---|---|
texture? | Texture | The diffuse color texture, to paint on the surface. Will be undefined if not previously defined. |
textureoptions | Required<TextureOptions> | Transformation options to use on the diffuse color texture. (No effect if option.texture has not been set yet) |