Carna
Version 3.3.2
|
Represents a particular partitioning of volumetric data. More...
#include <VolumeGrid.h>
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 Member Functions | |
VolumeGrid (const math::Vector3ui &maxSegmentSize, const math::Vector3ui &segmentCounts) | |
Instantiates. More... | |
virtual | ~VolumeGrid () |
Deletes this and all partitions. | |
Segment & | segmentAt (const base::math::Vector3ui &location) |
References the partition at location. More... | |
const Segment & | segmentAt (const base::math::Vector3ui &) const |
Segment & | segmentAt (unsigned int segmentX, unsigned int segmentY, unsigned int segmentZ) |
const Segment & | segmentAt (unsigned int segmentX, unsigned int segmentY, unsigned int segmentZ) const |
template<typename Selector > | |
Selector::VoxelType | getVoxel (const math::Vector3ui &location) |
Reads the voxel of the volume that the Selector selects from the partition at location. | |
template<typename Selector > | |
Selector::VoxelType | getVoxel (unsigned int x, unsigned int y, unsigned int z) |
template<typename Selector > | |
void | 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. | |
template<typename Selector > | |
void | setVoxel (unsigned int x, unsigned int y, unsigned int z, const typename Selector::VoxelType &voxel) |
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 63 of file VolumeGrid.h.
Carna::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 204 of file VolumeGrid.h.
Selector::VoxelType Carna::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 288 of file VolumeGrid.h.
VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::Segment & Carna::base::VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::segmentAt | ( | const base::math::Vector3ui & | location | ) |
References the partition at location.
location.x() < segmentCounts.x() && location.y() < segmentCounts.y() && location.z() < segmentCounts.z()
Definition at line 244 of file VolumeGrid.h.
const VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::Segment & Carna::base::VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::segmentAt | ( | const base::math::Vector3ui & | p | ) | 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 253 of file VolumeGrid.h.
VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::Segment & Carna::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 262 of file VolumeGrid.h.
const VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::Segment & Carna::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 275 of file VolumeGrid.h.
void Carna::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 315 of file VolumeGrid.h.
Documentation generated by Doxygen