Drag[en]gine Script Module DragonScript  1.23
Dragengine.Scenery.HeightTerrain Class Reference

Height terrain. More...

Inheritance diagram for Dragengine.Scenery.HeightTerrain:

Public Member Functions

Constructors
HeightTerrain new (float sectorSize, int sectorResolution)
 Create height terrain. More...
 
Management
int getImageDimension ()
 Image dimension. More...
 
float getSectorSize ()
 Sector dimension. More...
 
float getBaseHeight ()
 Base height in meters. More...
 
void setBaseHeight (float height)
 Set base height in meters. More...
 
float getHeightScaling ()
 Height scaling in meters. More...
 
void setHeightScaling (float height)
 Set height scaling in meters. More...
 
CollisionFilter getCollisionFilter ()
 Collision filter. More...
 
void setCollisionFilter (CollisionFilter collisionFilter)
 Set collision filter. More...
 
Sectors
int getSectorCount ()
 Count of sectors. More...
 
bool hasSector (Point coordinates)
 Sector with coordinates exists. More...
 
int indexOfSector (Point coordinates)
 Index of sector with coordinates or -1 if absent. More...
 
void addSector (Point coordinates)
 Add sector. More...
 
void removeSector (int sector)
 Remove sector. More...
 
void removeAllSectors ()
 Remove all sectors. More...
 
Image getHeightImage (int sector)
 Height image or null if not set. More...
 
void setHeightImage (int sector, Image image)
 Set height image or null if not set. More...
 
void setVisibilityFromImage (int sector, Image image)
 Set visibility from image or null to clear. More...
 
Textures
int getTextureCount (int sector)
 Number of textures. More...
 
void addTexture (int sector)
 Add texture. More...
 
Skin textureGetSkin (int sector, int texture)
 Skin of texture. More...
 
void textureSetSkin (int sector, int texture, Skin skin)
 Set skin of texture. More...
 
Vector2 textureGetUVOffset (int sector, int texture)
 Texture uv offset. More...
 
void textureSetUVOffset (int sector, int texture, Vector2 offset)
 Set texture uv offset. More...
 
Vector2 textureGetUVScaling (int sector, int texture)
 texture uv scaling. More...
 
void textureSetUVScaling (int sector, int texture, Vector2 scaling)
 Set texture uv scaling. More...
 
float textureGetUVRotation (int sector, int texture)
 texture uv rotation. More...
 
void textureSetUVRotation (int sector, int texture, float rotation)
 Set texture uv rotation. More...
 
Image textureGetMask (int sector, int texture)
 texture mask or null if not set. More...
 
void textureSetMask (int sector, int texture, Image mask)
 Set texture mask or null if not set. More...
 
Decals
int getDecalCount (int sector)
 Number of decals. More...
 
void addDecal (int sector, Decal decal)
 Add decal. More...
 
void removeDecal (int sector, Decal decal)
 Remove decal. More...
 
void removeAllDecals (int sector)
 Remove all decals. More...
 
Navigation spaces
int getNavSpaceCount (int sector)
 Number of navigation spaces. More...
 
void addNavSpace (int sector)
 Add navigation returning index. More...
 
void removeNavSpaceAt (int sector, int navspace)
 Remove navigation space at index. More...
 
void removeAllNavSpaces (int sector)
 Remove all navigation spaces. More...
 
NavigationSpaceType navspaceGetType (int sector, int navspace)
 Type of navigation space at index. More...
 
void navspaceSetType (int sector, int navspace, NavigationSpaceType type)
 Set type of navigation space at index. More...
 
int navspaceGetLayer (int sector, int navspace)
 Layer of navigation space at index. More...
 
void navspaceSetLayer (int sector, int navspace, int layer)
 Set layer of navigation space at index. More...
 
float navspaceGetSnapDistance (int sector, int navspace)
 Snap distance of navigation space at index. More...
 
void navspaceSetSnapDistance (int sector, int navspace, float distance)
 Set snap distance of navigation space at index. More...
 
float navspaceGetSnapAngle (int sector, int navspace)
 Snap angle of navigation space at index. More...
 
void navspaceSetSnapAngle (int sector, int navspace, float angle)
 Set snap angle of navigation space at index. More...
 
int navspaceGetCornerCount (int sector, int navspace)
 Number of corners of navigation space at index. More...
 
void navspaceSetCornerCount (int sector, int navspace, int count)
 Set number of corners of navigation space at index. More...
 
int navspaceGetCornerAt (int sector, int navspace, int corner)
 Corner of navigation space at index. More...
 
void navspaceSetCornerAt (int sector, int navspace, int corner, int navpoint)
 Set corner of navigation space at index. More...
 
