UVolumeTexture::UpdateSourceFromFunction

Updates a volume texture from a user function, which allows for arbitrary [UVolumeTexture](API\Runtime\Engine\Engine\UVolumeTexture) objects to be filled.

Choose your operating system:

Windows

macOS

Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/VolumeTexture.h

Include

#include "Engine/VolumeTexture.h"

Source

/Engine/Source/Runtime/Engine/Private/VolumeTexture.cpp

Syntax

bool UpdateSourceFromFunction
(
    TFunction< void, int32, int32, void *)> Func,
    int32 SizeX,
    int32 SizeY,
    int32 SizeZ,
    ETextureSourceFormat Format
)

Remarks

Updates a volume texture from a user function, which allows for arbitrary UVolumeTexture objects to be filled. The pointer passed to the user function is owned by UVolumeTexture and should be cast to the required type before being filled up with the new voxel data.

Parameters

Parameter

Description

Func

A function taking the x, y, z position as input and returning the texture data for this position.

SizeX

The width of the volume texture.

SizeY

The height of the volume texture.

SizeZ

The depth of the volume texture.

Format

The input volume texture format.