Giles Bathgate
Giles Bathgate
@mglisse It's just because the code takes the addresses. So thay can be `/4` on 32bit and `/8` on 64bit. Maybe there is a better way to express this intent?...
>This still looks confusing. A void** (after casting to an integer type) will be a multiple of sizeof(void*) on most platforms, I don't think it needs to be comprehensible to...
@mglisse I don't know how to update the code/comment to clarify the point you are making.
>What your code is doing is assuming a minimal universal alignment requirement for these pointers in a flat memory space. I think that is already an assumption of `Handle_hash_function`: https://github.com/CGAL/cgal/blob/master/Hash_map/include/CGAL/Handle_hash_function.h#L47
>But void * can point at anything -- which makes this much less obvious. It can't point to anything it can only be a handle, the reason to use `sizeof(void*)`...
> Hi @GilesBathgate. I would like to better understand your use case. Are affine transformations something important? When do you apply them. Just after loading a polyhedron? Or you create...
Ah so maybe the code tests `!is_scaling && !is_translation` then re-create the point locator, otherwise transform?
@afabri Yes for script CAD (RapCAD, and OpenSCAD) do translation, rotation, scale, mirror, shear, etc. For example: https://github.com/nophead/NopSCADlib/search?q=translate
In RapCAD I just generalized all transformation modules to construct a 4x4 matrix, and then convert to a Aff_transformation_3. https://github.com/GilesBathgate/RapCAD/blob/master/src/cgalprimitive.cpp#L632 https://github.com/GilesBathgate/RapCAD/blob/master/src/transformmatrix.cpp#L46 I think OpenSCAD does something similar: https://github.com/openscad/openscad/blob/master/src/CGAL_Nef_polyhedron.cc#L120
@afabri Test results for the above using `./transation` benchmark of Nef_3_benchmarks ``` master | 3.47863,3.55981,3.58852,3.62595,3.76185,3.72015,3.72747,3.71695,3.62252,3.81363 | 3.661548 sec average contender | 2.38492,2.35819,2.30894,2.42091,2.43411,2.49426,2.51332,2.48339,2.58183,2.48997 | 2.446984 sec average ```