(Class page for Terrain)
Tag: apiedit
Tag: sourceedit
Line 10: Line 10:
   
 
=== {{property|readonly|name=IsSmooth|type=bool}} ===
 
=== {{property|readonly|name=IsSmooth|type=bool}} ===
  +
  +
Returns whether or not this game has smooth terrain. Flat terrain was removed in January 2017, so this is always true.
   
 
=== {{property|readonly|name=MaxExtents|type=Region3int16}} ===
 
=== {{property|readonly|name=MaxExtents|type=Region3int16}} ===
   
 
=== {{property|name=WaterColor|type=Color3}} ===
 
=== {{property|name=WaterColor|type=Color3}} ===
  +
  +
The color of the [[Water]] material.
   
 
=== {{property|name=WaterReflectance|type=float}} ===
 
=== {{property|name=WaterReflectance|type=float}} ===
   
  +
The reflectance of the [[Water]] material.
 
   
 
=== {{property|name=WaterTransparency|type=float}} ===
 
=== {{property|name=WaterTransparency|type=float}} ===
   
  +
The transparency of the [[Water]] material.
 
   
 
=== {{property|name=WaterWaveSize|type=float}} ===
 
=== {{property|name=WaterWaveSize|type=float}} ===
   
  +
The maximum size [[Water]] waves can be.
 
   
 
=== {{property|name=WaterWaveSpeed|type=float}} ===
 
=== {{property|name=WaterWaveSpeed|type=float}} ===
   
  +
The speed of the [[Water]] material.
 
   
 
== Methods ==
 
== Methods ==
Line 44: Line 48:
   
 
=== {{method|void|name=Clear}} ===
 
=== {{method|void|name=Clear}} ===
  +
  +
Removes all smooth terrain from the game.
   
 
=== {{method|PluginSecurity|void|name=ConvertToSmooth}} ===
 
=== {{method|PluginSecurity|void|name=ConvertToSmooth}} ===
  +
  +
Converts the game from smooth to flat terrain.
   
 
=== {{method|Instance|name=CopyRegion|Region3int16 region}} ===
 
=== {{method|Instance|name=CopyRegion|Region3int16 region}} ===
  +
  +
Copies the given region and returns a {{Class link|TerrainRegion}}.
   
 
=== {{method|int|name=CountCells}} ===
 
=== {{method|int|name=CountCells}} ===
  +
  +
Counts the amount of terrain cells.
   
 
=== {{method|void|name=FillBall|Vector3 center|float radius|Material material}} ===
 
=== {{method|void|name=FillBall|Vector3 center|float radius|Material material}} ===
  +
  +
Creates a ball of terrain that reaches out from the given center point.
   
 
=== {{method|void|name=FillBlock|CoordinateFrame cframe|Vector3 size|Material material}} ===
 
=== {{method|void|name=FillBlock|CoordinateFrame cframe|Vector3 size|Material material}} ===
  +
  +
Creates a block of terrain from the given CoordinateFrame and goes out by size.
   
 
=== {{method|void|name=FillRegion|Region3 region|float resolution|Material material}} ===
 
=== {{method|void|name=FillRegion|Region3 region|float resolution|Material material}} ===
  +
  +
Fills a region with the given material.
   
 
=== {{method|deprecated|Tuple|name=GetCell|int x|int y|int z}} ===
 
=== {{method|deprecated|Tuple|name=GetCell|int x|int y|int z}} ===
Line 66: Line 84:
   
 
=== {{method|void|name=PasteRegion|Instance region|Vector3int16 corner|bool pasteEmptyCells}} ===
 
=== {{method|void|name=PasteRegion|Instance region|Vector3int16 corner|bool pasteEmptyCells}} ===
  +
  +
Pastes the given {{Class link|TerrainRegion}}, with the corner being a corner.
   
 
=== {{method|Tuple|name=ReadVoxels|Region3 region|float resolution}} ===
 
=== {{method|Tuple|name=ReadVoxels|Region3 region|float resolution}} ===

Revision as of 20:20, 31 March 2017

Object representing a high performance bounded grid of static 4x4 parts. This class cannot be instantiated.

Contents

Properties

This class has seven properties.

Pubfield.gif bool IsSmooth [readonly]

Returns whether or not this game has smooth terrain. Flat terrain was removed in January 2017, so this is always true.

Pubfield.gif Region3int16 MaxExtents [readonly]

Pubfield.gif Color3 WaterColor

The color of the Water material.

Pubfield.gif float WaterReflectance

The reflectance of the Water material.

Pubfield.gif float WaterTransparency

The transparency of the Water material.

Pubfield.gif float WaterWaveSize

The maximum size Water waves can be.

Pubfield.gif float WaterWaveSpeed

The speed of the Water material.

Methods

This class has twenty-two methods.

Pubmethod.gif bool AutowedgeCell(int x, int y, int z) [deprecated]

Pubmethod.gif void AutowedgeCells(Region3int16 region) [deprecated]

Pubmethod.gif Vector3 CellCenterToWorld(int x, int y, int z)

Pubmethod.gif Vector3 CellCornerToWorld(int x, int y, int z)

Pubmethod.gif void Clear()

Removes all smooth terrain from the game.

Protmethod.gif void ConvertToSmooth() [PluginSecurity]

Converts the game from smooth to flat terrain.

Pubmethod.gif Instance CopyRegion(Region3int16 region)

Copies the given region and returns a ExplorerImageIndex 65.pngTerrainRegion.

Pubmethod.gif int CountCells()

Counts the amount of terrain cells.

Pubmethod.gif void FillBall(Vector3 center, float radius, Material material)

Creates a ball of terrain that reaches out from the given center point.

Pubmethod.gif void FillBlock(CoordinateFrame cframe, Vector3 size, Material material)

Creates a block of terrain from the given CoordinateFrame and goes out by size.

Pubmethod.gif void FillRegion(Region3 region, float resolution, Material material)

Fills a region with the given material.

Pubmethod.gif Tuple GetCell(int x, int y, int z) [deprecated]

Returns CellMaterial, CellBlock, CellOrientation

Pubmethod.gif Tuple GetWaterCell(int x, int y, int z) [deprecated]

Returns hasAnyWater, WaterForce, WaterDirection

Pubmethod.gif void PasteRegion(Instance region, Vector3int16 corner, bool pasteEmptyCells)

Pastes the given ExplorerImageIndex 65.pngTerrainRegion, with the corner being a corner.

Pubmethod.gif Tuple ReadVoxels(Region3 region, float resolution)

Pubmethod.gif void SetCell(int x, int y, int z, CellMaterial material, CellBlock block, CellOrientation orientation) [deprecated]

Pubmethod.gif void SetCells(Region3int16 region, CellMaterial material, CellBlock block, CellOrientation orientation) [deprecated]

Pubmethod.gif void SetWaterCell(int x, int y, int z, WaterForce force, WaterDirection direction) [deprecated]

Pubmethod.gif Vector3 WorldToCell(Vector3 position)

Pubmethod.gif Vector3 WorldToCellPreferEmpty(Vector3 position)

Pubmethod.gif Vector3 WorldToCellPreferSolid(Vector3 position)

Pubmethod.gif void WriteVoxels(Region3 region, float resolution, Array materials, Array occupancy)

Community content is available under CC-BY-SA unless otherwise noted.