Jump to content

realigning gdp attrs to match another gdp


Recommended Posts

Hey. I have a case where I'm creating new points in one gdp that hold the attrib values of specific points from a different gdp, based on a complex point-to-point mapping.

At the moment, in order to copy the values I'm just passing the attrib data of the source point into the new point in the insertion call. I.e., something like:

gdp->insertPoint(srcPt->getPos(), srcPt->getAttrib(), 0, prevPt);

This is fast and convenient...so long as both gdps have the same attributes, and with them stored internally in the same order. Otherwise, I'm obviously facing segfaults and all sorts of other nasty problems. So at the moment, I'm running a check to error out the SOP when there are mismatched attribs, which I'm not too thrilled with.

Obviously I can manually iterate over every individual attribute to do the copy. But that's my last resort. I'm wondering instead if there are builtin methods for realigning the attributes of a gdp to match those of another gdp for this kind of situation.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...