I've been using the next piece of code for years to do 'fast' duplicate point detection in my renderers.
v.x etc is still float but it's contents should now be bit wise comparable while using 4 decimal precision on all part level transformed coordinates.
I also stuff this in a hash list to speed up look ups.
This has worked pretty well for years (reducing vertex count by ~60% when only using positional data)
Code:
kX=(int)floor(v.x*appDef_decCntMul);
kY=(int)floor(v.y*appDef_decCntMul);
kZ=(int)floor(v.z*appDef_decCntMul);
v.x=(GLfloat)kX/appDef_decCntMul;
v.y=(GLfloat)kY/appDef_decCntMul;
v.z=(GLfloat)kZ/appDef_decCntMul;
v.x etc is still float but it's contents should now be bit wise comparable while using 4 decimal precision on all part level transformed coordinates.
I also stuff this in a hash list to speed up look ups.
This has worked pretty well for years (reducing vertex count by ~60% when only using positional data)