mirror of
https://github.com/MonsterDruide1/OdysseyDecomp
synced 2026-04-29 20:14:41 +00:00
* Add script to verify formatting * Add newline to end of files * Add `#pragma once` to top of headers * Add own header to includes at top of source files * Remove useless namespace qualifiers * Sort visibility modifiers correctly * Format `#include`s in three blocks * Remove `;` after namespaces * Add for custom style checking to `lint`-GitHub-Action * Format: No "// 0x" offset comments * Remove macros from padding
46 lines
1.5 KiB
C++
46 lines
1.5 KiB
C++
#pragma once
|
|
|
|
#include <math/seadBoundBox.h>
|
|
#include <math/seadMatrix.h>
|
|
#include <math/seadVector.h>
|
|
|
|
#include "Library/Factory/Factory.h"
|
|
#include "Library/HostIO/HioNode.h"
|
|
|
|
namespace al {
|
|
|
|
class AreaShape : public HioNode {
|
|
public:
|
|
AreaShape();
|
|
|
|
virtual bool isInVolume(const sead::Vector3f&) const = 0;
|
|
virtual bool isInVolumeOffset(const sead::Vector3f&, f32) const = 0;
|
|
virtual bool calcNearestEdgePoint(sead::Vector3f*, const sead::Vector3f&) const = 0;
|
|
virtual bool checkArrowCollision(sead::Vector3f*, sead::Vector3f*, const sead::Vector3f&,
|
|
const sead::Vector3f&) const = 0;
|
|
virtual bool calcLocalBoundingBox(sead::BoundBox3f*) const = 0;
|
|
|
|
sead::Vector3f getScale() const { return mScale; }
|
|
|
|
void setBaseMtxPtr(const sead::Matrix34f* baseMtxPtr);
|
|
void setScale(const sead::Vector3f& scale);
|
|
|
|
bool calcLocalPos(sead::Vector3f* localPos, const sead::Vector3f& trans) const;
|
|
bool calcWorldPos(sead::Vector3f* worldPos, const sead::Vector3f& trans) const;
|
|
bool calcWorldDir(sead::Vector3f* worldDir, const sead::Vector3f& trans) const;
|
|
void calcTrans(sead::Vector3f* trans) const;
|
|
|
|
private:
|
|
const sead::Matrix34f* mBaseMtxPtr = nullptr;
|
|
sead::Vector3f mScale = {1.0f, 1.0f, 1.0f};
|
|
};
|
|
|
|
using AreaShapeCreatorFunction = AreaShape* (*)();
|
|
|
|
class AreaShapeFactory : public Factory<AreaShapeCreatorFunction> {
|
|
public:
|
|
AreaShapeFactory(const char* factoryName);
|
|
};
|
|
|
|
} // namespace al
|