Welcome! Log In Create A New Profile

Advanced
Re: T-Junctions re-visited
avatarMarch 19, 2013 10:13PM
For reference I use a std::map for my vertex lookups. My key is a custom class that uses integers to store (x * 100, y * 100, z * 100), and implements operator<. See the TREVertexKey class here:

http://ldview.cvs.sourceforge.net/viewvc/ldview/LDView/TRE/TREVertexKey.h?view=markup

You could do something similar with your adjusted vertices. The std::map class uses a balanced binary tree, so has a lookup performance of O( log n ). Insertion is also O( log n ), but the balancing/heap allocation means that actual time to insert is longer than to do lookups. To be honest, I wouldn't know where to start to write a good hash function for a 3D vector to store them in a hash table.
SubjectAuthorViewsPosted
T-Junctions re-visited Travis Cobbs1104March 11, 2013 10:38PM
Re: T-Junctions re-visited Tim Gould585March 11, 2013 11:31PM
Re: T-Junctions re-visited Roland Melkert487March 12, 2013 11:17AM
Re: T-Junctions re-visited Ben Supnik519March 12, 2013 11:17AM
Re: T-Junctions re-visited Roland Melkert493March 12, 2013 11:22AM
Re: T-Junctions re-visited Ben Supnik471March 12, 2013 11:32AM
Re: T-Junctions re-visited Roland Melkert474March 12, 2013 11:41AM
Re: T-Junctions re-visited Ben Supnik469March 12, 2013 11:55AM
Re: T-Junctions re-visited Roland Melkert480March 13, 2013 10:08AM
Re: T-Junctions re-visited Travis Cobbs499March 13, 2013 11:27AM
Re: T-Junctions re-visited Allen Smith502March 12, 2013 02:01PM
Re: T-Junctions re-visited Michael Heidemann496March 13, 2013 09:27AM
Re: T-Junctions re-visited Ben Supnik470March 13, 2013 10:37AM
Re: T-Junctions re-visited Tim Gould482March 13, 2013 02:31PM
Re: T-Junctions re-visited Michael Heidemann465March 13, 2013 03:42PM
Re: T-Junctions re-visited Michael Heidemann490March 17, 2013 04:35AM
Re: T-Junctions re-visited Ben Supnik431March 17, 2013 08:43AM
Re: T-Junctions re-visited Michael Heidemann438March 17, 2013 08:59AM
Re: T-Junctions re-visited Ben Supnik412March 17, 2013 09:02AM
Re: T-Junctions re-visited Magnus Forsberg448March 17, 2013 09:15AM
Re: T-Junctions re-visited Travis Cobbs508March 17, 2013 10:09PM
Re: T-Junctions re-visited Ben Supnik491March 18, 2013 07:30AM
Re: T-Junctions re-visited Travis Cobbs487March 18, 2013 10:57AM
Re: T-Junctions re-visited Ben Supnik482March 18, 2013 11:27AM
Re: T-Junctions re-visited Travis Cobbs466March 18, 2013 12:23PM
Re: T-Junctions re-visited Ben Supnik556March 18, 2013 01:41PM
Re: T-Junctions re-visited Roland Melkert557March 18, 2013 02:51PM
Re: T-Junctions re-visited Travis Cobbs542March 18, 2013 02:59PM
Re: T-Junctions re-visited Roland Melkert591March 18, 2013 03:41PM
Re: T-Junctions re-visited Ben Supnik594March 18, 2013 06:09PM
Re: T-Junctions re-visited Roland Melkert535March 19, 2013 11:38AM
Re: T-Junctions re-visited Ben Supnik528March 19, 2013 11:43AM
Re: T-Junctions re-visited Roland Melkert561March 19, 2013 07:07PM
Re: T-Junctions re-visited Travis Cobbs557March 19, 2013 10:13PM
Re: T-Junctions re-visited Tim Gould549March 20, 2013 03:56AM
Re: T-Junctions re-visited Travis Cobbs511March 20, 2013 10:13AM
Re: T-Junctions re-visited Ben Supnik517March 20, 2013 10:23AM
Re: T-Junctions re-visited Travis Cobbs558March 20, 2013 10:29AM
Re: T-Junctions re-visited Travis Cobbs505March 20, 2013 10:26AM
Re: T-Junctions re-visited Ben Supnik480March 20, 2013 11:18AM
Re: T-Junctions re-visited Ben Supnik492March 20, 2013 06:42AM
Re: T-Junctions re-visited Roland Melkert477March 20, 2013 11:36AM
Re: T-Junctions re-visited Philippe Hurbain504March 20, 2013 06:36AM
Re: T-Junctions re-visited Ben Supnik514March 20, 2013 06:58AM
Re: T-Junctions re-visited Allen Smith573March 20, 2013 09:08AM
Re: T-Junctions re-visited Roland Melkert646March 20, 2013 11:35AM
Re: T-Junctions re-visited Ben Supnik1056March 20, 2013 11:50AM
Re: T-Junctions re-visited Michael Heidemann557March 18, 2013 03:54PM
Re: T-Junctions re-visited Roland Melkert475March 13, 2013 10:03AM
Re: T-Junctions re-visited Tim Gould439March 13, 2013 03:56PM
Re: T-Junctions re-visited Sergio Reano432March 13, 2013 03:51PM
Re: T-Junctions re-visited Roland Melkert511March 13, 2013 04:36PM
Re: T-Junctions re-visited Tim Gould451March 13, 2013 05:10PM
Re: T-Junctions re-visited Ben Supnik547March 14, 2013 08:17PM
Re: T-Junctions re-visited Tim Gould578March 14, 2013 08:41PM
Re: T-Junctions re-visited Ben Supnik519March 15, 2013 10:56AM
Re: T-Junctions re-visited Roland Melkert490March 15, 2013 11:36AM
Re: T-Junctions re-visited Ben Supnik417March 13, 2013 06:58PM
Re: T-Junctions re-visited Roland Melkert431March 13, 2013 07:27PM
Re: T-Junctions re-visited Ben Supnik419March 13, 2013 07:37PM
Re: T-Junctions re-visited Roland Melkert490March 13, 2013 07:59PM
Re: T-Junctions re-visited Ben Supnik491March 13, 2013 08:18PM
Re: T-Junctions re-visited Travis Cobbs584March 14, 2013 03:23PM
Re: T-Junctions re-visited Roland Melkert591March 14, 2013 03:34PM
Re: T-Junctions re-visited Tim Gould563March 14, 2013 03:41PM
Re: T-Junctions re-visited Roland Melkert536March 15, 2013 11:33AM
Re: T-Junctions re-visited Tim Gould462March 13, 2013 07:43PM
Re: T-Junctions re-visited Roland Melkert482March 13, 2013 08:08PM
Re: T-Junctions re-visited Tim Gould497March 13, 2013 08:18PM
Re: T-Junctions re-visited Ben Supnik582March 14, 2013 08:15PM
Re: T-Junctions re-visited Roland Melkert557March 15, 2013 11:29AM
Re: T-Junctions re-visited Travis Cobbs504March 15, 2013 12:27PM
Re: T-Junctions re-visited Ben Supnik495March 15, 2013 05:08PM
Re: T-Junctions re-visited Travis Cobbs518March 16, 2013 11:29PM
Re: T-Junctions re-visited Ben Supnik443March 17, 2013 08:58AM
Re: T-Junctions re-visited Roland Melkert424March 17, 2013 12:35PM
Re: T-Junctions re-visited Travis Cobbs459March 18, 2013 12:28PM
Re: T-Junctions re-visited Travis Cobbs579March 18, 2013 12:32PM
Re: T-Junctions re-visited Roland Melkert523March 18, 2013 05:00PM
Re: T-Junctions re-visited Travis Cobbs566March 18, 2013 11:05PM
Re: T-Junctions re-visited Roland Melkert628March 19, 2013 11:38AM
Re: T-Junctions re-visited Sergio Reano553March 26, 2013 02:46PM
Re: T-Junctions re-visited Roland Melkert463March 27, 2013 11:19AM
Re: T-Junctions re-visited Sergio Reano567March 27, 2013 01:48PM



Sorry, only registered users may post in this forum.

Click here to login