mirror of https://github.com/zeldaret/botw.git
ksys/phys: Add RayCastPlusBody
This commit is contained in:
parent
0890d161e5
commit
eca996b3fa
|
@ -84055,16 +84055,16 @@ Address,Quality,Size,Name
|
|||
0x0000007100fc5218,O,000112,_ZNK4ksys4phys7RayCast27checkDerivedRuntimeTypeInfoEPKN4sead15RuntimeTypeInfo9InterfaceE
|
||||
0x0000007100fc5288,O,000092,_ZNK4ksys4phys7RayCast18getRuntimeTypeInfoEv
|
||||
0x0000007100fc52e4,O,000004,_ZN4ksys4phys7RayCast14onRigidBodyHitEPNS0_9RigidBodyE
|
||||
0x0000007100fc52e8,U,000056,phys::RayCastDerived::ctor
|
||||
0x0000007100fc5320,U,000004,phys::RayCastDerived::dtor
|
||||
0x0000007100fc5324,U,000036,phys::RayCastDerived::dtord
|
||||
0x0000007100fc5348,U,000008,phys::RayCastDerived::worldRayCast
|
||||
0x0000007100fc5350,U,000008,phys::RayCastDerived::shapeRayCast
|
||||
0x0000007100fc5358,U,000008,phys::RayCastDerived::phantomRayCast
|
||||
0x0000007100fc5360,U,000008,phys::RayCastDerived::m4
|
||||
0x0000007100fc5368,U,000204,phys::RayCastDerived::rtti1
|
||||
0x0000007100fc5434,U,000092,phys::RayCastDerived::rtti2
|
||||
0x0000007100fc5490,U,000140,sead_rtti_phys::RayCast
|
||||
0x0000007100fc52e8,O,000056,_ZN4ksys4phys15RayCastPlusBodyC1EPNS0_18SystemGroupHandlerENS0_9GroundHitE
|
||||
0x0000007100fc5320,O,000004,_ZN4ksys4phys15RayCastPlusBodyD1Ev
|
||||
0x0000007100fc5324,O,000036,_ZN4ksys4phys15RayCastPlusBodyD0Ev
|
||||
0x0000007100fc5348,O,000008,_ZN4ksys4phys15RayCastPlusBody12worldRayCastENS0_16ContactLayerTypeE
|
||||
0x0000007100fc5350,O,000008,_ZN4ksys4phys15RayCastPlusBody12shapeRayCastEPNS0_9RigidBodyE
|
||||
0x0000007100fc5358,O,000008,_ZN4ksys4phys15RayCastPlusBody14phantomRayCastEPNS0_7PhantomE
|
||||
0x0000007100fc5360,O,000008,_ZN4ksys4phys15RayCastPlusBody14onRigidBodyHitEPNS0_9RigidBodyE
|
||||
0x0000007100fc5368,O,000204,_ZNK4ksys4phys15RayCastPlusBody27checkDerivedRuntimeTypeInfoEPKN4sead15RuntimeTypeInfo9InterfaceE
|
||||
0x0000007100fc5434,O,000092,_ZNK4ksys4phys15RayCastPlusBody18getRuntimeTypeInfoEv
|
||||
0x0000007100fc5490,O,000140,_ZNK4sead15RuntimeTypeInfo6DeriveIN4ksys4phys7RayCastEE9isDerivedEPKNS0_9InterfaceE
|
||||
0x0000007100fc551c,U,000076,phys::RayCastDerived2::ctor
|
||||
0x0000007100fc5568,U,000004,phys::RayCastDerived2::dtor
|
||||
0x0000007100fc556c,U,000036,phys::RayCastDerived2::dtord
|
||||
|
|
Can't render this file because it is too large.
|
|
@ -145,6 +145,8 @@ target_sources(uking PRIVATE
|
|||
System/physQueryContactPointInfo.h
|
||||
System/physRayCast.cpp
|
||||
System/physRayCast.h
|
||||
System/physRayCastPlusBody.cpp
|
||||
System/physRayCastPlusBody.h
|
||||
System/physSensorContactListener.cpp
|
||||
System/physSensorContactListener.h
|
||||
System/physSensorGroupFilter.cpp
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
#include "KingSystem/Physics/System/physRayCastPlusBody.h"
|
||||
|
||||
namespace ksys::phys {
|
||||
|
||||
RayCastPlusBody::RayCastPlusBody(SystemGroupHandler* group_handler, GroundHit ground_hit)
|
||||
: RayCast(group_handler, ground_hit) {}
|
||||
|
||||
RayCastPlusBody::~RayCastPlusBody() = default;
|
||||
|
||||
bool RayCastPlusBody::worldRayCast(ContactLayerType layer_type) {
|
||||
mHitRigidBody = nullptr;
|
||||
return RayCast::worldRayCast(layer_type);
|
||||
}
|
||||
|
||||
bool RayCastPlusBody::shapeRayCast(RigidBody* rigid_body) {
|
||||
mHitRigidBody = nullptr;
|
||||
return RayCast::shapeRayCast(rigid_body);
|
||||
}
|
||||
|
||||
bool RayCastPlusBody::phantomRayCast(Phantom* phantom) {
|
||||
mHitRigidBody = nullptr;
|
||||
return RayCast::phantomRayCast(phantom);
|
||||
}
|
||||
|
||||
void RayCastPlusBody::onRigidBodyHit(RigidBody* body) {
|
||||
mHitRigidBody = body;
|
||||
}
|
||||
|
||||
} // namespace ksys::phys
|
|
@ -0,0 +1,25 @@
|
|||
#pragma once
|
||||
|
||||
#include "KingSystem/Physics/System/physRayCast.h"
|
||||
|
||||
namespace ksys::phys {
|
||||
|
||||
class RayCastPlusBody : public RayCast {
|
||||
SEAD_RTTI_OVERRIDE(RayCastPlusBody, RayCast)
|
||||
public:
|
||||
RayCastPlusBody(SystemGroupHandler* group_handler, GroundHit ground_hit);
|
||||
~RayCastPlusBody() override;
|
||||
|
||||
bool worldRayCast(ContactLayerType layer_type);
|
||||
bool shapeRayCast(RigidBody* rigid_body);
|
||||
bool phantomRayCast(Phantom* phantom);
|
||||
|
||||
RigidBody* getHitRigidBody() const { return mHitRigidBody; }
|
||||
|
||||
void onRigidBodyHit(RigidBody* body) override;
|
||||
|
||||
private:
|
||||
RigidBody* mHitRigidBody{};
|
||||
};
|
||||
|
||||
} // namespace ksys::phys
|
Loading…
Reference in New Issue