UWaterMeshComponent

Water Mesh Component responsible for generating and rendering a continuous water mesh on top of all the existing water body actors in the world The component contains a quadtree which defines where there are water tiles.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

Water

Header

/Engine/Plugins/Experimental/Water/Source/Runtime/Public/WaterMeshComponent.h

Include

#include "WaterMeshComponent.h"

Syntax

UCLASS(ClassGroup=(Rendering, Water),
       HideCategories=(Object, Activation, "Components|Activation"), EditInlineNew)
class UWaterMeshComponent : public UMeshComponent

Remarks

Water Mesh Component responsible for generating and rendering a continuous water mesh on top of all the existing water body actors in the world The component contains a quadtree which defines where there are water tiles. A function for traversing the quadtree and outputing a list of instance data for each tile to be rendered from a point of view is included

Variables

Name Description

Public variable UProperty Category, EditAnywhere

UMaterialInterf...

 

FarDistanceMaterial

Public variable UProperty Category, EditAnywhere, Meta

float

 

FarDistanceMeshExtent

Public variable UProperty Category, EditAnywhere, Meta

int32

 

ForceCollapseDensityLevel

At above what density level a tile is allowed to force collapse even if not all leaf nodes in the subtree are present.

Public variable UProperty Category BlueprintReadOnly visibleanywhere

FVector

 

RTWorldLocation

Public variable UProperty Category BlueprintReadOnly visibleanywhere

FVector

 

RTWorldSizeVector

Constructors

Name Description

Public function

UWaterMeshComponent()

Functions

Name Description

Public function Const

FIntPoint

 

GetExtentInTiles()

Public function Const

FWaterTileIn...

 

GetFarDistanceInstanceData()

Public function Const

float

 

GetLODScale()

Public function Const

int32

 

GetTessellationFactor()

Public function Const

float

 

GetTileSize()

Public function Const

const TSet< ...

 

GetUsedMaterialsSet()

Public function Const

FMaterialRel...

 

GetWaterMaterialRelevance

(
    ERHIFeatureLevel::Type InFeatureLev...
)

Use this instead of GetMaterialRelevance, since this one will go over all materials from all tiles

Public function Const

const FWater...

 

GetWaterQuadTree()

Public function Const UFunction BlueprintPure, Category

bool

 

IsEnabled()

Public function

void

 

MarkWaterMeshGridDirty()

Public function

void

 

SetExtentInTiles

(
    FIntPoint NewExtentInTiles
)

Public function

void

 

SetLandscapeInfo

(
    const FVector& InRTWorldLocation,
    const FVector& InRTWorldSizeVector
)

HACK jonathan.bard : This is to make sure that the RTWorldLocation / RTWorldSizeVector MPC params can be serialized and set at runtime on the Water MPC.

Public function

void

 

SetTileSize

(
    float NewTileSize
)

Public function

void

 

Update()

Overridden from UPrimitiveComponent

Name Description

Public function Virtual

FPrimitiveSc...

 

CreateSceneProxy()

Creates a proxy to represent the primitive to the scene manager in the rendering thread.

Public function Virtual Const

int32

 

GetNumMaterials()

Return number of material elements in this primitive

Public function Virtual Const

void

 

GetUsedMaterials

(
    TArray< UMaterialInterface* > ...,
    bool bGetDebugMaterials
)

Retrieves the materials used in this component

Public function Virtual

void

 

SetMaterial

(
    int32 ElementIndex,
    UMaterialInterface* Material
)

Changes the material applied to an element of the mesh.

Public function Virtual Const

bool

 

ShouldRenderSelected()

Return true if the owner is selected and this component is selectable

Overridden from UObject

Name Description

Public function Virtual

void

 

PostInitProperties()

Called after the C++ constructor and after the properties have been initialized, including those loaded from config.

Public function Virtual

void

 

PostLoad()

Do any object-specific cleanup required immediately after loading an object.