struct SMFXBreakageParams { enum EBreakageRequestFlags { eBRF_Matrix = BIT(0), eBRF_HitPos = BIT(1), eBRF_HitImpulse = BIT(2), eBRF_Velocity = BIT(3), eBRF_ExplosionImpulse = BIT(4), eBRF_Mass = BIT(5), eBFR_Entity = BIT(6) }; public: uint32 m_flags; public: Matrix34 m_worldTM; public: Vec3 m_vHitPos; public: Vec3 m_vHitImpulse; public: Vec3 m_vVelocity; public: float m_fExplosionImpulse; public: float m_fMass; public: EntityId m_nEntityId; };
IMaterialEffects.h
enum EBreakageRequestFlags { eBRF_Matrix = BIT(0), eBRF_HitPos = BIT(1), eBRF_HitImpulse = BIT(2), eBRF_Velocity = BIT(3), eBRF_ExplosionImpulse = BIT(4), eBRF_Mass = BIT(5), eBFR_Entity = BIT(6) };
IMaterialEffects.h
float m_fExplosionImpulse;
uint32 m_flags;
float m_fMass;
EntityId m_nEntityId;
Vec3 m_vHitImpulse;
Vec3 m_vHitPos;
Vec3 m_vVelocity;
Matrix34 m_worldTM;
bool CheckFlag(EBreakageRequestFlags flag) const;
Checking for flags
void ClearFlag(EBreakageRequestFlags flag);
EntityId GetEntityId() const;
float GetExplosionImpulse() const;
const Vec3& GetHitImpulse() const;
const Vec3& GetHitPos() const;
float GetMass() const;
const Matrix34& GetMatrix() const;
const Vec3& GetVelocity() const;
void SetEntityId(EntityId id);
Entity
void SetExplosionImpulse(float fExplosionImpulse);
Explosion Impulse
void SetFlag(EBreakageRequestFlags flag);
void SetHitImpulse(const Vec3& vHitImpulse);
HitImpulse
void SetHitPos(const Vec3& vHitPos);
HitPos
void SetMass(float fMass);
Mass
void SetMatrix(const Matrix34& worldTM);
Matrix
void SetVelocity(const Vec3& vVelocity);
Velocity
SMFXBreakageParams();