Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
DebugRendererPlayback.h
Go to the documentation of this file.
1// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
2// SPDX-FileCopyrightText: 2021 Jorrit Rouwe
3// SPDX-License-Identifier: MIT
4
5#pragma once
6
7#ifndef JPH_DEBUG_RENDERER
8 #error This file should only be included when JPH_DEBUG_RENDERER is defined
9#endif // !JPH_DEBUG_RENDERER
10
12#include <Jolt/Core/StreamIn.h>
14
16
19{
20public:
22 DebugRendererPlayback(DebugRenderer &inRenderer) : mRenderer(inRenderer) { }
23
25 void Parse(StreamIn &inStream);
26
28 uint GetNumFrames() const { return (uint)mFrames.size(); }
29
31 void DrawFrame(uint inFrameNumber) const;
32
33private:
35 DebugRenderer & mRenderer;
36
39
42
44 using Frame = DebugRendererRecorder::Frame;
45 Array<Frame> mFrames;
46};
47
unsigned int uint
Definition Core.h:453
#define JPH_NAMESPACE_END
Definition Core.h:379
#define JPH_NAMESPACE_BEGIN
Definition Core.h:373
#define JPH_DEBUG_RENDERER_EXPORT
Definition DebugRenderer.h:13
Definition Array.h:36
Definition DebugRenderer.h:47
Class that can read a recorded stream from DebugRendererRecorder and plays it back trough a DebugRend...
Definition DebugRendererPlayback.h:19
DebugRendererPlayback(DebugRenderer &inRenderer)
Constructor.
Definition DebugRendererPlayback.h:22
uint GetNumFrames() const
Get the number of parsed frames.
Definition DebugRendererPlayback.h:28
Simple binary input stream.
Definition StreamIn.h:13
Definition UnorderedMap.h:30
All information for a single frame.
Definition DebugRendererRecorder.h:90