mirror of https://github.com/zeldaret/botw.git
ksys/phys: Finish BoxShapeParam
This commit is contained in:
parent
26bd1402f2
commit
a8915c9b05
|
@ -83548,8 +83548,8 @@ Address,Quality,Size,Name
|
|||
0x0000007100faa024,O,000020,_ZNK4ksys4phys17RigidBodyAccessor13getTimeFactorEv
|
||||
0x0000007100faa038,O,000064,_ZNK4ksys4phys17RigidBodyAccessor20getDeltaCenterOfMassEPN4sead7Vector3IfEES5_
|
||||
0x0000007100faa078,O,000564,_ZNK4ksys4phys13BoxShapeParam11createShapeEPN4sead4HeapE
|
||||
0x0000007100faa2ac,U,000224,
|
||||
0x0000007100faa38c,U,000048,
|
||||
0x0000007100faa2ac,O,000224,_ZNK4ksys4phys8BoxShape5cloneEPN4sead4HeapE
|
||||
0x0000007100faa38c,O,000048,_ZN4ksys4phys8BoxShape15setMaterialMaskERKNS0_12MaterialMaskE
|
||||
0x0000007100faa3bc,O,000364,_ZN4ksys4phys8BoxShapeC1ERKNS0_13BoxShapeParamEP11hkpBoxShapeP23hkpConvexTransformShape
|
||||
0x0000007100faa528,O,000080,_ZN4ksys4phys8BoxShapeD1Ev
|
||||
0x0000007100faa578,O,000088,_ZN4ksys4phys8BoxShapeD0Ev
|
||||
|
|
Can't render this file because it is too large.
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue