Skip to content

Commit dc17a63

Browse files
committed
nvm, doesn't work
1 parent bae73b3 commit dc17a63

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/boundingboxes.jl

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,15 @@
22

33
Rect(p::AbstractGeometry{N, T}) where {N, T} = Rect{N, T}(p)
44
RectT{T}(p::AbstractGeometry{N}) where {N, T} = Rect{N, T}(p)
5-
Rect{N}(p::AbstractGeometry{_N, T}) where {N <: Val, _N, T} = Rect{N, T}(p)
5+
Rect{N}(p::AbstractGeometry{_N, T}) where {N, _N, T} = Rect{N, T}(p)
66

77
Rect(p::AbstractArray{<: VecTypes{N, T}}) where {N, T} = Rect{N, T}(p)
88
RectT{T}(p::AbstractArray{<: VecTypes{N}}) where {N, T} = Rect{N, T}(p)
99
Rect{N}(p::AbstractArray{<: VecTypes{_N, T}}) where {N, _N, T} = Rect{N, T}(p)
1010

1111
# Implementations
1212
# Specialize fully typed Rect constructors
13-
function Rect{N, T}(geom::AbstractGeometry) where {N, T <: Number}
14-
if applicable(Rect{T}, geom)
15-
@warn "`Rect{T}(geom)` is deprecated as the final boundingbox method. Define `Rect{N, T}(geom)` instead."
16-
return Rect{T}(geom)
17-
else
18-
return Rect{N, T}(coordinates(geom))
19-
end
20-
end
13+
Rect{N, T}(p::AbstractGeometry) where {N, T} = Rect{N, T}(coordinates(p))
2114

2215
function bbox_dim_check(trg, src::Integer)
2316
@assert trg isa Integer "Rect{$trg, $T1} is invalid. This may have happened due to calling Rect{$N1}(obj) to get a bounding box."
@@ -69,4 +62,4 @@ end
6962
# TODO: exact implementation that doesn't rely on coordinates
7063
# function Rect{N, T}(a::Cylinder) where {N, T}
7164
# return Rect{N, T}(...)
72-
# end
65+
# end

0 commit comments

Comments
 (0)