gwnavruntime/visualdebug/messages/frameblob.h Source File

frameblob.h
Go to the documentation of this file.
1 /*
2 * Copyright 2015 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 // primary contact: BRGR - secondary contact: NOBODY
9 #ifndef Navigation_FrameBlob_H
10 #define Navigation_FrameBlob_H
11 
12 
14 
15 namespace Kaim
16 {
17 
18 // This class is sent on VisualDebug::NewFrame() calls to send information relative to the frame that ends,
19 // and to signify that following blobs are for a new frame.
20 // This is an internal blob expected to be handled by the user of the VisualDebugClient
21 class FrameBlob
22 {
23  KY_ROOT_BLOB_CLASS(VisualDebugMessage, FrameBlob, 2)
24 public:
25 
26  FrameBlob()
27  : m_frameNumber(0)
28  , m_simulationTimeInSeconds(0.f)
29  , m_gameFrameTimeInSeconds(0.f)
30  {}
31 
32  KyUInt32 m_frameNumber;
33  KyFloat32 m_simulationTimeInSeconds;
34  KyFloat32 m_gameFrameTimeInSeconds;
35 };
36 
37 inline void SwapEndianness(Endianness::Target e, FrameBlob& self)
38 {
39  SwapEndianness(e, self.m_frameNumber);
40  SwapEndianness(e, self.m_simulationTimeInSeconds);
41  SwapEndianness(e, self.m_gameFrameTimeInSeconds);
42 }
43 
44 }
45 
46 #endif
Target
Enumerates the possible endianness types relative to the current platform.
Definition: endianness.h:35
Definition: gamekitcrowddispersion.h:20
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36
float KyFloat32
Type used internally to represent a 32-bit floating-point number.
Definition: types.h:43