# Class TerrainFeature

java.lang.Object
com.codename1.gaming.level.TerrainFeature

public class TerrainFeature extends Object
A placed, variable-size terrain element such as a wall, ramp or platform. Unlike a per-cell height/wall value, a feature has a free world position (in tile units) and an arbitrary `width`x`height`x`depth` plus rotation, so dungeon walls, sloped roads and raised platforms of any size are first-class, dynamic objects. The `#getType()` names the shape family (`#TYPE_WALL`, `#TYPE_RAMP`, `#TYPE_PLATFORM`) and `#getMaterial()` its surface.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `TYPE_PLATFORM`
  `static final String`
  `TYPE_RAMP`
  `static final String`
  `TYPE_WALL`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TerrainFeature()`
  `TerrainFeature(String id, String type)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `double`
  `getDepth()`
  `double`
  `getHeight()`
  `String`
  `getId()`
  `String`
  `getMaterial()`
  `double`
  `getRotation()`
  `String`
  `getType()`
  `double`
  `getWidth()`
  `double`
  `getX()`
  `double`
  `getY()`
  `double`
  `getZ()`
  `Map<String,Object>`
  `props()`
  `TerrainFeature`
  `setId(String id)`
  `TerrainFeature`
  `setMaterial(String material)`
  `TerrainFeature`
  `setPosition(double x, double y, double z)`
  Sets the feature's world position in tile units (y = elevation).
  `TerrainFeature`
  `setRotation(double rotation)`
  `TerrainFeature`
  `setSize(double width, double height, double depth)`
  Sets the feature size in tile units.
  `TerrainFeature`
  `setType(String type)`

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### TYPE_WALL

    public static final String TYPE_WALL
    See Also:
      - Constant Field Values

  - ### TYPE_RAMP

    public static final String TYPE_RAMP
    See Also:
      - Constant Field Values

  - ### TYPE_PLATFORM

    public static final String TYPE_PLATFORM
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### TerrainFeature

    public TerrainFeature()

  - ### TerrainFeature

    public TerrainFeature(String id, String type)

- ## Method Details

  - ### getId

    public String getId()

  - ### setId

    public TerrainFeature setId(String id)

  - ### getType

    public String getType()

  - ### setType

    public TerrainFeature setType(String type)

  - ### getX

    public double getX()

  - ### getY

    public double getY()

  - ### getZ

    public double getZ()

  - ### setPosition

    public TerrainFeature setPosition(double x, double y, double z)
    Sets the feature's world position in tile units (y = elevation).

  - ### getWidth

    public double getWidth()

  - ### getHeight

    public double getHeight()

  - ### getDepth

    public double getDepth()

  - ### setSize

    public TerrainFeature setSize(double width, double height, double depth)
    Sets the feature size in tile units.

  - ### getRotation

    public double getRotation()

  - ### setRotation

    public TerrainFeature setRotation(double rotation)

  - ### getMaterial

    public String getMaterial()

  - ### setMaterial

    public TerrainFeature setMaterial(String material)

  - ### props

    public Map<String,Object> props()