Navigation
API > API/Runtime > API/Runtime/GeometryCore > API/Runtime/GeometryCore/Image
References
| Module | GeometryCore |
| Header | /Engine/Source/Runtime/GeometryCore/Public/Image/ImageOccupancyMap.h |
| Include | #include "Image/ImageOccupancyMap.h" |
Syntax
class FImageOccupancyMap
Remarks
ImageOccupancyMap calculates and stores coverage information for a 2D image/texture, for example coverage derived from UV islands of a mesh, 2D polygons, etc.
An optional set of gutter texels can be calculated, and correspondence between gutter texels and the nearest interior texel is stored.
In addition, a 2D coordinate (eg UV) and integer ID (eg Triangle ID) of each texel can be calculated/stored. This is not just a cache. For 'border' texels where the texel center is technically outside the mesh/polygon, but the texel rectangle may still overlap the shape, the nearest UV/Triangle is stored. This simplifies computing samples around the borders such that the shape is covered under linear interpolatione/etc.
TODO Some of the names in this class are misleading because the name mentions "Texel" but should actually say "Sample" this is because the class initially supported only one sample per texel but later multi-sampling was added
Variables
| Type | Name | Description | |
|---|---|---|---|
| TArray64< TTuple< int64, int64 > > | BorderTexels | Set of Border Texels, Pair is |
|
| bool | bParallel | ||
| FImageDimensions | Dimensions | Image Dimensions | |
| int32 | GutterSize | Width of the gutter. | |
| TArray64< TTuple< int64, int64 > > | GutterTexels | Set of Gutter Texels. | |
| FGridSampler | PixelSampler | ||
| TArray64< int32 > | TexelInteriorSamples | Count of interior samples for each texel in Tile. Size = Tile.GetWidth() x Tile.GetHeight(). | |
| TArray64< int32 > | TexelQueryTriangle | Integer/Triangle ID for each sample in Tile. | |
| TArray64< FVector2f > | TexelQueryUV | UV for each sample in Tile. Size = Tile.GetWidth() x Tile.GetHeight() x SamplesPerPixel. | |
| TArray64< int32 > | TexelQueryUVChart | UV Chart ID for each texel in Tile. | |
| TArray64< int8 > | TexelType | Classification of each sample in Tile. Size = Tile.GetWidth() x Tile.GetHeight() x SamplesPerPixel. | |
| FImageTile | Tile |
Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | ClassifySamplesFromUVSpaceMesh
(
const MeshType& UVSpaceMesh, |
Void SetTexelType(int64 X, int64 Y, int8 Type) | |
| bool | ComputeFromUVSpaceMesh
(
const MeshType& UVSpaceMesh, |
Computes the image occupancy map from a UV space mesh. | |
| bool | |||
| void | Initialize
(
FImageDimensions DimensionsIn, |
||
| void | Initialize
(
FImageDimensions DimensionsIn, |
||
| void | InitializePixelSampler
(
const int32 SamplesPerPixelIn |
Initialize the pixel sampler. | |
| bool | IsInterior
(
int64 LinearIndex |
||
| void | ParallelProcessingPass
(
TFunctionRef< TexelValueType(int64 LinearIdx)> BeginTexel, |
||
| int32 | TexelNumSamples
(
int64 LinearIndex |
Typedefs
| Name | Description |
|---|---|
| FGridSampler |
Constants
| Name | Description |
|---|---|
| BorderTexel | |
| EmptyTexel | Texel types |
| GutterTexel | |
| InteriorTexel |