CortidQCT  1.2.2.52
Public Member Functions | Public Attributes | List of all members
CortidQCT::VolumeSize Struct Reference

Size type for a 3D voxel. More...

#include <VolumeSize.h>

Public Member Functions

constexpr float operator[] (std::size_t idx) const noexcept
 subscript operator for dimension access More...
 
std::size_t & operator[] (std::size_t idx) noexcept
 subscript operator for dimension access More...
 
constexpr std::size_t linear () const noexcept
 Returns the linear size (i.e. width * height * depth)
 
Comparison operators
constexpr bool operator== (VolumeSize const &rhs) const
 
constexpr bool operator!= (VolumeSize const &rhs) const
 

Public Attributes

std::size_t width = 0
 Size along the x-axis.
 
std::size_t height = 0
 Size along the y-axis.
 
std::size_t depth = 0
 Size along the z-axis.
 

Detailed Description

Size type for a 3D voxel.

Member Function Documentation

constexpr float CortidQCT::VolumeSize::operator[] ( std::size_t  idx) const
inlinenoexcept

subscript operator for dimension access

Order is:

  • 0: width
  • 1: height
  • 2: depth
Parameters
idxIndex
Precondition
idx >= 0 && idx < 3
Returns
value of the indexed dimension
std::size_t& CortidQCT::VolumeSize::operator[] ( std::size_t  idx)
inlinenoexcept

subscript operator for dimension access

Order is:

  • 0: width
  • 1: height
  • 2: depth
Parameters
idxIndex
Precondition
idx >= 0 && idx < 3
Returns
reference to indexed dimension

The documentation for this struct was generated from the following file: