mirror of https://github.com/AxioDL/metaforce.git
CPathFindRegion: Make const variant of Data() return a const qualified member
Enforces read-only pointer semantics
This commit is contained in:
parent
ed37919018
commit
8baab44a5d
|
@ -52,26 +52,34 @@ class CPFRegion {
|
||||||
public:
|
public:
|
||||||
CPFRegion() = default;
|
CPFRegion() = default;
|
||||||
explicit CPFRegion(CMemoryInStream& in);
|
explicit CPFRegion(CMemoryInStream& in);
|
||||||
|
|
||||||
void SetData(CPFRegionData* data) { x4c_regionData = data; }
|
void SetData(CPFRegionData* data) { x4c_regionData = data; }
|
||||||
CPFRegionData* Data() const { return x4c_regionData; }
|
CPFRegionData* Data() { return x4c_regionData; }
|
||||||
|
const CPFRegionData* Data() const { return x4c_regionData; }
|
||||||
|
|
||||||
u32 GetIndex() const { return x24_regionIdx; }
|
u32 GetIndex() const { return x24_regionIdx; }
|
||||||
float GetHeight() const { return x14_height; }
|
float GetHeight() const { return x14_height; }
|
||||||
const CPFLink* GetPathLink() const;
|
const CPFLink* GetPathLink() const;
|
||||||
u32 GetNumLinks() const { return x8_numLinks; }
|
u32 GetNumLinks() const { return x8_numLinks; }
|
||||||
u32 GetFlags() const { return x10_flags; }
|
u32 GetFlags() const { return x10_flags; }
|
||||||
const CPFLink* GetLink(u32 i) const { return xc_startLink + i; }
|
const CPFLink* GetLink(u32 i) const { return xc_startLink + i; }
|
||||||
|
|
||||||
void SetCentroid(const zeus::CVector3f& c) { x28_centroid = c; }
|
void SetCentroid(const zeus::CVector3f& c) { x28_centroid = c; }
|
||||||
const zeus::CVector3f& GetCentroid() const { return x28_centroid; }
|
const zeus::CVector3f& GetCentroid() const { return x28_centroid; }
|
||||||
|
|
||||||
void Fixup(CPFArea& area, u32& maxRegionNodes);
|
void Fixup(CPFArea& area, u32& maxRegionNodes);
|
||||||
bool IsPointInside(const zeus::CVector3f& point) const;
|
bool IsPointInside(const zeus::CVector3f& point) const;
|
||||||
|
|
||||||
const zeus::CVector3f& GetNormal() const { return x18_normal; }
|
const zeus::CVector3f& GetNormal() const { return x18_normal; }
|
||||||
u32 GetNumNodes() const { return x0_numNodes; }
|
u32 GetNumNodes() const { return x0_numNodes; }
|
||||||
const CPFNode* GetNode(u32 i) const { return x4_startNode + i; }
|
const CPFNode* GetNode(u32 i) const { return x4_startNode + i; }
|
||||||
|
|
||||||
float PointHeight(const zeus::CVector3f& point) const;
|
float PointHeight(const zeus::CVector3f& point) const;
|
||||||
bool FindClosestPointOnPolygon(const std::vector<zeus::CVector3f>&, const zeus::CVector3f&, const zeus::CVector3f&,
|
bool FindClosestPointOnPolygon(const std::vector<zeus::CVector3f>&, const zeus::CVector3f&, const zeus::CVector3f&,
|
||||||
bool) const;
|
bool) const;
|
||||||
bool FindBestPoint(std::vector<zeus::CVector3f>& polyPoints, const zeus::CVector3f& point, u32 flags,
|
bool FindBestPoint(std::vector<zeus::CVector3f>& polyPoints, const zeus::CVector3f& point, u32 flags,
|
||||||
float paddingSq) const;
|
float paddingSq) const;
|
||||||
|
|
||||||
void SetLinkTo(u32 idx);
|
void SetLinkTo(u32 idx);
|
||||||
void DropToGround(zeus::CVector3f& point) const;
|
void DropToGround(zeus::CVector3f& point) const;
|
||||||
zeus::CVector3f GetLinkMidPoint(const CPFLink& link) const;
|
zeus::CVector3f GetLinkMidPoint(const CPFLink& link) const;
|
||||||
|
|
Loading…
Reference in New Issue