int navspaceGetEdgeCount (int sector, int navspace)
 Number of edges of navigation space at index. More...
 
void navspaceSetEdgeCount (int sector, int navspace, int count)
 Set number of edges of navigation space at index. More...
 
int navspaceEdgeGetPoint1 (int sector, int navspace, int edge)
 First navpoint of edge of navigation space at index. More...
 
int navspaceEdgeGetPoint2 (int sector, int navspace, int edge)
 Second navpoint of edge of navigation space at index. More...
 
int navspaceEdgeGetType1 (int sector, int navspace, int edge)
 Type to use for edge to travel from first to second navpoint of edge of navigation space at index. More...
 
int navspaceEdgeGetType2 (int sector, int navspace, int edge)
 Type to use for edge to travel from second to first navpoint of edge of navigation space at index. More...
 
void navspaceSetEdgeAt (int sector, int navspace, int edge, int point1, int point2, int type1, int type2)
 Set edge of navigation space at index. More...
 
int navspaceGetFaceCount (int sector, int navspace)
 Number of faces of navigation space at index. More...
 
void navspaceSetFaceCount (int sector, int navspace, int count)
 Set number of faces of navigation space at index. More...
 
int navspaceFaceGetCornerCount (int sector, int navspace, int face)
 Number of corners of face of navigation space at index. More...
 
int navspaceFaceGetType (int sector, int navspace, int face)
 Type of face of navigation space at index. More...
 
void navspaceSetFaceAt (int sector, int navspace, int face, int cornerCount, int type)
 Set number of corners and type of face of navigation space at index. More...
 
void navspaceLayoutChanged (int sector, int navspace)
 Layout of navigation space at index. More...
 

Detailed Description

Height terrain.

This is a native class.

Member Function Documentation

◆ addDecal()

void Dragengine.Scenery.HeightTerrain.addDecal ( int  sector,
Decal  decal 
)

Add decal.

◆ addNavSpace()

void Dragengine.Scenery.HeightTerrain.addNavSpace ( int  sector)

Add navigation returning index.

◆ addSector()

void Dragengine.Scenery.HeightTerrain.addSector ( Point  coordinates)

Add sector.

Exceptions
EInvalidParamSector with coordinates present.

◆ addTexture()

void Dragengine.Scenery.HeightTerrain.addTexture ( int  sector)

Add texture.

◆ getBaseHeight()

float Dragengine.Scenery.HeightTerrain.getBaseHeight ( )

Base height in meters.

◆ getCollisionFilter()

CollisionFilter Dragengine.Scenery.HeightTerrain.getCollisionFilter ( )

Collision filter.

◆ getDecalCount()

int Dragengine.Scenery.HeightTerrain.getDecalCount ( int  sector)

Number of decals.

◆ getHeightImage()

Image Dragengine.Scenery.HeightTerrain.getHeightImage ( int  sector)

Height image or null if not set.

◆ getHeightScaling()

float Dragengine.Scenery.HeightTerrain.getHeightScaling ( )

Height scaling in meters.

◆ getImageDimension()

int Dragengine.Scenery.HeightTerrain.getImageDimension ( )

Image dimension.

◆ getNavSpaceCount()

int Dragengine.Scenery.HeightTerrain.getNavSpaceCount ( int  sector)

Number of navigation spaces.

◆ getSectorCount()

int Dragengine.Scenery.HeightTerrain.getSectorCount ( )

Count of sectors.

◆ getSectorSize()

float Dragengine.Scenery.HeightTerrain.getSectorSize ( )

Sector dimension.

◆ getTextureCount()

int Dragengine.Scenery.HeightTerrain.getTextureCount ( int  sector)

Number of textures.

◆ hasSector()

bool Dragengine.Scenery.HeightTerrain.hasSector ( Point  coordinates)

Sector with coordinates exists.

◆ indexOfSector()

int Dragengine.Scenery.HeightTerrain.indexOfSector ( Point  coordinates)

Index of sector with coordinates or -1 if absent.

◆ navspaceEdgeGetPoint1()

int Dragengine.Scenery.HeightTerrain.navspaceEdgeGetPoint1 ( int  sector,
int  navspace,
int  edge 
)

First navpoint of edge of navigation space at index.

Exceptions
EOutOfBoundarynavspace is less than 0 or greater than getNavSpaceCount().
EOutOfBoundaryedge is less than 0 or greater than navspaceGetEdgeCount().

◆ navspaceEdgeGetPoint2()

int Dragengine.Scenery.HeightTerrain.navspaceEdgeGetPoint2 ( int  sector,
int  navspace,
int  edge 
)

