gwnavruntime/visualdebug/messages/frameblob.h Source File

frameblob.h
Go to the documentation of this file.
1 /*
2 * Copyright 2016 Autodesk, Inc. All rights reserved.
3 * Use of this software is subject to the terms of the Autodesk license agreement and any attachments or Appendices thereto provided at the time of installation or download,
4 * or which otherwise accompanies this software in either electronic or hard copy form, or which is signed by you and accepted by Autodesk.
5 */
6 
7 
8 #pragma once
9 
10 
12 
13 namespace Kaim
14 {
15 
16 // This class is sent on VisualDebug::NewFrame() calls to send information relative to the frame that ends,
17 // and to signify that following blobs are for a new frame.
18 // This is an internal blob expected to be handled by the user of the VisualDebugClient
19 class EndOfFrameBlob
20 {
21  KY_ROOT_BLOB_CLASS(VisualDebugMessage, EndOfFrameBlob, 2)
22 public:
23 
24  EndOfFrameBlob()
25  : m_frameNumber(0)
26  , m_simulationTimeInSeconds(0.f)
27  , m_gameFrameTimeInSeconds(0.f)
28  {}
29 
30  KyUInt32 m_frameNumber;
31  KyFloat32 m_simulationTimeInSeconds;
32  KyFloat32 m_gameFrameTimeInSeconds;
33 };
34 
35 inline void SwapEndianness(Endianness::Target e, EndOfFrameBlob& self)
36 {
37  SwapEndianness(e, self.m_frameNumber);
38  SwapEndianness(e, self.m_simulationTimeInSeconds);
39  SwapEndianness(e, self.m_gameFrameTimeInSeconds);
40 }
41 
42 }
43 
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
Target
Enumerates the possible endianness types relative to the current platform.
Definition: endianness.h:27
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
float KyFloat32
float
Definition: types.h:32