mirror of
https://github.com/zeldaret/botw
synced 2026-07-30 15:53:56 -04:00
ksys/phys: Finish BoxShapeParam
This commit is contained in:
@@ -36,6 +36,16 @@ BoxShape* BoxShapeParam::createShape(sead::Heap* heap) const {
|
||||
return new (heap) BoxShape(*this, box, transform_shape);
|
||||
}
|
||||
|
||||
BoxShape* BoxShape::clone(sead::Heap* heap) const {
|
||||
BoxShapeParam param;
|
||||
param.extents = mExtents;
|
||||
param.translate = mTranslate;
|
||||
param.rotate = mRotate;
|
||||
auto* cloned = param.createShape(heap);
|
||||
cloned->setMaterialMask(mMaterialMask);
|
||||
return cloned;
|
||||
}
|
||||
|
||||
BoxShape::BoxShape(const BoxShapeParam& param, hkpBoxShape* shape,
|
||||
hkpConvexTransformShape* transform_shape)
|
||||
: mExtents(param.extents), mTranslate(param.translate), mRotate(param.rotate),
|
||||
|
||||
@@ -34,6 +34,7 @@ public:
|
||||
hkpConvexTransformShape* transform_shape);
|
||||
~BoxShape() override;
|
||||
|
||||
BoxShape* clone(sead::Heap* heap) const;
|
||||
BoxRigidBody* createBody(bool flag, const RigidBodyInstanceParam& params, sead::Heap* heap);
|
||||
|
||||
bool setExtents(const sead::Vector3f& extents);
|
||||
@@ -66,7 +67,7 @@ struct BoxShapeParam {
|
||||
sead::Vector3f extents;
|
||||
sead::Vector3f translate;
|
||||
sead::Vector3f rotate;
|
||||
float convex_radius;
|
||||
float convex_radius = 0.05;
|
||||
CommonShapeParam common;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user