Struct transvoxel::voxel_coordinates::HighResolutionVoxelIndex [−][src]
pub struct HighResolutionVoxelIndex { pub cell: TransitionCellIndex, pub delta: HighResolutionVoxelDelta, }
Expand description
Index of a high resolution voxel within a block
Fields
cell: TransitionCellIndex
Expand description
Cell within the block
delta: HighResolutionVoxelDelta
Expand description
Voxel within the cell
Implementations
impl HighResolutionVoxelIndex
[src]
impl HighResolutionVoxelIndex
[src]pub fn from(
side: TransitionSide,
cell_u: usize,
cell_v: usize,
u: isize,
v: isize,
w: isize
) -> Self
[src]
pub fn from(
side: TransitionSide,
cell_u: usize,
cell_v: usize,
u: isize,
v: isize,
w: isize
) -> Self
[src]Shorthand constructor
pub fn on_regular_grid(&self) -> bool
[src]
pub fn on_regular_grid(&self) -> bool
[src]Whether the voxel coincides with a voxel on the “regular” grid
pub fn as_regular_index(
&self,
rotation: &Rotation,
block_subdivisions: usize
) -> RegularVoxelIndex
[src]
pub fn as_regular_index(
&self,
rotation: &Rotation,
block_subdivisions: usize
) -> RegularVoxelIndex
[src]Convert to the coinciding regular voxel index. Only valid if self.on_regular_grid()
pub fn to_position_in_block(&self, block: &Block) -> Position
[src]
pub fn to_position_in_block(&self, block: &Block) -> Position
[src]Convert to a relative x, y, z position within the block (0,0,0 being at the block origin, 1,1,1 at the opposite max end)
pub fn to_higher_res_neighbour_block_index(
&self,
this_block_size: usize
) -> RegularVoxelIndex
[src]
pub fn to_higher_res_neighbour_block_index(
&self,
this_block_size: usize
) -> RegularVoxelIndex
[src]self
being a double-resolution voxel on a transition face in this block, it coincides with a regular voxel on the neighbouring block at that face. This gives that voxel’s index within that block
Trait Implementations
impl Add<&'_ HighResolutionVoxelDelta> for &HighResolutionVoxelIndex
[src]
impl Add<&'_ HighResolutionVoxelDelta> for &HighResolutionVoxelIndex
[src]type Output = HighResolutionVoxelIndex
type Output = HighResolutionVoxelIndex
The resulting type after applying the +
operator.
fn add(self, rhs: &HighResolutionVoxelDelta) -> Self::Output
[src]
fn add(self, rhs: &HighResolutionVoxelDelta) -> Self::Output
[src]Performs the +
operation. Read more
impl Debug for HighResolutionVoxelIndex
[src]
impl Debug for HighResolutionVoxelIndex
[src]impl Sub<&'_ HighResolutionVoxelDelta> for &HighResolutionVoxelIndex
[src]
impl Sub<&'_ HighResolutionVoxelDelta> for &HighResolutionVoxelIndex
[src]type Output = HighResolutionVoxelIndex
type Output = HighResolutionVoxelIndex
The resulting type after applying the -
operator.
fn sub(self, rhs: &HighResolutionVoxelDelta) -> Self::Output
[src]
fn sub(self, rhs: &HighResolutionVoxelDelta) -> Self::Output
[src]Performs the -
operation. Read more