mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-12-02 14:04:14 +01:00
30 lines
507 B
C++
30 lines
507 B
C++
#pragma once
|
|
|
|
class CRect
|
|
{
|
|
public:
|
|
float left; // x min
|
|
float bottom; // y max
|
|
float right; // x max
|
|
float top; // y min
|
|
|
|
CRect(void){
|
|
left = 1000000.0f;
|
|
top = 1000000.0f;
|
|
right = -1000000.0f;
|
|
bottom = -1000000.0f;
|
|
}
|
|
CRect(float l, float t, float r, float b){
|
|
left = l;
|
|
top = t;
|
|
right = r;
|
|
bottom = b;
|
|
}
|
|
void ContainPoint(CVector const &v){
|
|
if(v.x < left) left = v.x;
|
|
if(v.x > right) right = v.x;
|
|
if(v.y < top) top = v.y;
|
|
if(v.y > bottom) bottom = v.y;
|
|
}
|
|
};
|