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

Detailed Description

Height terrain.

This is a native class.

Member Function Documentation

◆ addDecal()

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

Add decal.

Referenced by navspaceGetLayer().

◆ addNavSpace()

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

Add navigation returning index.

References textureSetUVRotation().

Referenced by navspaceSetSnapDistance().

◆ addSector()

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

Add sector.

Exceptions
EInvalidParamSector with coordinates present.

References getSectorCount().

Referenced by setVisibilityFromImage().

◆ addTexture()

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

Add texture.

References removeAllSectors().

Referenced by textureSetUVOffset().

◆ getBaseHeight()

float Dragengine.Scenery.HeightTerrain.getBaseHeight ( )

Base height in meters.

Referenced by setBaseHeight().

◆ getCollisionFilter()

CollisionFilter Dragengine.Scenery.HeightTerrain.getCollisionFilter ( )

Collision filter.

References getHeightScaling().

Referenced by getSectorCount().

◆ getDecalCount()

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

Number of decals.

Referenced by navspaceSetType().

◆ getHeightImage()

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

Height image or null if not set.

Referenced by textureGetSkin().

◆ getHeightScaling()

float Dragengine.Scenery.HeightTerrain.getHeightScaling ( )

Height scaling in meters.

Referenced by getCollisionFilter().

◆ getImageDimension()

int Dragengine.Scenery.HeightTerrain.getImageDimension ( )

Image dimension.

References getImageDimension().

Referenced by getImageDimension().

◆ getNavSpaceCount()

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

Number of navigation spaces.

Referenced by navspaceSetSnapDistance().

◆ getSectorCount()

int Dragengine.Scenery.HeightTerrain.getSectorCount ( )

Count of sectors.

References getCollisionFilter().

Referenced by addSector().

◆ getSectorSize()

float Dragengine.Scenery.HeightTerrain.getSectorSize ( )

Sector dimension.

References getSectorSize().

Referenced by getSectorSize().

◆ getTextureCount()

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

Number of textures.

References removeSector().

Referenced by textureSetUVOffset().

◆ hasSector()

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

Sector with coordinates exists.

References setCollisionFilter().

Referenced by removeAllSectors().

◆ indexOfSector()

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

Index of sector with coordinates or -1 if absent.

Referenced by setHeightImage().

◆ 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().

References navspaceGetSnapAngle().

Referenced by navspaceLayoutChanged().

◆ 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().

References navspaceSetSnapAngle().

Referenced by navspaceLayoutChanged().

◆ 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().

References navspaceGetCornerCount().

Referenced by navspaceLayoutChanged().

◆ 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().

Referenced by navspaceLayoutChanged().

◆ 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().

References navspaceGetEdgeCount().

Referenced by navspaceLayoutChanged().

◆ 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().

Referenced by navspaceLayoutChanged().

◆ 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().

References navspaceGetLayer().

Referenced by navspaceGetFaceCount().

◆ 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().

References navspaceGetType().

Referenced by navspaceEdgeGetType1().

◆ 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().

References navspaceGetSnapDistance().

Referenced by navspaceFaceGetCornerCount().

◆ 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().

References navspaceGetCornerAt().

Referenced by navspaceLayoutChanged().

◆ 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().

References addDecal(), and removeDecal().

Referenced by navspaceGetCornerAt().

◆ 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().

Referenced by navspaceEdgeGetPoint1().

◆ 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().

Referenced by navspaceGetEdgeCount().

◆ 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().

Referenced by navspaceGetCornerCount().

◆ navspaceLayoutChanged()

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

◆ 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.

References navspaceSetLayer().

Referenced by navspaceSetFaceCount().

◆ 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.

References navspaceSetType().

Referenced by navspaceSetEdgeAt().

◆ 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().

References navspaceSetCornerCount().

Referenced by navspaceLayoutChanged().

◆ 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.

References navspaceSetSnapDistance().

Referenced by navspaceSetFaceAt().

◆ 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.

References navspaceSetEdgeCount().

Referenced by navspaceLayoutChanged().

◆ 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.

References navspaceSetCornerAt().

Referenced by navspaceLayoutChanged().

◆ 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().

References removeAllDecals().

Referenced by navspaceSetCornerAt().

◆ 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().

References removeAllNavSpaces(), and removeNavSpaceAt().

Referenced by navspaceEdgeGetPoint2().

◆ 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().

References addNavSpace(), and getNavSpaceCount().

Referenced by navspaceSetEdgeCount().

◆ 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().

References getDecalCount().

Referenced by navspaceSetCornerCount().

◆ 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).

References new().

Referenced by new().

◆ removeAllDecals()

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

Remove all decals.

References textureGetUVRotation().

Referenced by navspaceSetLayer().

◆ removeAllNavSpaces()

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

Remove all navigation spaces.

References textureSetMask().

Referenced by navspaceSetSnapAngle().

◆ removeAllSectors()

void Dragengine.Scenery.HeightTerrain.removeAllSectors ( )

Remove all sectors.

References hasSector().

Referenced by addTexture().

◆ removeDecal()

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

Remove decal.

References textureSetUVScaling().

Referenced by navspaceGetLayer().

◆ 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().

References textureGetMask().

Referenced by navspaceSetSnapAngle().

◆ removeSector()

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

Remove sector.

Referenced by getTextureCount().

◆ setBaseHeight()

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

Set base height in meters.

References getBaseHeight().

Referenced by setHeightScaling().

◆ setCollisionFilter()

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

Set collision filter.

References setHeightScaling().

Referenced by hasSector().

◆ setHeightImage()

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

Set height image or null if not set.

References indexOfSector().

Referenced by textureGetSkin().

◆ setHeightScaling()

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

Set height scaling in meters.

References setBaseHeight().

Referenced by setCollisionFilter().

◆ setVisibilityFromImage()

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

Set visibility from image or null to clear.

References addSector().

Referenced by textureSetSkin().

◆ 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().

References textureSetUVOffset().

Referenced by removeNavSpaceAt().

◆ 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().

References getHeightImage(), and setHeightImage().

Referenced by textureSetUVScaling().

◆ 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().

Referenced by textureSetUVRotation().

◆ 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().

References textureSetSkin().

Referenced by removeAllDecals().

◆ 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().

Referenced by textureSetMask().

◆ 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().

References textureGetUVScaling().

Referenced by removeAllNavSpaces().

◆ 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().

References setVisibilityFromImage().

Referenced by textureGetUVRotation().

◆ 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().

References addTexture(), and getTextureCount().

Referenced by textureGetMask().

◆ 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().

References textureGetUVOffset().

Referenced by addNavSpace().

◆ 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().

References textureGetSkin().

Referenced by removeDecal().


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