![]() |
LibCarna Version 3.4.0
|
Represents a particular partitioning of volumetric data. More...
#include <VolumeGrid.hpp>
Classes | |
struct | IntensitySelector |
References the intensity volume of a given partition. More... | |
struct | NormalSelector |
References the normal map of a given partition. More... | |
Public Types | |
typedef SegmentIntensityVolumeType | SegmentIntensityVolume |
Reflects the type to use for storing the intensity volume of a single partition. | |
typedef SegmentNormalsVolumeType | SegmentNormalsVolume |
Reflects the type to use for storing the normal map of a single partition. | |
typedef VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType > | Segment |
Reflects the data type that represents a single partition. | |
Public Attributes | |
const math::Vector3ui | maxSegmentSize |
Holds the maximum resolution of a single partition. | |
const math::Vector3ui | segmentCounts |
Holds the number of partitions along each dimension. | |
Represents a particular partitioning of volumetric data.
SegmentIntensityVolumeType | is the base::BufferedIntensityVolume compatible type to use for storing the Intensity volume of a single partition. |
SegmentNormalsVolumeType | is the base::BufferedNormalMap3D compatible type to use for storing the normal map of a single partition. Set to void if the normal map is not required. |
Rendering volume data requires us to upload this data to the GPU. Instead of creating a single, occasionally huge 3D texture, it is a better idea to partition the data into smaller volumes. This reduces the probability of out-of-memory exceptions due to memory fragmentation. Such partitioning induces a grid-like structure, that this class represents. Objects from base::VolumeSegment class represent the cells of such grids.
Definition at line 62 of file VolumeGrid.hpp.
typedef VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType > LibCarna::base::VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::Segment |
Reflects the data type that represents a single partition.
Definition at line 82 of file VolumeGrid.hpp.
typedef SegmentIntensityVolumeType LibCarna::base::VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::SegmentIntensityVolume |
Reflects the type to use for storing the intensity volume of a single partition.
Definition at line 72 of file VolumeGrid.hpp.
typedef SegmentNormalsVolumeType LibCarna::base::VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::SegmentNormalsVolume |
Reflects the type to use for storing the normal map of a single partition.
Definition at line 77 of file VolumeGrid.hpp.
LibCarna::base::VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::VolumeGrid | ( | const math::Vector3ui & | maxSegmentSize, |
const math::Vector3ui & | segmentCounts | ||
) |
Instantiates.
maxSegmentSize | is the maximum resolution of a single partition. |
segmentCounts | is the number of partitions along each dimension. |
Definition at line 202 of file VolumeGrid.hpp.
|
virtual |
Deletes this and all partitions.
Definition at line 224 of file VolumeGrid.hpp.
Selector::VoxelType LibCarna::base::VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::getVoxel | ( | const math::Vector3ui & | location | ) |
Reads the voxel of the volume that the Selector selects from the partition at location.
Definition at line 304 of file VolumeGrid.hpp.
Selector::VoxelType LibCarna::base::VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::getVoxel | ( | unsigned int | x, |
unsigned int | y, | ||
unsigned int | z | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 286 of file VolumeGrid.hpp.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 251 of file VolumeGrid.hpp.
References the partition at location.
location.x() < segmentCounts.x() && location.y() < segmentCounts.y() && location.z() < segmentCounts.z()
Definition at line 242 of file VolumeGrid.hpp.
VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::Segment & LibCarna::base::VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::segmentAt | ( | unsigned int | segmentX, |
unsigned int | segmentY, | ||
unsigned int | segmentZ | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 260 of file VolumeGrid.hpp.
const VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::Segment & LibCarna::base::VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::segmentAt | ( | unsigned int | segmentX, |
unsigned int | segmentY, | ||
unsigned int | segmentZ | ||
) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 273 of file VolumeGrid.hpp.
void LibCarna::base::VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::setVoxel | ( | const math::Vector3ui & | location, |
const typename Selector::VoxelType & | voxel | ||
) |
Writes the voxel of the volume that the Selector selects from the partition at location.
Definition at line 376 of file VolumeGrid.hpp.
void LibCarna::base::VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::setVoxel | ( | unsigned int | x, |
unsigned int | y, | ||
unsigned int | z, | ||
const typename Selector::VoxelType & | voxel | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 313 of file VolumeGrid.hpp.
const math::Vector3ui LibCarna::base::VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::maxSegmentSize |
Holds the maximum resolution of a single partition.
Definition at line 97 of file VolumeGrid.hpp.
const math::Vector3ui LibCarna::base::VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::segmentCounts |
Holds the number of partitions along each dimension.
Definition at line 98 of file VolumeGrid.hpp.
Written by Leonid Kostrykin © 2021–2025. Based on Carna (© 2010-2016).
Documentation generated by Doxygen