Second navpoint of edge of navigation space at index.

Exceptions
EOutOfBoundarynavspace is less than 0 or greater than getNavSpaceCount().
EOutOfBoundaryedge is less than 0 or greater than navspaceGetEdgeCount().

◆ navspaceEdgeGetType1()

int Dragengine.Scenery.HeightTerrain.navspaceEdgeGetType1 ( int  sector,
int  navspace,
int  edge 
)

Type to use for edge to travel from first to second navpoint of edge of navigation space at index.

Exceptions
EOutOfBoundarynavspace is less than 0 or greater than getNavSpaceCount().
EOutOfBoundaryedge is less than 0 or greater than navspaceGetEdgeCount().

◆ navspaceEdgeGetType2()

int Dragengine.Scenery.HeightTerrain.navspaceEdgeGetType2 ( int  sector,
int  navspace,
int  edge 
)

Type to use for edge to travel from second to first navpoint of edge of navigation space at index.

Exceptions
EOutOfBoundarynavspace is less than 0 or greater than getNavSpaceCount().
EOutOfBoundaryedge is less than 0 or greater than navspaceGetEdgeCount().

◆ navspaceFaceGetCornerCount()

int Dragengine.Scenery.HeightTerrain.navspaceFaceGetCornerCount ( int  sector,
int  navspace,
int  face 
)

Number of corners of face of navigation space at index.

Exceptions
EOutOfBoundarynavspace is less than 0 or greater than getNavSpaceCount().
EOutOfBoundaryface is less than 0 or greater than navspaceGetFaceCount().

◆ navspaceFaceGetType()

int Dragengine.Scenery.HeightTerrain.navspaceFaceGetType ( int  sector,
int  navspace,
int  face 
)

Type of face of navigation space at index.

Exceptions
EOutOfBoundarynavspace is less than 0 or greater than getNavSpaceCount().
EOutOfBoundaryface is less than 0 or greater than navspaceGetFaceCount().

◆ navspaceGetCornerAt()

int Dragengine.Scenery.HeightTerrain.navspaceGetCornerAt ( int  sector,
int  navspace,
int  corner 
)

Corner of navigation space at index.

Exceptions
EOutOfBoundarynavspace is less than 0 or greater than getNavSpaceCount().
EOutOfBoundarycorner is less than 0 or greater than navspaceGetCornerCount().

◆ navspaceGetCornerCount()

int Dragengine.Scenery.HeightTerrain.navspaceGetCornerCount ( int  sector,
int  navspace 
)

Number of corners of navigation space at index.

Exceptions
EOutOfBoundarynavspace is less than 0 or greater than getNavSpaceCount().

◆ navspaceGetEdgeCount()

int Dragengine.Scenery.HeightTerrain.navspaceGetEdgeCount ( int  sector,
int  navspace 
)

Number of edges of navigation space at index.

Exceptions
EOutOfBoundarynavspace is less than 0 or greater than getNavSpaceCount().

◆ navspaceGetFaceCount()

int Dragengine.Scenery.HeightTerrain.navspaceGetFaceCount ( int  sector,
int  navspace 
)

Number of faces of navigation space at index.

Exceptions
EOutOfBoundarynavspace is less than 0 or greater than getNavSpaceCount().

◆ navspaceGetLayer()

int Dragengine.Scenery.HeightTerrain.navspaceGetLayer ( int  sector,
int  navspace 
)

Layer of navigation space at index.

Exceptions
EOutOfBoundarynavspace is less than 0 or greater than getNavSpaceCount().

◆ navspaceGetSnapAngle()

float Dragengine.Scenery.HeightTerrain.navspaceGetSnapAngle ( int  sector,
int  navspace 
)

Snap angle of navigation space at index.

Exceptions
EOutOfBoundarynavspace is less than 0 or greater than getNavSpaceCount().

◆ navspaceGetSnapDistance()

float Dragengine.Scenery.HeightTerrain.navspaceGetSnapDistance ( int  sector,
int  navspace 
)

Snap distance of navigation space at index.

Exceptions
EOutOfBoundarynavspace is less than 0 or greater than getNavSpaceCount().

◆ navspaceGetType()

NavigationSpaceType Dragengine.Scenery.HeightTerrain.navspaceGetType ( int  sector,
int  navspace 
)

Type of navigation space at index.

Exceptions
EOutOfBoundarynavspace is less than 0 or greater than getNavSpaceCount().

◆ navspaceLayoutChanged()

void Dragengine.Scenery.HeightTerrain.navspaceLayoutChanged ( int  sector,
int  navspace 
)

Layout of navigation space at index.

Exceptions
EOutOfBoundarynavspace is less than 0 or greater than getNavSpaceCount().

◆ navspaceSetCornerAt()

void Dragengine.Scenery.HeightTerrain.navspaceSetCornerAt ( int  sector,
int  navspace,
int  corner,
int  navpoint 
)

Set corner of navigation space at index.

Call navspaceLayoutChanged() once you finished changing the content.

Exceptions
EOutOfBoundarynavspace is less than 0 or greater than getNavSpaceCount().
EOutOfBoundarycorner is less than 0 or greater than navspaceGetCornerCount().
EInvalidParamnavpoint is less than 0 or greater than (getImageDimension()-1) squared.

◆ navspaceSetCornerCount()

void Dragengine.Scenery.HeightTerrain.navspaceSetCornerCount ( int  sector,
int  navspace,
int  count 
)

Set number of corners of navigation space at index.

Call navspaceLayoutChanged() once you finished changing the content.

Exceptions
EOutOfBoundarynavspace is less than 0 or greater than getNavSpaceCount().
EInvalidParamcount is less than 0.

◆ navspaceSetEdgeAt()

void Dragengine.Scenery.HeightTerrain.navspaceSetEdgeAt ( int  sector,
int  navspace,
int  edge,
int  point1,
int  point2,
int  type1,
int  type2 
)

Set edge of navigation space at index.

Call navspaceLayoutChanged() once you finished changing the content.

Exceptions
EOutOfBoundarynavspace is less than 0 or greater than getNavSpaceCount().
EOutOfBoundaryedge is less than 0 or greater than navspaceGetEdgeCount().

◆ navspaceSetEdgeCount()

void Dragengine.Scenery.HeightTerrain.navspaceSetEdgeCount ( int  sector,
int  navspace,
int  count 
)

Set number of edges of navigation space at index.

Call navspaceLayoutChanged() once you finished changing the content.

Exceptions
EOutOfBoundarynavspace is less than 0 or greater than getNavSpaceCount().
EInvalidParamcount is less than 0.

◆ navspaceSetFaceAt()

void Dragengine.Scenery.HeightTerrain.navspaceSetFaceAt ( int  sector,
int  navspace,
int  face,
int  cornerCount,
int  type 
)

Set number of corners and type of face of navigation space at index.

Call navspaceLayoutChanged() once you finished changing the content.

Exceptions
EOutOfBoundarynavspace is less than 0 or greater than getNavSpaceCount().
EOutOfBoundaryface is less than 0 or greater than navspaceGetFaceCount().
EOutOfBoundarycornerCount is less than 0.

◆ navspaceSetFaceCount()

void Dragengine.Scenery.HeightTerrain.navspaceSetFaceCount ( int  sector,
int  navspace,
int  count 
)

Set number of faces of navigation space at index.

Call navspaceLayoutChanged() once you finished changing the content.

Exceptions
EOutOfBoundarynavspace is less than 0 or greater than getNavSpaceCount().
EInvalidParamcount is less than 0.

◆ navspaceSetLayer()

void Dragengine.Scenery.HeightTerrain.navspaceSetLayer ( int  sector,
int  navspace,
int  layer 
)

Set layer of navigation space at index.

Exceptions
EOutOfBoundarynavspace is less than 0 or greater than getNavSpaceCount().

◆ navspaceSetSnapAngle()

void Dragengine.Scenery.HeightTerrain.navspaceSetSnapAngle ( int  sector,
int  navspace,
float  angle 
)

Set snap angle of navigation space at index.

Exceptions
EOutOfBoundarynavspace is less than 0 or greater than getNavSpaceCount().

◆ navspaceSetSnapDistance()

void Dragengine.Scenery.HeightTerrain.navspaceSetSnapDistance ( int  sector,
int  navspace,
float  distance 
)

Set snap distance of navigation space at index.

Exceptions
EOutOfBoundarynavspace is less than 0 or greater than getNavSpaceCount().

◆ navspaceSetType()

void Dragengine.Scenery.HeightTerrain.navspaceSetType ( int  sector,
int  navspace,
NavigationSpaceType  type 
)

Set type of navigation space at index.

Exceptions
EOutOfBoundarynavspace is less than 0 or greater than getNavSpaceCount().

◆ new()

HeightTerrain Dragengine.Scenery.HeightTerrain.new ( float  sectorSize,
int  sectorResolution 
)

Create height terrain.

Parameters
sectorSizeSize in meters of sectors along the X and Z axis.
sectorResolutionResolution of sectors (width and height of height images).

◆ removeAllDecals()

