Struct OpenVDS::VDSCoordinateTransformerBase
-
template<int N>
struct VDSCoordinateTransformerBase Public Functions
-
inline FloatVector<3> VoxelIndexToWorldCoordinates(const IntVector<N> &iVoxelIndex) const
Converts a voxel index to world coordinates using the indexer’s IJK grid definition and IJK dimension map
- Parameters:
iVoxelIndex – the voxel index to convert
- Returns:
the world coordinates
-
inline FloatVector<3> VoxelIndexToWorldCoordinates(const FloatVector<N> &rVoxelIndex) const
Converts a float voxel index to world coordinates using the indexer’s IJK grid definition and IJK dimension map
- Parameters:
rVoxelIndex – the float voxel index to convert
- Returns:
the world coordinates
-
inline IntVector<N> WorldCoordinatesToVoxelIndex(const FloatVector<3> &rWorldCoords, const int (&anVoxelMin)[Dimensionality_Max]) const
Converts world coordinates to a voxel index, rounding to the nearest integer
- Parameters:
rWorldCoords – the world coordinates to convert
anVoxelMin –
- Returns:
the voxel index
-
inline FloatVector<N> WorldCoordinatesToVoxelIndexFloat(const FloatVector<3> &rWorldCoords, const int (&anVoxelMin)[Dimensionality_Max]) const
Converts world coordinates to a float voxel index without rounding
- Parameters:
rWorldCoords – the world coordinates to convert
anVoxelMin –
- Returns:
the float voxel index
-
inline VDSCoordinateTransformerBase(const VDSIJKGridDefinition &vdsIjkGridDefinition)
Constructor
- Parameters:
cIJKGridAndDImensionMap – the IJK grid definition and IJK dimension map
-
inline VDSCoordinateTransformerBase()
Constructor
Public Members
-
float ijkToWorldTransform[3][3]
Coordinate transfrom matrix.
-
float worldToIJKTransform[3][3]
Coordinate transform matrix.
-
float ijkToWorldTranslation[3]
Coordinate translation vector.
-
float worldToIJKTranslation[3]
Coordinate translation vector.
-
int ijkDimensionMap[3]
Map to determine which dimension map to I, J, and K.
-
inline FloatVector<3> VoxelIndexToWorldCoordinates(const IntVector<N> &iVoxelIndex) const