Jump to content

Iterating over voxels


Recommended Posts

Hey Marc, I don't have a current inlinecpp example for that. But the docs have a good section on iterating through volumes and their values.

 

http://www.sidefx.com/docs/hdk13.0/_h_d_k__volumes.html

 

This should give you an idea on the functions needed to do that. I'll look at seeing what could be done with the inlinecpp.

 

-Rick

Link to comment
Share on other sites

I believe it should be GU/GU_Detail.h and GU/GU_PrimVolume.h on the HDK side of things.

 

http://www.sidefx.com/docs/hdk13.0/_g_e_o_2_g_e_o__voxel_translator_8_c-example.html

 

http://www.sidefx.com/docs/hdk13.0/standalone_2gengeovolume_8_c-example.html

 

Definitely gonna have to look into it on the inlinecpp side of things.

Link to comment
Share on other sites

If i may ask a question kind of related to this topic : can anyone tell me how to properly use a UT_VoxelArrayIteratorV4 to iterate over a SIM_VectorField.

For now what i'm doing is :

UT_VoxelArrayIteratorF myvectorFieldIterator[3];
for (int i = 0; i < 3; i++)
{
	myvectorFieldIterator[i].setArray(myvectorField->getField(i)->fieldNC());
	myvectorFieldIterator[i].rewind();
}

and what i would like to do is :

UT_VoxelArrayIteratorV4 myvectorFieldIterator;
myvectorFieldIterator.setArray(myvectorField->getField()->fieldNC());

But it seems i can't set a UT_VoxelArrayV4 to the UT_VoxelArrayIteratorV4 with the setArray() method =/

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