void Dragengine.Scenery.HeightTerrain.removeAllDecals ( int  sector)

Remove all decals.

◆ removeAllNavSpaces()

void Dragengine.Scenery.HeightTerrain.removeAllNavSpaces ( int  sector)

Remove all navigation spaces.

◆ removeAllSectors()

void Dragengine.Scenery.HeightTerrain.removeAllSectors ( )

Remove all sectors.

◆ removeDecal()

void Dragengine.Scenery.HeightTerrain.removeDecal ( int  sector,
Decal  decal 
)

Remove decal.

◆ removeNavSpaceAt()

void Dragengine.Scenery.HeightTerrain.removeNavSpaceAt ( int  sector,
int  navspace 
)

Remove navigation space at index.

Exceptions
EOutOfBoundaryindex is less than 0 or greater than getNavSpaceCount().

◆ removeSector()

void Dragengine.Scenery.HeightTerrain.removeSector ( int  sector)

Remove sector.

◆ setBaseHeight()

void Dragengine.Scenery.HeightTerrain.setBaseHeight ( float  height)

Set base height in meters.

◆ setCollisionFilter()

void Dragengine.Scenery.HeightTerrain.setCollisionFilter ( CollisionFilter  collisionFilter)

Set collision filter.

◆ setHeightImage()

void Dragengine.Scenery.HeightTerrain.setHeightImage ( int  sector,
Image  image 
)

Set height image or null if not set.

◆ setHeightScaling()

void Dragengine.Scenery.HeightTerrain.setHeightScaling ( float  height)

Set height scaling in meters.

◆ setVisibilityFromImage()

void Dragengine.Scenery.HeightTerrain.setVisibilityFromImage ( int  sector,
Image  image 
)

Set visibility from image or null to clear.

◆ textureGetMask()

Image Dragengine.Scenery.HeightTerrain.textureGetMask ( int  sector,
int  texture 
)

texture mask or null if not set.

Exceptions
EOutOfBoundarytexture is less than 0 or greater than or equal to getTextureCount().

◆ textureGetSkin()

Skin Dragengine.Scenery.HeightTerrain.textureGetSkin ( int  sector,
int  texture 
)

Skin of texture.

Exceptions
EOutOfBoundarytexture is less than 0 or greater than or equal to getTextureCount().

◆ textureGetUVOffset()

Vector2 Dragengine.Scenery.HeightTerrain.textureGetUVOffset ( int  sector,
int  texture 
)

Texture uv offset.

Exceptions
EOutOfBoundarytexture is less than 0 or greater than or equal to getTextureCount().

◆ textureGetUVRotation()

float Dragengine.Scenery.HeightTerrain.textureGetUVRotation ( int  sector,
int  texture 
)

texture uv rotation.

Exceptions
EOutOfBoundarytexture is less than 0 or greater than or equal to getTextureCount().

◆ textureGetUVScaling()

Vector2 Dragengine.Scenery.HeightTerrain.textureGetUVScaling ( int  sector,
int  texture 
)

texture uv scaling.

Exceptions
EOutOfBoundarytexture is less than 0 or greater than or equal to getTextureCount().

◆ textureSetMask()

void Dragengine.Scenery.HeightTerrain.textureSetMask ( int  sector,
int  texture,
Image  mask 
)

Set texture mask or null if not set.

Exceptions
EOutOfBoundarytexture is less than 0 or greater than or equal to getTextureCount().

◆ textureSetSkin()

void Dragengine.Scenery.HeightTerrain.textureSetSkin ( int  sector,
int  texture,
Skin  skin 
)

Set skin of texture.

Exceptions
EOutOfBoundarytexture is less than 0 or greater than or equal to getTextureCount().

◆ textureSetUVOffset()

void Dragengine.Scenery.HeightTerrain.textureSetUVOffset ( int  sector,
int  texture,
Vector2  offset 
)

Set texture uv offset.

Exceptions
EOutOfBoundarytexture is less than 0 or greater than or equal to getTextureCount().

◆ textureSetUVRotation()

void Dragengine.Scenery.HeightTerrain.textureSetUVRotation ( int  sector,
int  texture,
float  rotation 
)

Set texture uv rotation.

Exceptions
EOutOfBoundarytexture is less than 0 or greater than or equal to getTextureCount().

◆ textureSetUVScaling()

void Dragengine.Scenery.HeightTerrain.textureSetUVScaling ( int  sector,
int  texture,
Vector2  scaling 
)

Set texture uv scaling.

Exceptions
EOutOfBoundarytexture is less than 0 or greater than or equal to getTextureCount().

The documentation for this class was generated from the following file: