diff options
author | Chris Xiong <chirs241097@gmail.com> | 2015-10-26 22:52:36 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2015-10-26 22:52:36 +0800 |
commit | 3bd383baf6a17e734329e1fc677c7e86283db772 (patch) | |
tree | 69a9148087577f797624ceb9c71323a2563d6bb4 /archive/include/hgerect.h | |
parent | 543e4f570be9b279ba558ca61cc02cda251af384 (diff) | |
download | bullet-lab-remix-3bd383baf6a17e734329e1fc677c7e86283db772.tar.xz |
Added support for relative line numbers.
Added instructions for, brk and cont. (They are still untested...)
Parser code cleanup. Removed garbage output to stderr.
Reorganize the repository structure.
Updated BLR2 code move it into archive.
Added BLR1 files.
Diffstat (limited to 'archive/include/hgerect.h')
-rw-r--r-- | archive/include/hgerect.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/archive/include/hgerect.h b/archive/include/hgerect.h new file mode 100644 index 0000000..9e26907 --- /dev/null +++ b/archive/include/hgerect.h @@ -0,0 +1,35 @@ +/* +** Haaf's Game Engine 1.7 +** Copyright (C) 2003-2007, Relish Games +** hge.relishgames.com +** +** hgeRect helper class +*/ + + +#ifndef HGERECT_H +#define HGERECT_H + + +class hgeRect +{ +public: + float x1, y1, x2, y2; + + hgeRect(float _x1, float _y1, float _x2, float _y2) {x1=_x1; y1=_y1; x2=_x2; y2=_y2; bClean=false; } + hgeRect() {bClean=true;} + + void Clear() {bClean=true;} + bool IsClean() const {return bClean;} + void Set(float _x1, float _y1, float _x2, float _y2) { x1=_x1; x2=_x2; y1=_y1; y2=_y2; bClean=false; } + void SetRadius(float x, float y, float r) { x1=x-r; x2=x+r; y1=y-r; y2=y+r; bClean=false; } + void Encapsulate(float x, float y); + bool TestPoint(float x, float y) const; + bool Intersect(const hgeRect *rect) const; + +private: + bool bClean; +}; + + +#endif |