This commit is contained in:
aozhiwei 2023-10-14 11:42:08 +08:00
parent 7902c4d582
commit dda5d1a4a7
2 changed files with 12 additions and 0 deletions

View File

@ -143,3 +143,12 @@ bool Collision::Check2dRotationRectangle(float rx, float ry, float r, float dx,
#endif
return (tmp_dx1 - new_rx) * (tmp_dx1 - new_rx) + (tmp_dy1 - new_ry) * (tmp_dy1 - new_ry) <= r * r;
}
bool Collision::IsNearInRange(const glm::vec3& center, const glm::vec3& pos, float range)
{
}
bool Collision::IsNearOutRange(const glm::vec3& center, const glm::vec3& pos, float range) {
}

View File

@ -24,4 +24,7 @@ class Collision
*/
static bool Check2dRotationRectangle(float rx, float ry, float r, float dx, float dy, float dw, float dh, float dro);
static bool IsNearInRange(const glm::vec3& center, const glm::vec3& pos, float range);
static bool IsNearOutRange(const glm::vec3& center, const glm::vec3& pos, float range);
};