Dungeon Generator  1.6.6
Procedural 3D dungeon generator plugin for Unreal Engine 5. Easy generation of levels, mini-maps and missions.
UDungeonMiniMapWidget Class Reference

#include <DungeonMiniMapWidget.h>

Inheritance diagram for UDungeonMiniMapWidget:

Public Member Functions

 UDungeonMiniMapWidget (const FObjectInitializer &objectInitializer)
 
virtual ~UDungeonMiniMapWidget () override=default
 
void DrawCircle (const FVector &worldLocation, const float worldRadius)
 
void DrawRectangle (const FBox &bounds)
 
bool TransformWorldToRadarWithLayer (FVector2D &radarLocation, const FVector &actorWorldLocation) const noexcept
 
void IconRegisterOrSet (const int32 iconIndex, const AActor *actor, const int32 zOrder)
 
void IconUnregister (const AActor *actor)
 
void IconUnregisterAll ()
 

Protected Member Functions

virtual void NativePreConstruct () override
 
virtual void NativeTick (const FGeometry &geometry, float inDeltaTime) override
 

Protected Attributes

bool bGenerateDungeonMiniMapTextureLayer = true
 
bool bCreateMaskTexture = true
 
bool bIsMapNorthUp = false
 
bool bGenerateMinimapTextureWithSize = false
 
int32 TextureWidth = 512
 
int32 DotScale = 20
 
float PlayerVisibleRadius = 1000.f
 
TObjectPtr< UMaterial > OutMaterial
 
TObjectPtr< UMaterialInstanceDynamic > OutMaterialInstanceDynamic
 
FName BaseTextureName = TEXT("BaseTexture")
 
FName MaskTextureName = TEXT("MaskTexture")
 
TObjectPtr< UImage > OutImage
 
TObjectPtr< UDungeonIconWidgetOutIconWidget
 
float CameraYaw = 0.f
 
float PlayerYaw = 0.f
 

Detailed Description

Helper class for displaying a minimap

  • outputs a minimap texture based on the player's information held by the Widget
  • Outputs the map's material to OutMaterial's BaseTextureName and MaskTextureName
  • Output image position, pivot and rotation to OutImage so that the player is centered
  • Center position of OutImage is calculated based on the range of OutImage's parent widget

ミニマップを表示するためのヘルパークラスです

Widgetが持つプレイヤーの情報を元にミニマップテクスチャを出力します

  • マップのマテリアルをOutMaterialのBaseTextureNameとMaskTextureNameに出力します
  • プレイヤーが中心になるようにイメージの位置とピボットと回転をOutImageに出力します
    • OutImageの中心位置はOutImageの親ウィジットの範囲を元に計算します

Constructor & Destructor Documentation

◆ UDungeonMiniMapWidget()

UDungeonMiniMapWidget::UDungeonMiniMapWidget ( const FObjectInitializer &  objectInitializer)
explicit

constructor コンストラクタ

◆ ~UDungeonMiniMapWidget()

virtual UDungeonMiniMapWidget::~UDungeonMiniMapWidget ( )
overridevirtualdefault

Destructor デストラクタ

Member Function Documentation

◆ DrawCircle()

void UDungeonMiniMapWidget::DrawCircle ( const FVector &  worldLocation,
const float  worldRadius 
)

Drawing a circle on a texture mask

テクスチャマスクに円を描画

◆ DrawRectangle()

void UDungeonMiniMapWidget::DrawRectangle ( const FBox &  bounds)

Drawing a rectangle on a texture mask

テクスチャマスクに矩形を描画

◆ IconRegisterOrSet()

void UDungeonMiniMapWidget::IconRegisterOrSet ( const int32  iconIndex,
const AActor *  actor,
const int32  zOrder 
)

Find the id and set the coordinates. Same as Register for new.

idを検索して座標を設定します。新規の場合はRegisterと同様。

◆ IconUnregister()

void UDungeonMiniMapWidget::IconUnregister ( const AActor *  actor)

Unregister id

idを登録解除します

◆ IconUnregisterAll()

void UDungeonMiniMapWidget::IconUnregisterAll ( )

Unregister all

全て登録解除します

◆ TransformWorldToRadarWithLayer()

bool UDungeonMiniMapWidget::TransformWorldToRadarWithLayer ( FVector2D &  radarLocation,
const FVector &  actorWorldLocation 
) const
noexcept

The same texture layer can be converted from world space to radar space

同じテクスチャレイヤーならワールド空間からレーダー空間に変換します

