mirror of
https://github.com/SMGCommunity/Petari.git
synced 2026-11-10 12:51:40 -10:00
45 lines
1.0 KiB
C++
45 lines
1.0 KiB
C++
#pragma once
|
|
|
|
#include <JSystem/JGeometry/TVec.hpp>
|
|
#include <revolution/types.h>
|
|
|
|
class LiveActor;
|
|
class SensorGroup;
|
|
|
|
class HitSensor {
|
|
public:
|
|
HitSensor(u32 type, u16 groupSize, f32 radius, LiveActor* pHost);
|
|
|
|
bool receiveMessage(u32 msg, HitSensor* pSender);
|
|
void setType(u32);
|
|
bool isType(u32) const;
|
|
void validate();
|
|
void invalidate();
|
|
void validateBySystem();
|
|
void invalidateBySystem();
|
|
void addHitSensor(HitSensor* pSensor);
|
|
|
|
const TVec3f& getPosition() const {
|
|
return mPosition;
|
|
}
|
|
|
|
f32 getRadius() const {
|
|
return mRadius;
|
|
}
|
|
|
|
inline bool isValid() const {
|
|
return mValidByHost && mValidBySystem;
|
|
}
|
|
|
|
/* 0x00 */ u32 mType;
|
|
/* 0x04 */ TVec3f mPosition;
|
|
/* 0x10 */ f32 mRadius;
|
|
/* 0x14 */ u16 mSensorCount;
|
|
/* 0x16 */ u16 mGroupSize;
|
|
/* 0x18 */ HitSensor** mSensors;
|
|
/* 0x1C */ SensorGroup* mSensorGroup;
|
|
/* 0x20 */ bool mValidBySystem;
|
|
/* 0x21 */ bool mValidByHost;
|
|
/* 0x24 */ LiveActor* mHost;
|
|
};
|