Path: blob/master/thirdparty/jolt_physics/Jolt/Physics/Vehicle/VehicleAntiRollBar.cpp
9913 views
// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)1// SPDX-FileCopyrightText: 2021 Jorrit Rouwe2// SPDX-License-Identifier: MIT34#include <Jolt/Jolt.h>56#include <Jolt/Physics/Vehicle/VehicleAntiRollBar.h>7#include <Jolt/ObjectStream/TypeDeclarations.h>89JPH_NAMESPACE_BEGIN1011JPH_IMPLEMENT_SERIALIZABLE_NON_VIRTUAL(VehicleAntiRollBar)12{13JPH_ADD_ATTRIBUTE(VehicleAntiRollBar, mLeftWheel)14JPH_ADD_ATTRIBUTE(VehicleAntiRollBar, mRightWheel)15JPH_ADD_ATTRIBUTE(VehicleAntiRollBar, mStiffness)16}1718void VehicleAntiRollBar::SaveBinaryState(StreamOut &inStream) const19{20inStream.Write(mLeftWheel);21inStream.Write(mRightWheel);22inStream.Write(mStiffness);23}2425void VehicleAntiRollBar::RestoreBinaryState(StreamIn &inStream)26{27inStream.Read(mLeftWheel);28inStream.Read(mRightWheel);29inStream.Read(mStiffness);30}3132JPH_NAMESPACE_END333435