mirror of
https://github.com/unknownworlds/NS.git
synced 2024-12-26 04:10:57 +00:00
5dcc163bd5
git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@379 67975925-1194-0748-b3d5-c16f83f1a3a1
44 lines
1.1 KiB
C++
44 lines
1.1 KiB
C++
#include "mod/AvHBaseInfoLocation.h"
|
|
|
|
AvHBaseInfoLocation::AvHBaseInfoLocation()
|
|
{
|
|
this->mMinExtent = this->mMaxExtent = vec3_t(0, 0, 0);
|
|
}
|
|
|
|
AvHBaseInfoLocation::AvHBaseInfoLocation(const string& inLocationName, const vec3_t& inMaxExtent, const vec3_t& inMinExtent)
|
|
{
|
|
this->mLocationName = inLocationName;
|
|
this->mMaxExtent = inMaxExtent;
|
|
this->mMinExtent = inMinExtent;
|
|
}
|
|
|
|
bool AvHBaseInfoLocation::GetIsPointInRegion(const vec3_t& inPoint) const
|
|
{
|
|
bool thePointIsWithin = false;
|
|
|
|
if((inPoint.x > this->mMinExtent.x) && (inPoint.y > this->mMinExtent.y) /*&& (inPoint.z > this->mMinExtent.z)*/)
|
|
{
|
|
if((inPoint.x < this->mMaxExtent.x) && (inPoint.y < this->mMaxExtent.y) /*&& (inPoint.z < this->mMaxExtent.z)*/)
|
|
{
|
|
thePointIsWithin = true;
|
|
}
|
|
}
|
|
|
|
return thePointIsWithin;
|
|
}
|
|
|
|
string AvHBaseInfoLocation::GetLocationName() const
|
|
{
|
|
return this->mLocationName;
|
|
}
|
|
|
|
vec3_t AvHBaseInfoLocation::GetMaxExtent() const
|
|
{
|
|
return this->mMaxExtent;
|
|
}
|
|
|
|
vec3_t AvHBaseInfoLocation::GetMinExtent() const
|
|
{
|
|
return this->mMinExtent;
|
|
}
|
|
|