FugroRoames / PointClouds.jl

Point cloud data structures in pure julia
Other
11 stars 1 forks source link

Add the ability to specify voxel size in each axis #2

Closed JoshChristie closed 8 years ago

JoshChristie commented 8 years ago

Can now do this:

SparseVoxelGrid(points, 1.0, 2.0, 10.0)

Or if you really wanted to (not likely?):

SparseVoxelGrid(points, Vec(1.0, 2.0, 10.0))
c42f commented 8 years ago

Looks good, only one thought here - if we want to add extra constructors later, having the convenience constructor SparseVoxelGrid(points, 1.0, 2.0, 10.0) will make the extra arguments harder to distinguish.

I'd perhaps be inclined to remove the convenience constructor, and replace it with one taking a tuple SparseVoxelGrid(points, (1.0, 2.0, 10.0)) Then the second argument is the voxel size rather than it being possibly the second, or possibly the second, third, fourth arguments.

So yes, in some ways I prefer the version taking the Vec!

JoshChristie commented 8 years ago

Okay, good idea. I will change it to a tuple. Thanks!