I tried running the example code in Julia-0.50 on Windows 10 with n = 2 (in order to easier comprehend what is going on) but I get the following error message. This message is independent of n. Any idea how I can get the example running? This package looks very promising.
_
_ _ ()_ | A fresh approach to technical computing
() | () () | Documentation: http://docs.julialang.org
_ _ | | __ _ | Type "?help" for help.
| | | | | | |/ ` | |
| | || | | | (| | | Version 0.5.0 (2016-09-19 18:14 UTC)
/ |_'|||_'_| | Official http://julialang.org/ release
|__/ | x86_64-w64-mingw32
julia> using CollisionDetection
julia> using FixedSizeArrays
julia> n = 2
2
julia> p = [Vec(rand(), rand(), rand()) for i in 1:n]
2-element Array{FixedSizeArrays.Vec{3,Float64},1}:
Vec(0.433947,0.26223,0.605567)
Vec(0.729369,0.501393,0.655245)
julia> r = [0.1 * rand() for i in 1:n]
2-element Array{Float64,1}:
0.0884891
0.0976603
julia> tree = Octree(p,r)
ERROR: MethodError: no method matching getindex(::FixedSizeArrays.Vec{3,Float64}, ::CartesianIndex{1})
in macro expansion at .\broadcast.jl:127 [inlined]
in macro expansion at .\simdloop.jl:73 [inlined]
in macro expansion at .\broadcast.jl:123 [inlined]
in _broadcast!(::Base.#min, ::Array{Float64,1}, ::Tuple{Tuple{Bool},Tuple{Bool}}, ::Tuple{Tuple{Int64},Tuple{Int64}}, ::Tuple{FixedSizeArrays.Vec{3,Float64},FixedSizeArrays.Vec{3,Float64}}, ::Type{Val{2}}) at .\broadcast.jl:117
in broadcast!(::Function, ::Array{Float64,1}, ::FixedSizeArrays.Vec{3,Float64}, ::FixedSizeArrays.Vec{3,Float64}) at .\broadcast.jl:172
in broadcast_t(::Function, ::Type{T}, ::FixedSizeArrays.Vec{3,Float64}, ::Vararg{FixedSizeArrays.Vec{3,Float64},N}) at .\broadcast.jl:228
in broadcast(::Function, ::FixedSizeArrays.Vec{3,Float64}, ::FixedSizeArrays.Vec{3,Float64}) at .\broadcast.jl:230
in CollisionDetection.Octree{T,P}(::Array{FixedSizeArrays.Vec{3,Float64},1}, ::Array{Float64,1}, ::Float64, ::Int64, ::Float64) at C:\Users\Floris.julia\v0.5\CollisionDetection\src\octree.jl:84
in CollisionDetection.Octree{T,P}(::Array{FixedSizeArrays.Vec{3,Float64},1}, ::Array{Float64,1}) at C:\Users\Floris.julia\v0.5\CollisionDetection\src\octree.jl:73
I tried running the example code in Julia-0.50 on Windows 10 with n = 2 (in order to easier comprehend what is going on) but I get the following error message. This message is independent of n. Any idea how I can get the example running? This package looks very promising.
_
_ _ ()_ | A fresh approach to technical computing
() | () () | Documentation: http://docs.julialang.org
_ _ | | __ _ | Type "?help" for help.
| | | | | | |/ ` | |
| | || | | | (| | | Version 0.5.0 (2016-09-19 18:14 UTC)
/ |_'|||_'_| | Official http://julialang.org/ release
|__/ | x86_64-w64-mingw32
julia> using CollisionDetection
julia> using FixedSizeArrays
julia> n = 2
2
julia> p = [Vec(rand(), rand(), rand()) for i in 1:n]
2-element Array{FixedSizeArrays.Vec{3,Float64},1}:
Vec(0.433947,0.26223,0.605567)
Vec(0.729369,0.501393,0.655245)
julia> r = [0.1 * rand() for i in 1:n]
2-element Array{Float64,1}:
0.0884891
0.0976603
julia> tree = Octree(p,r)
ERROR: MethodError: no method matching getindex(::FixedSizeArrays.Vec{3,Float64}, ::CartesianIndex{1})
in macro expansion at .\broadcast.jl:127 [inlined]
in macro expansion at .\simdloop.jl:73 [inlined]
in macro expansion at .\broadcast.jl:123 [inlined]
in _broadcast!(::Base.#min, ::Array{Float64,1}, ::Tuple{Tuple{Bool},Tuple{Bool}}, ::Tuple{Tuple{Int64},Tuple{Int64}}, ::Tuple{FixedSizeArrays.Vec{3,Float64},FixedSizeArrays.Vec{3,Float64}}, ::Type{Val{2}}) at .\broadcast.jl:117
in broadcast!(::Function, ::Array{Float64,1}, ::FixedSizeArrays.Vec{3,Float64}, ::FixedSizeArrays.Vec{3,Float64}) at .\broadcast.jl:172
in broadcast_t(::Function, ::Type{T}, ::FixedSizeArrays.Vec{3,Float64}, ::Vararg{FixedSizeArrays.Vec{3,Float64},N}) at .\broadcast.jl:228
in broadcast(::Function, ::FixedSizeArrays.Vec{3,Float64}, ::FixedSizeArrays.Vec{3,Float64}) at .\broadcast.jl:230
in CollisionDetection.Octree{T,P}(::Array{FixedSizeArrays.Vec{3,Float64},1}, ::Array{Float64,1}, ::Float64, ::Int64, ::Float64) at C:\Users\Floris.julia\v0.5\CollisionDetection\src\octree.jl:84
in CollisionDetection.Octree{T,P}(::Array{FixedSizeArrays.Vec{3,Float64},1}, ::Array{Float64,1}) at C:\Users\Floris.julia\v0.5\CollisionDetection\src\octree.jl:73