UMjCameraFeedEntry¶
UMG widget row that binds to a single UMjCamera and displays its live feed.
Its Blueprint counterpart (WBP_MjCameraFeedEntry) must contain:
- UTextBlock "CameraNameText" — displays MjCamera::MjName
- UImage "FeedImage" — shows the render target via a UMaterialInstanceDynamic
Usage:
UMjCameraFeedEntry* Entry = CreateWidget
| Attribute | Value |
|---|---|
| Kind | Class |
| UE Macro | UCLASS |
| Inherits | UUserWidget |
Properties¶
Protected Properties¶
| Property | Type | Description |
|---|---|---|
CameraNameText |
UTextBlock* |
Camera name label. Must exist in the UMG Blueprint. |
FeedImage |
UImage* |
Live feed image. Must exist in the UMG Blueprint. |
Private Properties¶
| Property | Type | Description |
|---|---|---|
DepthPreviewTexture |
UTexture2D* |
Slate-displayable BGRA texture used as the brush resource when the bound |
DepthReadbackScratch |
TArray<FLinearColor> |
Scratch buffer reused by the depth CPU readback to avoid per-tick allocation. |
DepthPreviewTexture¶
Slate-displayable BGRA texture used as the brush resource when the bound
- Type: UTexture2D*
DepthReadbackScratch¶
Scratch buffer reused by the depth CPU readback to avoid per-tick allocation.
- Type: TArray
Functions¶
Public Functions¶
MuJoCo|UI¶
| Function | Returns | Description |
|---|---|---|
BindToCamera() |
void | Binds this entry to a camera. |
UnbindCamera() |
void | Disables streaming on the bound camera and clears internal state. |
UpdateFeed() |
void | Called each tick by the owning widget to keep the image brush valid. |
GetBoundCamera() |
UMjCamera* | Returns the bound camera (for streaming teardown from the owning widget). |
BindToCamera¶
Binds this entry to a camera.
- Signature:
BindToCamera(UMjCamera* InCamera) - Blueprint: 🔵 Callable
UnbindCamera¶
Disables streaming on the bound camera and clears internal state.
- Signature:
UnbindCamera() - Blueprint: 🔵 Callable
UpdateFeed¶
Called each tick by the owning widget to keep the image brush valid.
- Signature:
UpdateFeed() - Blueprint: 🔵 Callable
GetBoundCamera¶
Returns the bound camera (for streaming teardown from the owning widget).
- Signature:
GetBoundCamera() - Blueprint: 🔵 Callable
- Returns: UMjCamera*
Private Functions¶
General¶
| Function | Returns | Description |
|---|---|---|
RefreshBrush() |
void | (Re-)applies the FSlateBrush to FeedImage using the current render target. |
UpdateDepthPreview() |
void | Depth mode: CPU-copy the R32f RT into DepthPreviewTexture as |
RefreshBrush¶
(Re-)applies the FSlateBrush to FeedImage using the current render target.
- Signature:
RefreshBrush()
UpdateDepthPreview¶
Depth mode: CPU-copy the R32f RT into DepthPreviewTexture as
- Signature:
UpdateDepthPreview()