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.

Windows
MacOS
Linux

References

Module

GeometricObjects

Header

/Engine/Plugins/Experimental/GeometryProcessing/Source/GeometricObjects/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

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

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< int8 ...

 

TexelType

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

Functions

Name Description

Public function

bool

 

ComputeFromUVSpaceMesh

(
    const MeshType& UVSpaceMesh,
    GetTriangleIDFuncType GetTriangleID...
)

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

Public function

void

 

Initialize

(
    FImageDimensions DimensionsIn
)

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...
)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss