BorderedMesh
Extends: MarchingSquaresMesh < MeshInstance2D
Description
Bordered Mesh is the base class for visual object that draws the Materials for Dungeondraft.
Properties
Line2D[] | Borders |
Texture | BorderTexture |
bool | Smooth |
bool | isMeshesDirty |
bool | IsMeshWorkerBusy |
int | joint |
Methods
void | SetBorderTexture ( Texture texture ) |
void | FinalizeMeshAndBorders ( ) |
void | UpdateBorders ( ) |
Line2D | AddBorder ( Vector2[] points ) |
void | SmoothMesh ( ) |
void | ForceUpdateMesh ( ) |
Property Descriptions
- Line2D[] Borders:
The Line2D that draws the border of the mesh.
- Texture BorderTexture:
The texture of the border. Does not get automatically updated when set.
- bool Smooth:
Toggle the smoothness of the mesh. Does not get automatically updated when set.
- bool isMeshesDirty:
Gets if the mesh has been modified but not yet visually updated.
- bool IsMeshWorkerBusy:
Gets if the mesh is under a heavy workload to update the mesh. Read only.
- int joint:
The joint mode of the border. Mesh update the border to see it reflected. 0 = Sharp, 1 = Bevel, 2 Round.
Method Descriptions
- void SetBorderTexture ( Texture texture ):
Change the mesh border if applicable.
- void FinalizeMeshAndBorders ( ):
Automatically called by OnDrawingEnd() to calculate the mesh. Heavy CPU load.
- void UpdateBorders ( ):
Clear the existing borders and remake to reflect changes to the mesh. Called by FinalizeMeshAndBorders().
- Line2D AddBorder ( Vector2[] points ):
Create the border based on these points. Automatically called, so changes to the border through this method will be replaced whenever the user draws again.
- void SmoothMesh ( ):
Smooth the edge of the mesh after the mesh has been recreated. Called by FinalizeMeshAndBorders() if the Smooth property is set.
- void ForceUpdateMesh ( ):
Force the mesh to be updated. Heavy.