1
+ /*
2
+ * Copyright (c) 2024-present Mikael K. Aboagye & WD Studios L.L.C.
3
+ * All rights reserved.
4
+ * This Project & Code is Licensed under the MIT License.
5
+ */
6
+
7
+ /*
8
+ * JPHPVDFileManager.h
9
+ *
10
+ * JPHPVDFileManager is responsible for managing and writing data to a file.
11
+ * It provides functions to write body, character, constraint, and soft body shape data.
12
+ */
13
+
14
+ #pragma once
15
+ #include < InspectorPlugin/InspectorPluginDLL.h>
16
+ #include < Foundation/Math/Math.h>
17
+ #include < Jolt/Jolt.h>
18
+
19
+ class nsOSFile ;
20
+ class nsAbstractObjectGraph ;
21
+
22
+ namespace JPH
23
+ {
24
+ class Body ;
25
+ class Character ;
26
+ class Constraint ;
27
+ class SoftBodyShape ;
28
+ }
29
+
30
+ namespace JDebug ::API::IO
31
+ {
32
+ class NS_INSPECTORPLUGIN_DLL JPHPVDFileManager
33
+ {
34
+ public:
35
+ /* *
36
+ * @brief Default constructor.
37
+ */
38
+ JPHPVDFileManager () = default ;
39
+
40
+ /* *
41
+ * @brief Constructor.
42
+ * @param in_file The file to manage and write data to.
43
+ */
44
+ explicit JPHPVDFileManager (const nsOSFile& in_file);
45
+
46
+ /* *
47
+ * @brief Destructor.
48
+ */
49
+ virtual ~JPHPVDFileManager ();
50
+
51
+ /* *
52
+ * @brief Writes body data to the file.
53
+ * @param in_data The body data to write.
54
+ */
55
+ void WriteBodyData (const JPH::Body& in_data);
56
+
57
+ /* *
58
+ * @brief Writes character data to the file.
59
+ * @param in_data The character data to write.
60
+ */
61
+ void WriteCharacterData (const JPH::Character& in_data);
62
+
63
+ /* *
64
+ * @brief Writes constraint data to the file.
65
+ * @param in_data The constraint data to write.
66
+ */
67
+ void WriteConstraintData (const JPH::Constraint& in_data);
68
+
69
+ /* *
70
+ * @brief Writes soft body shape data to the file.
71
+ * @param in_data The soft body shape data to write.
72
+ */
73
+ void WriteSoftBodyShapeData (const JPH::SoftBodyShape& in_data);
74
+ private:
75
+ nsAbstractObjectGraph* m_pGraph; // /< The object graph. this is used to write data to the file.
76
+ };
77
+ }
0 commit comments