Hojun Yoon Posted May 3, 2020 Share Posted May 3, 2020 Hello, I'm trying to write a microsolver that changes the scalarfield's voxel value according to the points position of the given geometry. So, I'd like to know how to access the voxel data of SIM_ScalarField by index vector without iterating entire field. For example, changing the voxel value in [2, 10, 6] to 1. Thank you. Quote Link to comment Share on other sites More sharing options...
symek Posted May 3, 2020 Share Posted May 3, 2020 You probably need to get access to underlying voxel array via raw field. // SIM_ScalarField *source.... SIM_RawField *raw_field = source->getField(); UT_VoxelArray *array = raw_field->fieldNC(); array->setValue(vx, vy, vz, 1.0f); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.