using Mapbox.Unity.SourceLayers; using UnityEngine; namespace Mapbox.Unity.Map { using Mapbox.Unity.MeshGeneration.Modifiers; using System; [Serializable] public class LineGeometryOptions : ModifierProperties, ISubLayerLineGeometryOptions { public override Type ModifierType { get { return typeof(LineMeshModifier); } } [Tooltip("Width of the line feature.")] public float Width = 1.0f; [Tooltip("Miter Limit")] public float MiterLimit = 0.2f; [Tooltip("Round Limit")] public float RoundLimit = 1.05f; [Tooltip("Join type of the line feature")] public JoinType JoinType = JoinType.Round; [Tooltip("Cap type of the line feature")] public JoinType CapType = JoinType.Round; /// /// Sets the width of the mesh generated for line features. /// /// Width of the mesh generated for line features. public void SetLineWidth(float width) { if (Width != width) { Width = width; HasChanged = true; } } /// /// Sets the type of line joints /// /// Type of the joint public void SetJoinType(LineJoinType join) { if ((int)JoinType != (int)join) { JoinType = (JoinType)join; HasChanged = true; } } /// /// Sets the type of line beginging and ending caps /// /// Type of the line begin and end caps public void SetCapType(LineCapType cap) { if ((int)CapType != (int)cap) { CapType = (JoinType)cap; HasChanged = true; } } } }