Class TerrainFeature
java.lang.Object
com.codename1.gaming.level.TerrainFeature
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
widthxheightxdepth 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublegetDepth()doublegetId()doublegetType()doublegetWidth()doublegetX()doublegetY()doublegetZ()props()setMaterial(String material) setPosition(double x, double y, double z) Sets the feature's world position in tile units (y = elevation).setRotation(double rotation) setSize(double width, double height, double depth) Sets the feature size in tile units.
-
Field Details
-
TYPE_WALL
- See Also:
-
TYPE_RAMP
- See Also:
-
TYPE_PLATFORM
- See Also:
-
-
Constructor Details
-
TerrainFeature
public TerrainFeature() -
TerrainFeature
-
-
Method Details
-
getId
-
setId
-
getType
-
setType
-
getX
public double getX() -
getY
public double getY() -
getZ
public double getZ() -
setPosition
Sets the feature's world position in tile units (y = elevation). -
getWidth
public double getWidth() -
getHeight
public double getHeight() -
getDepth
public double getDepth() -
setSize
Sets the feature size in tile units. -
getRotation
public double getRotation() -
setRotation
-
getMaterial
-
setMaterial
-
props
-