mirror of https://github.com/zeldaret/botw.git
ksys/phys: Finish QueryContactPointInfo::Iterator
This commit is contained in:
parent
10ad05ef8e
commit
f709a7c612
|
@ -84010,8 +84010,8 @@ Address,Quality,Size,Name
|
||||||
0x0000007100fc3330,O,000068,_ZN4ksys4phys21QueryContactPointInfo4freeEPS1_
|
0x0000007100fc3330,O,000068,_ZN4ksys4phys21QueryContactPointInfo4freeEPS1_
|
||||||
0x0000007100fc3374,O,000004,_ZN4ksys4phys21QueryContactPointInfoD1Ev
|
0x0000007100fc3374,O,000004,_ZN4ksys4phys21QueryContactPointInfoD1Ev
|
||||||
0x0000007100fc3378,O,000036,_ZN4ksys4phys21QueryContactPointInfoD0Ev
|
0x0000007100fc3378,O,000036,_ZN4ksys4phys21QueryContactPointInfoD0Ev
|
||||||
0x0000007100fc339c,U,000088,QueryContactPointInfo::Iterator::x_1
|
0x0000007100fc339c,M,000088,_ZNK4ksys4phys21QueryContactPointInfo8Iterator14getHitPositionEPN4sead7Vector3IfEERKNS0_9ShapeCastE
|
||||||
0x0000007100fc33f4,U,000068,QueryContactPointInfo::Iterator::x_2
|
0x0000007100fc33f4,M,000068,_ZNK4ksys4phys21QueryContactPointInfo8Iterator14getHitPositionERKNS0_9ShapeCastE
|
||||||
0x0000007100fc3438,O,000032,_ZNK4ksys4phys21QueryContactPointInfo8Iterator16getPointPositionEPN4sead7Vector3IfEENS0_16ContactPointInfo8Iterator5PointE
|
0x0000007100fc3438,O,000032,_ZNK4ksys4phys21QueryContactPointInfo8Iterator16getPointPositionEPN4sead7Vector3IfEENS0_16ContactPointInfo8Iterator5PointE
|
||||||
0x0000007100fc3458,O,000056,_ZNK4ksys4phys21QueryContactPointInfo8Iterator16getPointPositionENS0_16ContactPointInfo8Iterator5PointE
|
0x0000007100fc3458,O,000056,_ZNK4ksys4phys21QueryContactPointInfo8Iterator16getPointPositionENS0_16ContactPointInfo8Iterator5PointE
|
||||||
0x0000007100fc3490,M,000284,_ZN4ksys4phys7RayCastC1EPNS0_18SystemGroupHandlerENS0_9GroundHitE
|
0x0000007100fc3490,M,000284,_ZN4ksys4phys7RayCastC1EPNS0_18SystemGroupHandlerENS0_9GroundHitE
|
||||||
|
|
Can't render this file because it is too large.
|
|
@ -1,5 +1,6 @@
|
||||||
#include "KingSystem/Physics/System/physQueryContactPointInfo.h"
|
#include "KingSystem/Physics/System/physQueryContactPointInfo.h"
|
||||||
#include "KingSystem/Physics/System/physContactMgr.h"
|
#include "KingSystem/Physics/System/physContactMgr.h"
|
||||||
|
#include "KingSystem/Physics/System/physShapeCast.h"
|
||||||
|
|
||||||
namespace ksys::phys {
|
namespace ksys::phys {
|
||||||
|
|
||||||
|
@ -17,6 +18,21 @@ void QueryContactPointInfo::free(QueryContactPointInfo* info) {
|
||||||
|
|
||||||
QueryContactPointInfo::~QueryContactPointInfo() = default;
|
QueryContactPointInfo::~QueryContactPointInfo() = default;
|
||||||
|
|
||||||
|
// NON_MATCHING: reordering
|
||||||
|
void QueryContactPointInfo::Iterator::getHitPosition(sead::Vector3f* out,
|
||||||
|
const ShapeCast& shape_cast) const {
|
||||||
|
float distance = getPoint()->separating_distance;
|
||||||
|
auto start = shape_cast.getStart();
|
||||||
|
auto end = shape_cast.getEnd();
|
||||||
|
*out = start + (end - start) * distance;
|
||||||
|
}
|
||||||
|
|
||||||
|
sead::Vector3f QueryContactPointInfo::Iterator::getHitPosition(const ShapeCast& shape_cast) const {
|
||||||
|
sead::Vector3f pos;
|
||||||
|
getHitPosition(&pos, shape_cast);
|
||||||
|
return pos;
|
||||||
|
}
|
||||||
|
|
||||||
void QueryContactPointInfo::Iterator::getPointPosition(sead::Vector3f* out, Point point) const {
|
void QueryContactPointInfo::Iterator::getPointPosition(sead::Vector3f* out, Point point) const {
|
||||||
out->e = getPoint()->position.e;
|
out->e = getPoint()->position.e;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,12 +4,17 @@
|
||||||
|
|
||||||
namespace ksys::phys {
|
namespace ksys::phys {
|
||||||
|
|
||||||
|
class ShapeCast;
|
||||||
|
|
||||||
class QueryContactPointInfo : public ContactPointInfo {
|
class QueryContactPointInfo : public ContactPointInfo {
|
||||||
public:
|
public:
|
||||||
class Iterator : public ContactPointInfo::Iterator {
|
class Iterator : public ContactPointInfo::Iterator {
|
||||||
public:
|
public:
|
||||||
using ContactPointInfo::Iterator::Iterator;
|
using ContactPointInfo::Iterator::Iterator;
|
||||||
|
|
||||||
|
void getHitPosition(sead::Vector3f* out, const ShapeCast& shape_cast) const;
|
||||||
|
sead::Vector3f getHitPosition(const ShapeCast& shape_cast) const;
|
||||||
|
|
||||||
void getPointPosition(sead::Vector3f* out, Point point) const override;
|
void getPointPosition(sead::Vector3f* out, Point point) const override;
|
||||||
sead::Vector3f getPointPosition(Point point) const override;
|
sead::Vector3f getPointPosition(Point point) const override;
|
||||||
};
|
};
|
||||||
|
|
|
@ -47,6 +47,8 @@ public:
|
||||||
void setRotation(const sead::Matrix33f& rotation_matrix);
|
void setRotation(const sead::Matrix33f& rotation_matrix);
|
||||||
void setRotation(const sead::Matrix34f& transform_matrix);
|
void setRotation(const sead::Matrix34f& transform_matrix);
|
||||||
|
|
||||||
|
const sead::Vector3f& getStart() const { return mFrom; }
|
||||||
|
const sead::Vector3f& getEnd() const { return mTo; }
|
||||||
void setStartAndEnd(const sead::Vector3f& start, const sead::Vector3f& end);
|
void setStartAndEnd(const sead::Vector3f& start, const sead::Vector3f& end);
|
||||||
void setStartAndDisplacement(const sead::Vector3f& start, const sead::Vector3f& displacement);
|
void setStartAndDisplacement(const sead::Vector3f& start, const sead::Vector3f& displacement);
|
||||||
void setStartAndDisplacementScaled(const sead::Vector3f& start,
|
void setStartAndDisplacementScaled(const sead::Vector3f& start,
|
||||||
|
|
Loading…
Reference in New Issue