ksys/chm: Add Rigid

This commit is contained in:
Léo Lam
2021-03-21 16:57:02 +01:00
parent c78af3b981
commit 1394d3536d
4 changed files with 58 additions and 14 deletions
+2
View File
@@ -1,4 +1,6 @@
target_sources(uking PRIVATE
chmShape.cpp
chmShape.h
chmRigid.cpp
chmRigid.h
)
+12
View File
@@ -0,0 +1,12 @@
#include "KingSystem/Chemical/chmRigid.h"
namespace ksys::chm {
Rigid::Rigid()
: attribute(0, "attribute", "フラグ", this),
rigid_set_name({""}, "rigid_set_name", "剛体セット名", this),
rigid_name({""}, "rigid_name", "剛体名", this), volume(1.0, "volume", "直指定体積", this),
mass(1.0, "mass", "直指定質量", this),
burn_out_time(0.0, "burn_out_time", "燃え尽き時間", this) {}
} // namespace ksys::chm
+30
View File
@@ -0,0 +1,30 @@
#pragma once
#include <agl/Utils/aglParameter.h>
#include <agl/Utils/aglParameterObj.h>
#include "KingSystem/Utils/Types.h"
namespace ksys::chm {
class Rigid : public agl::utl::IParameterObj {
public:
Rigid();
u32 getAttribute() const { return attribute.ref(); }
const sead::SafeString& getRigidSetName() const { return rigid_set_name.ref(); }
const sead::SafeString& getRigidName() const { return rigid_name.ref(); }
float getVolume() const { return volume.ref(); }
float getMass() const { return mass.ref(); }
float getBurnOutTime() const { return burn_out_time.ref(); }
private:
agl::utl::Parameter<u32> attribute;
agl::utl::Parameter<sead::FixedSafeString<64>> rigid_set_name;
agl::utl::Parameter<sead::FixedSafeString<64>> rigid_name;
agl::utl::Parameter<float> volume;
agl::utl::Parameter<float> mass;
agl::utl::Parameter<float> burn_out_time;
};
KSYS_CHECK_SIZE_NX150(Rigid, 0x190);
} // namespace ksys::chm