Jump to content

changing attributes of points in point cloud


Gorrod

Recommended Posts

I'm trying to change the value of an attribute of a point when iterating through a point cloud in an attribute wrangle.

I know i can get the point number that is currently iterated with pcimport, but how do I change an attribute of that point?

I can get its position (or any other attribute) with the point() function but since that is not a pointer/reference I don't know how to change the actual attribute value.

 

Link to comment
Share on other sites

If you have the @ptnum, or the current point index, you can use the setpointattrib function to assign a new value. Check it out in the docs there a few variations.

setpointattrib(geoself(), "sf_enemy_location", @ptnum, set(0,0,0), "set");

 

geoself() can also be represented with the value zero as well.

setpointattrib(0, "P", point_index, set(0,0,0), "set");

Edited by Atom
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...