public class VoxelsAssignerFactory extends Object
VoxelsAssigner
for buffers of different types.Modifier and Type | Method and Description |
---|---|
static VoxelsAssigner |
createFloat(Voxels<FloatBuffer> voxels,
int valueToAssign)
Create a
VoxelsAssigner for a FloatBuffer . |
static VoxelsAssigner |
createUnsignedByte(Voxels<UnsignedByteBuffer> voxels,
int valueToAssign)
Create a
VoxelsAssigner for a UnsignedByteBuffer . |
static VoxelsAssigner |
createUnsignedInt(Voxels<UnsignedIntBuffer> voxels,
int valueToAssign)
Create a a
VoxelsAssigner for a UnsignedIntBuffer . |
static VoxelsAssigner |
createUnsignedShort(Voxels<UnsignedShortBuffer> voxels,
int valueToAssign)
Create a
VoxelsAssigner for a UnsignedShortBuffer . |
static VoxelsAssigner |
shiftBackBy(VoxelsAssigner voxelsAssigner,
ReadableTuple3i shift)
Shifts all coordinates backwards before passing to another
VoxelsAssigner . |
public static VoxelsAssigner createUnsignedByte(Voxels<UnsignedByteBuffer> voxels, int valueToAssign)
VoxelsAssigner
for a UnsignedByteBuffer
.voxels
- the voxels on which arithmetic is to be performed.valueToAssign
- the voxel-value to assign.public static VoxelsAssigner createUnsignedShort(Voxels<UnsignedShortBuffer> voxels, int valueToAssign)
VoxelsAssigner
for a UnsignedShortBuffer
.voxels
- the voxels on which arithmetic is to be performed.valueToAssign
- the voxel-value to assign.public static VoxelsAssigner createUnsignedInt(Voxels<UnsignedIntBuffer> voxels, int valueToAssign)
VoxelsAssigner
for a UnsignedIntBuffer
.voxels
- the voxels on which arithmetic is to be performed.valueToAssign
- the voxel-value to assign.public static VoxelsAssigner createFloat(Voxels<FloatBuffer> voxels, int valueToAssign)
VoxelsAssigner
for a FloatBuffer
.voxels
- the voxels on which arithmetic is to be performed.valueToAssign
- the voxel-value to assign.public static VoxelsAssigner shiftBackBy(VoxelsAssigner voxelsAssigner, ReadableTuple3i shift)
VoxelsAssigner
.
This is useful for translating from global coordinates to relative coordinates e.g.
translating the global coordinate systems used in BoundedVoxels
to relative
coordinates for underlying voxel buffer.
voxelsAssigner
- the delegate where the shifted coordinates are passed to.shift
- how much to shift back by.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.