diff --git a/libs/xassets/xphyspreset.cpp b/libs/xassets/xphyspreset.cpp new file mode 100644 index 0000000..39a484a --- /dev/null +++ b/libs/xassets/xphyspreset.cpp @@ -0,0 +1,47 @@ +#include "xphyspreset.h" + +XPhysPreset::XPhysPreset() + : XAsset() + , mNamePtr(0) + , mName("") + , mType(0) + , mMass(0) + , mBounce(0) + , mFriction(0) + , mBulletForceScale(0) + , mExplosiveForceScale(0) + , mSndAliasPrefixPtr(0) + , mSndAliasPrefix("") + , mPiecesSpreadFraction(0) + , mPiecesUpwardVelocity(0) + , mTempDefaultToCylinder(false) +{ + +} + +XPhysPreset::~XPhysPreset() +{ + +} + +void XPhysPreset::ParseData(QDataStream *aStream) +{ + +} + +void XPhysPreset::Clear() +{ + mNamePtr = 0; + mName.clear(); + mType = 0; + mMass = 0; + mBounce = 0; + mFriction = 0; + mBulletForceScale = 0; + mExplosiveForceScale = 0; + mSndAliasPrefixPtr = 0; + mSndAliasPrefix.clear(); + mPiecesSpreadFraction = 0; + mPiecesUpwardVelocity = 0; + mTempDefaultToCylinder = false; +} diff --git a/libs/xassets/xphyspreset.h b/libs/xassets/xphyspreset.h new file mode 100644 index 0000000..d105417 --- /dev/null +++ b/libs/xassets/xphyspreset.h @@ -0,0 +1,38 @@ +#ifndef XPHYSPRESET_H +#define XPHYSPRESET_H + +#include "xasset.h" + +#include + +class XPhysPreset : public XAsset +{ +public: + XPhysPreset(); + ~XPhysPreset(); + + virtual void ParseData(QDataStream* aStream) override; + virtual void Clear() override; + +private: + qint32 mNamePtr; + QString mName; + + int mType; + + float mMass; + float mBounce; + float mFriction; + float mBulletForceScale; + float mExplosiveForceScale; + + qint32 mSndAliasPrefixPtr; + QString mSndAliasPrefix; + + float mPiecesSpreadFraction; + float mPiecesUpwardVelocity; + + bool mTempDefaultToCylinder; +}; + +#endif // XPHYSPRESET_H