FImageOccupancyMap

ImageOccupancyMap calculates and stores coverage information for a 2D image/texture, for example coverage derived from UV islands of a mesh, 2D polygons, etc.

Choose your operating system:

Windows

macOS

Linux

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.

Variables

Name Description

Public variable

bool

 

bParallel

Public variable

FImageDimension...

 

Dimensions

Image Dimensions

Public variable

const int8

 

EmptyTexel

Texel types

Public variable

int32

 

GutterSize

Width of the gutter.

Public variable

const int8

 

GutterTexel

Const int8 BorderTexel = 2;

Public variable

TArray64< TTupl...

 

GutterTexels

Set of Gutter Texels.

Public variable

const int8

 

InteriorTexel

Public variable

FGridSampler

 

PixelSampler

Public variable

TArray64< int32...

 

TexelInteriorSamples

Count of samples in the texel that are interior.

Public variable

TArray64< int32...

 

TexelQueryTriangle

Integer/Triangle ID for each texel in image. Only set for Interior texels.

Public variable

TArray64< FVect...

 

TexelQueryUV

UV for each texel in image. Only set for Interior texels

Public variable

TArray64< int32...

 

TexelQueryUVChart

UV Chart ID for each texel in image.

Public variable

TArray64< int8 ...

 

TexelType

Texel Type for each texel in image, Size = Width x Height x Multisamples

Public variable

FImageTile

 

Tile

Functions

Name Description

Public function

bool

 

ComputeFromUVSpaceMesh

(
    const MeshType& UVSpaceMesh,
    GetTriangleIDFuncType GetTriangleID...,
    const TArray< int32 >* UVSpace...
)

Void SetTexelType(int64 X, int64 Y, int8 Type)

Public function

void

 

Initialize

(
    FImageDimensions DimensionsIn,
    int32 SamplesPerPixelIn
)

Public function

void

 

Initialize

(
    FImageDimensions DimensionsIn,
    const FImageTile& TileIn,
    int32 SamplesPerPixelIn
)

Protected function

void

 

InitializePixelSampler

(
    const int32 SamplesPerPixelIn
)

Initialize the pixel sampler.

Public function Const

bool

 

IsInterior

(
    int64 LinearIndex
)

Public function Const

void

 

ParallelProcessingPass

(
    TFunctionRef< TexelValueType(int64 ...,
    TFunctionRef< void LinearIdx,...,
    TFunctionRef< void LinearIdx,...,
    TFunctionRef< void LinearIdx,...,
    TFunctionRef< float(const FVector2i...,
    int32 FilterWidth,
    TArray< TexelValueType >& PassBuff...
)

Public function Const

int32

 

TexelNumSamples

(
    int64 LinearIndex
)

Typedefs

Name

Description

FGridSampler