Jump to content
Sign in to follow this  
Macha

Iterating over voxels

Recommended Posts

Does anybody have a short example of inlinecpp that iterates over an existing volume?

 

Thanks.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Thanks Rick, I've been looking at those before but can't get it to work. I can't even find the right includes for the UT_VoxelArrayIterator, and I have tried a lot of them.

 

It makes me think it is an inlinecpp specific problem. That's why I am asking for a short example.

Share this post


Link to post
Share on other sites

No, none of these includes are sufficient. From the examples it looks like they should, but it doesn't work, at least with the inlinecpp stuff.

Share this post


Link to post
Share on other sites

Looks to me as if all handles related to voxel arrays in inlinecpp are spewing out errors related to boost?

Edited by Macha

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×