UDocumentation
UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ChaosDDScene.h
Go to the documentation of this file.
1
// Copyright Epic Games, Inc. All Rights Reserved.
2
#pragma once
3
4
#include "
ChaosDebugDraw/ChaosDDTypes.h
"
5
#include "Containers/Array.h"
6
#include "
HAL/CriticalSection.h
"
7
#include "
Math/Sphere.h
"
8
9
#define UE_API CHAOS_API
10
11
#if CHAOS_DEBUG_DRAW
12
13
namespace
ChaosDD::Private
14
{
15
class
IChaosDDRenderer
;
16
class
FChaosDDTimeline
;
17
18
//
19
// Debug draw system for a world. In PIE there will be one of these for the server and each client.
20
//
21
// @todo(chaos): enable retention of debug draw frames and debug draw from a specific time
22
class
FChaosDDScene
:
public
TSharedFromThis
<FChaosDDScene>
23
{
24
public
:
25
UE_API
FChaosDDScene
(
const
FString& InName,
bool
bIsServer);
26
UE_API
~FChaosDDScene
();
27
28
const
FString& GetName()
const
29
{
30
return
Name
;
31
}
32
33
UE_API
bool
IsServer()
const
;
34
UE_API
void
SetRenderEnabled
(
bool
bInRenderEnabled
);
35
UE_API
bool
IsRenderEnabled
()
const
;
36
37
// Specify the region of in which we wish to enable debug draw. A radius of zero means everywhere.
38
UE_API
void
SetDrawRegion
(
const
FSphere3d
&
InDrawRegion
);
39
40
// The region of interest
41
UE_API
const
FSphere3d
&
GetDrawRegion
()
const
;
42
43
// Set the line budget for debug draw
44
UE_API
void
SetCommandBudget
(
int32
InCommandBudget
);
45
46
// The number of commands we can draw (also max number of lines for now)
47
UE_API
int32
GetCommandBudget
()
const
;
48
49
// Create a new timeline. E.g., PT, GT, RBAN
50
// The caller must hold a shared pointer to the timeline to keep it alive.
51
UE_API
FChaosDDTimelinePtr
CreateTimeline
(
const
FString&
Name
);
52
53
// Collect all the latest complete frames for rendering
54
UE_API
TArray<FChaosDDFramePtr>
GetLatestFrames
();
55
56
private
:
57
UE_API
TArray<FChaosDDFramePtr>
GetFrames();
58
UE_API
void
PruneTimelines
();
59
60
mutable
FCriticalSection
TimelinesCS
;
61
62
FString
Name
;
63
TArray<FChaosDDTimelineWeakPtr>
Timelines;
64
FSphere3d
DrawRegion
;
65
int32
CommandBudget
;
66
bool
bIsServer;
67
bool
bRenderEnabled
;
68
};
69
}
70
71
#endif
72
73
#undef UE_API
ChaosDDTypes.h
int32
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition
Platform.h:1125
Sphere.h
StaticCastSharedRef
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition
SharedPointer.h:127
CriticalSection.h
FCriticalSection
UE::FPlatformRecursiveMutex FCriticalSection
Definition
CriticalSection.h:53
UE_API
#define UE_API
Definition
SColorGradingComponentViewer.h:12
EVariantTypes::Name
@ Name
TArray
Definition
Array.h:670
TSharedFromThis
Definition
SharedPointer.h:1640
UE::Math::TSphere< double >
Engine
Source
Runtime
Experimental
Chaos
Public
ChaosDebugDraw
ChaosDDScene.h
Generated by
1.9.8