Member Data Documentation

◆ BaseTextureName

FName UDungeonMiniMapWidget::BaseTextureName = TEXT("BaseTexture")
protected

Name of the parameter to be written as the texture of the map (texture parameter in OutMaterial)

地図のテクスチャとして書き出すパラメータ名(OutMaterial内のテクスチャパラメータ)

◆ bCreateMaskTexture

bool UDungeonMiniMapWidget::bCreateMaskTexture = true
protected

Generate texture masks at the same time if enabled 有効ならテクスチャマスクも同時に生成します

◆ bGenerateDungeonMiniMapTextureLayer

bool UDungeonMiniMapWidget::bGenerateDungeonMiniMapTextureLayer = true
protected

If enabled, generates a DungeonMiniMapTextureLayer If disabled, uses the already generated DungeonMiniMapTextureLayer

有効なら、DungeonMiniMapTextureLayerを生成します 無効なら、生成済みのDungeonMiniMapTextureLayerを利用します

◆ bGenerateMinimapTextureWithSize

bool UDungeonMiniMapWidget::bGenerateMinimapTextureWithSize = false
protected

if enabled, generates a texture for the minimap with the specified texture size if disabled, generates a texture for the minimap with a scale value per dot

有効なら、テクスチャサイズを指定してミニマップのテクスチャを生成します 無効なら、1ドットあたりのスケール値を指定してミニマップのテクスチャを生成します

◆ bIsMapNorthUp

bool UDungeonMiniMapWidget::bIsMapNorthUp = false
protected

If enabled, the mini-map will be north side up If disabled, the mini-map will be placed with the player's front side up.

有効なら、ミニマップは北側が上になります 無効なら、ミニマップはプレイヤーの正面が上になります

◆ CameraYaw

float UDungeonMiniMapWidget::CameraYaw = 0.f
protected

Yaw angle on minimap of player camera

プレイヤーカメラのミニマップ上のヨー角

◆ DotScale

int32 UDungeonMiniMapWidget::DotScale = 20
protected

Scale per dot when generating the texture for the minimap

ミニマップのテクスチャを生成する時の1ドットあたりのスケール

◆ MaskTextureName

FName UDungeonMiniMapWidget::MaskTextureName = TEXT("MaskTexture")
protected

Name of the parameter to be written as the mask texture (texture parameter in OutMaterial)

マスクのテクスチャとして書き出すパラメータ名(OutMaterial内のテクスチャパラメータ)

◆ OutIconWidget

TObjectPtr<UDungeonIconWidget> UDungeonMiniMapWidget::OutIconWidget
protected

Widget for icon drawing When bound to a DungeonIconWidget widget named OutIconWidget, You can use functions related to icons to display icons on the minimap.

アイコン描画のためのウィジット OutIconWidgetという名前のDungeonIconWidgetウィジットにバインドすると、 アイコンに関する関数を使ってミニマップ上にアイコンを表示する事ができます。

◆ OutImage

TObjectPtr<UImage> UDungeonMiniMapWidget::OutImage
protected

Output destination for position and rotation of the minimap image based on the player and camera. Bind to an Image widget named OutImage.

プレイヤーやカメラを元にミニマップ画像の位置や回転の出力先です。 OutImageという名前のImageウィジットにバインドします。

◆ OutMaterial

TObjectPtr<UMaterial> UDungeonMiniMapWidget::OutMaterial
protected

Destination material

出力先マテリアル

◆ OutMaterialInstanceDynamic

TObjectPtr<UMaterialInstanceDynamic> UDungeonMiniMapWidget::OutMaterialInstanceDynamic
protected

Output destination material (material for rewriting) 出力先マテリアル(書き換え用マテリアル)

◆ PlayerVisibleRadius

float UDungeonMiniMapWidget::PlayerVisibleRadius = 1000.f
protected

Area within which the mask texture will be hollowed out. the radius from the player. Units are in centimeters.

マスクテクスチャーをくりぬく範囲 プレイヤーからの半径を指定して下さい。単位はセンチメートル。

◆ PlayerYaw

float UDungeonMiniMapWidget::PlayerYaw = 0.f
protected

Yaw angle on the player's minimap

プレイヤーのミニマップ上のヨー角

◆ TextureWidth

int32 UDungeonMiniMapWidget::TextureWidth = 512
protected

Texture size when generating minimap textures

ミニマップのテクスチャを生成する時のテクスチャサイズ


The documentation for this class was generated from the following files: