From fa262641f6a5536ed535af459062bbc424fc9341 Mon Sep 17 00:00:00 2001 From: Nemanja Jovanovic Date: Fri, 17 Jan 2025 12:11:35 +0200 Subject: [PATCH] Simplify RingVertex point type --- src/clipping/weileratherton.jl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/clipping/weileratherton.jl b/src/clipping/weileratherton.jl index 4ae7a9d27..9aa1ba517 100644 --- a/src/clipping/weileratherton.jl +++ b/src/clipping/weileratherton.jl @@ -28,12 +28,12 @@ abstract type Exiting <: VertexType end # Data structure for clipping the polygons. Fields left and right are used depending on the # VertexType, as designated with the helper functions. The data structure forms a directed # graph with each element always pointing to two elements. -mutable struct RingVertex{VT<:VertexType,M<:Manifold,C<:CRS} - point::Point{M,C} - left::RingVertex{<:VertexType,M,C} - right::RingVertex{<:VertexType,M,C} +mutable struct RingVertex{VT<:VertexType,P<:Point} + point::P + left::RingVertex{<:VertexType,P} + right::RingVertex{<:VertexType,P} - function RingVertex{VT,M,C}(point) where {VT<:VertexType,M<:Manifold,C<:CRS} + function RingVertex{VT,P}(point) where {VT<:VertexType,P<:Point} v = new(point) v.left = v v.right = v @@ -41,7 +41,7 @@ mutable struct RingVertex{VT<:VertexType,M<:Manifold,C<:CRS} end end -RingVertex{VT}(point::Point{M,C}) where {VT<:VertexType,M<:Manifold,C<:CRS} = RingVertex{VT,M,C}(point) +RingVertex{VT}(point::P) where {VT<:VertexType,P<:Point} = RingVertex{VT,P}(point) isnormal(::RingVertex{Normal}) = true isnormal(::RingVertex) = false