prime/include/MetroidPrime/CCollisionActor.hpp

72 lines
2.7 KiB
C++
Raw Normal View History

#ifndef _CCOLLISIONACTOR
#define _CCOLLISIONACTOR
2022-09-21 05:18:07 +00:00
#include "types.h"
2022-11-26 04:02:24 +00:00
#include "MetroidPrime/CDamageVulnerability.hpp"
#include "MetroidPrime/CHealthInfo.hpp"
2022-09-21 05:18:07 +00:00
#include "MetroidPrime/CPhysicsActor.hpp"
2022-11-26 04:02:24 +00:00
#include "rstl/single_ptr.hpp"
class CCollidableOBBTreeGroupContainer;
class CCollidableOBBTreeGroup;
class CCollidableAABox;
class CCollidableSphere;
2022-09-21 05:18:07 +00:00
class CCollisionActor : public CPhysicsActor {
public:
2022-11-26 04:02:24 +00:00
enum EPrimitiveType {
kPT_OBBTreeGroup,
kPT_AABox,
kPT_Sphere,
};
CCollisionActor(TUniqueId uid, TAreaId areaId, TUniqueId owner, const CVector3f& extent,
const CVector3f& center, bool active, float mass);
CCollisionActor(TUniqueId uid, TAreaId areaId, TUniqueId owner, const CVector3f& boxSize,
bool active, float mass);
CCollisionActor(TUniqueId uid, TAreaId areaId, TUniqueId owner, bool active, float radius,
float mass);
// CEntity
~CCollisionActor() override;
void Accept(IVisitor& visitor) override;
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override;
// CActor
CHealthInfo* HealthInfo(CStateManager&) override;
const CDamageVulnerability* GetDamageVulnerability() const override;
const CDamageVulnerability* GetDamageVulnerability(const CVector3f&, const CVector3f&,
const CDamageInfo&) const override;
rstl::optional_object< CAABox > GetTouchBounds() const override;
void Touch(CActor&, CStateManager&) override;
CVector3f GetOrbitPosition(const CStateManager&) const override;
CVector3f GetScanObjectIndicatorPosition(const CStateManager&) const override;
EWeaponCollisionResponseTypes GetCollisionResponseType(const CVector3f&, const CVector3f&,
const CWeaponMode&,
int /*EProjectileAttrib?*/) const override;
void OnScanStateChange(EScanState, CStateManager&) override;
// CPhysicsActor
CTransform4f GetPrimitiveTransform() const override;
2022-09-21 05:18:07 +00:00
private:
2022-11-26 04:02:24 +00:00
EPrimitiveType x258_primitiveType;
TUniqueId x25c_owner;
CVector3f x260_boxSize;
CVector3f x26c_center;
rstl::single_ptr< CCollidableOBBTreeGroupContainer > x278_obbContainer;
rstl::single_ptr< CCollidableOBBTreeGroup > x27c_obbTreeGroupPrimitive;
rstl::single_ptr< CCollidableAABox > x280_aaboxPrimitive;
rstl::single_ptr< CCollidableSphere > x284_spherePrimitive;
float x288_sphereRadius;
CHealthInfo x28c_healthInfo;
CDamageVulnerability x294_damageVuln;
TUniqueId x2fc_lastTouched;
EWeaponCollisionResponseTypes x300_responseType;
CVector3f x304_extendedTouchBounds;
2022-09-21 05:18:07 +00:00
};
#endif // _CCOLLISIONACTOR