blob: d4a996fec38bb2523b0042e5e143ebbfa95fbef7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#pragma once
#include <math/seadVector.h>
#include "KingSystem/Physics/RigidBody/physRigidBodyFromShape.h"
namespace ksys::phys {
struct CapsuleShape;
class CapsuleRigidBody : public RigidBodyFromShape {
SEAD_RTTI_OVERRIDE(CapsuleRigidBody, RigidBodyFromShape)
public:
static CapsuleRigidBody* make(RigidBodyInstanceParam* param, sead::Heap* heap);
CapsuleRigidBody(hkpRigidBody* hk_body, CapsuleShape* shape, ContactLayerType layer_type,
const sead::SafeString& name, bool set_flag_10, sead::Heap* heap);
~CapsuleRigidBody() override;
void setRadius(float radius);
void setVertices(const sead::Vector3f& va, const sead::Vector3f& vb);
float getRadius() const;
void getVertices(sead::Vector3f* va, sead::Vector3f* vb) const;
void transformVertices(sead::Vector3f* va, sead::Vector3f* vb);
void setMaterialMask(const MaterialMask& mask);
const MaterialMask& getMaterialMask() const;
float getVolume() override;
protected:
Shape* getShape_() override;
const Shape* getShape_() const override;
u32 getCollisionMasks(RigidBody::CollisionMasks* masks, const u32* unk,
const sead::Vector3f& contact_point) override;
CapsuleShape* mShape{};
};
} // namespace ksys::phys
|