Border builder 1.1
The plugin which allows you easily generate borders
Public Member Functions | Properties | List of all members
BorderBuilder.Border Class Reference

The class is responsible for the border creation and setting up other components like MeshCollider and MeshRenderer. More...

Inheritance diagram for BorderBuilder.Border:

Public Member Functions

void GetTriangulation (List< Triangle > triangles)
 Provides access to the triangulation of the shape. If no triangulation was calculated the list will be empty.
 
void AddPoint (Point point)
 Adds the point to the end of the shape.
 
void InsertPoint (int index, Point point)
 Inserts the point to the shape.
 
void RemovePointAt (int index)
 Removes point from the shape.
 
void ClearPoints ()
 Removes all points.
 
void SetPointPosition (int index, Vector3 position)
 Sets point position.
 
bool IsPointInside (Vector3 point)
 Checks whether the point is inside of the border if the triangulation exists otherwise is always false.
 
TriangleGetOverlappingTriangle (Vector3 point)
 Returns the triangle that the point is over if triangulation exist.
 
void Regenerate ()
 Regenerates mesh and sets all required properties.
 

Properties

int PointsCount [get]
 The count of points in the current border.
 
Material BorderMaterial [get, set]
 The material which is going to be used on the border.
 
Material UpperCapMaterial [get, set]
 The material which is going to be used on the upper cap.
 
Material LowerCapMaterial [get, set]
 The material which is going to be used on the lower cap.
 
CapGenerationMode CapGenerationMode [get, set]
 The mode of the cap which is going to be used during the generation.
 
BorderType BorderType [get, set]
 The border type which is going to be used during the generation.
 
float Extend [get, set]
 The width/height of the border depending on BorderBuilder.Border.BorderType.
 
float LowerCapUVScale [get, set]
 The scale of the UV coordinates applied to the lower cap if the generation enabled by BorderBuilder.Border.CapGenerationMode.
 
float UpperCapUVScale [get, set]
 The scale of the UV coordinates applied to the upper cap if the generation enabled by BorderBuilder.Border.CapGenerationMode.
 
Color BorderColor [get, set]
 The color applied to the vertices during the border mesh generation.
 
Color LowerCapColor [get, set]
 The color applied to the vertices of the lower cap if the generation enabled by BorderBuilder.Border.CapGenerationMode.
 
Color UpperCapColor [get, set]
 The color applied to the vertices of the upper cap if the generation enabled by BorderBuilder.Border.CapGenerationMode.
 
Point this[int index] [get, set]
 Provides access to the points of the border.
 

Detailed Description

The class is responsible for the border creation and setting up other components like MeshCollider and MeshRenderer.

Member Function Documentation

◆ AddPoint()

void BorderBuilder.Border.AddPoint ( Point  point)

Adds the point to the end of the shape.

Parameters
pointThe point to be added

◆ GetOverlappingTriangle()

Triangle? BorderBuilder.Border.GetOverlappingTriangle ( Vector3  point)

Returns the triangle that the point is over if triangulation exist.

Parameters
pointThe point to check
Returns
The triangle the point is over or null if none or triangulation doesn't exist

◆ GetTriangulation()

void BorderBuilder.Border.GetTriangulation ( List< Triangle triangles)

Provides access to the triangulation of the shape. If no triangulation was calculated the list will be empty.

Parameters
trianglesWill be filled with triangulation info if available

◆ InsertPoint()

void BorderBuilder.Border.InsertPoint ( int  index,
Point  point 
)

Inserts the point to the shape.

Parameters
indexThe index to be used for insertion
pointThe point to be inserted

◆ IsPointInside()

bool BorderBuilder.Border.IsPointInside ( Vector3  point)

Checks whether the point is inside of the border if the triangulation exists otherwise is always false.

Parameters
pointThe point to check
Returns
True if the point is inside the border and triangulation exists otherwise false

◆ RemovePointAt()

void BorderBuilder.Border.RemovePointAt ( int  index)

Removes point from the shape.

Parameters
indexThe index of the point to be removed

◆ SetPointPosition()

void BorderBuilder.Border.SetPointPosition ( int  index,
Vector3  position 
)

Sets point position.

Parameters
indexThe index of the point the position will be set for
positionThe position that will be set

Property Documentation

◆ this[int index]

Point BorderBuilder.Border.this[int index]
getset

Provides access to the points of the border.

Parameters
indexThe index of point [0, BorderBuilder.Border.PointsCount)

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