HDK check if a point already exists

   2425   4   1
User Avatar
Member
69 posts
Joined: April 2013
Offline
is there a HDK function that will let me input coordinates and see if there is an existing point at those (or close enough) coordinates?

Basically I just want to use the existing point offset instead of creating a new point.
Edited by - Feb. 4, 2014 13:07:43
User Avatar
Member
1908 posts
Joined: Nov. 2006
Online
Take a look in GEO/GEO_PointTree.h. You can build a structure that will allow you to perform such queries.
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
69 posts
Joined: April 2013
Offline
originally worded this badly, but i want to input coordinates and see if a point with those coordinates already exists. if it does i want the point offset.
User Avatar
Member
229 posts
Joined: May 2006
Offline
what graham said .

1) fill your existing points into the point-tree
2) ask the point tree to give you the next point based on your coordinate
3) check if that point has the same location

Seb
User Avatar
Member
1743 posts
Joined: March 2012
Offline
If you're just doing it once, your fastest bet is actually to search through the points sequentially, in parallel, using GA_ROPageHandleV3 to access the point positions, since constructing a point tree takes quite a bit of time in comparison. If you're doing it a bunch of times, GEO_PointTreeGAOffset, like the posts above recommended, though adding new points dynamically to the tree may or may not get expensive; you'll have to experiment. :wink:
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
  • Quick Links