/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Code/ThirdParty/Jolt/ObjectStream/ObjectStream.cpp
38 строк
1 KB
Jan Krassnigg
Updated Jolt and fixed DLL export issue (#1349)
13 июл 2024, 20:09
Не верифицирован
13 июл 2024, 20:09
ecc487d
Код
Авторство
О чём код?
// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics) // SPDX-FileCopyrightText: 2021 Jorrit Rouwe // SPDX-License-Identifier: MIT #include <Jolt/Jolt.h> #include <Jolt/ObjectStream/ObjectStream.h> #ifdef JPH_OBJECT_STREAM JPH_NAMESPACE_BEGIN // Define macro to declare functions for a specific primitive type #define JPH_DECLARE_PRIMITIVE(name) \ bool OSIsType(name *, int inArrayDepth, EOSDataType inDataType, const char *inClassName) \ { \ return inArrayDepth == 0 && inDataType == EOSDataType::T_##name; \ } \ bool OSReadData(IObjectStreamIn &ioStream, name &outPrimitive) \ { \ return ioStream.ReadPrimitiveData(outPrimitive); \ } \ void OSWriteDataType(IObjectStreamOut &ioStream, name *) \ { \ ioStream.WriteDataType(EOSDataType::T_##name); \ } \ void OSWriteData(IObjectStreamOut &ioStream, const name &inPrimitive) \ { \ ioStream.HintNextItem(); \ ioStream.WritePrimitiveData(inPrimitive); \ } // This file uses the JPH_DECLARE_PRIMITIVE macro to define all types #include <Jolt/ObjectStream/ObjectStreamTypes.h> JPH_NAMESPACE_END #endif // JPH_OBJECT_STREAM