Go to: Synopsis. Flags. Return value. Keywords. MEL examples.

Synopsis

fluidVoxelInfo [-checkBounds] [-inBounds int int int] [-objectSpace boolean] [-radius double] [-voxel double double double] [-voxelCenter] [-xIndex int] [-yIndex int] [-zIndex int]

fluidVoxelInfo is NOT undoable, queryable, and NOT editable.

Provides basic information about the mapping of a fluid voxel grid into world- or object space of the fluid. Use this command to determine the center point of a voxel, or to find the voxel containing a given point, among other things.

Flags

checkBounds, inBounds, objectSpace, radius, voxel, voxelCenter, xIndex, yIndex, zIndex
Long name (short name) [argument types] Properties
-objectSpace(-os) boolean createquery
Whether the queried value should be returned in object space (TRUE), or world space (FALSE, the default).

In query mode, this flag needs a value.

-voxelCenter(-vc) createquery
The center position of the specified voxels. Returns an array of floats (three for each of the indices in the query). (Valid only with the -xIndex, -yIndex, and -zIndex flags.)

In query mode, this flag needs a value.

-voxel(-v) double double double createquery
Returns array of three ints representing the x, y, z indices of the voxel within which the given point position is contained. If the checkBounds flag is on, and the point is out of bounds, we return nothing. Otherwise, even if the point is out of bounds, index values are returned. When combined with the -radius flag, returns an array of index triples representing a list of voxels within a given radius of the given point position.

In query mode, this flag needs a value.

-checkBounds(-cb) createquery
If this flag is on, and the voxel index of a point that is out of bounds is requested, then we return nothing.

In query mode, this flag needs a value.

-inBounds(-ib) int int int createquery
Are the three ints representing the x, y, z indices of a voxel within the bounds of the fluid's voxel grid? True if yes, false if not. (For 2D fluids, pass in z=0 for the third argument. See examples.)

In query mode, this flag needs a value.

-xIndex(-xi) int createquery
Only return values for cells with this X index

In query mode, this flag needs a value.

-yIndex(-yi) int createquery
Only return values for cells with this Y index

In query mode, this flag needs a value.

-zIndex(-zi) int createquery
Only return values for cells with this Z index

In query mode, this flag needs a value.

-radius(-r) double createquery
Modifier for the -voxel flag. Returns a list of index triples identifying voxels that fall within the given radius of the point specified by the -voxel flag.

In query mode, this flag needs a value.


Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can be used more than once in a command

Return value

None

Keywords

fluid

MEL examples

// fluid3D is a 10x10x5 three-dimensional fluid.
// fluid2D is a 9x9 two-dimensional fluid.
//
// Are the given indices within the bounds of the fluids?
//
fluidVoxelInfo -inBounds 9 9 0 fluid2D;
// Result: false
fluidVoxelInfo -inBounds 8 8 0 fluid2D;
// Result: true
fluidVoxelInfo -inBounds 2 3 4 fluid3D;
// Result: true
fluidVoxelInfo -inBounds 12 9 2 fluid3D;
// Result: false