new widgets
This commit is contained in:
parent
5cc982fa00
commit
285ca80b4b
18 changed files with 373 additions and 43 deletions
|
|
@ -30,9 +30,16 @@ namespace tp {
|
|||
|
||||
public:
|
||||
void lookAtPoint(const Vec3F& aTarget, const Vec3F& aPos, Vec3F aUp);
|
||||
void rotate(halnf anglex, halnf angleY);
|
||||
|
||||
// -1 -1 is top left 1 1 is bottom right
|
||||
void move(Vec2F aPos, Vec2F aPrevPos);
|
||||
|
||||
// keeps z axis above your head
|
||||
void rotate(halnf anglex, halnf angleY);
|
||||
|
||||
// -1 -1 is top left 1 1 is bottom right
|
||||
void zoom(halnf ratio);
|
||||
|
||||
void offset_target(halnf val);
|
||||
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -159,6 +159,10 @@ namespace tp {
|
|||
size = p3 - pos;
|
||||
}
|
||||
|
||||
Rect<Type> shrink(Type val) const {
|
||||
return { pos + val, size - val * 2 };
|
||||
}
|
||||
|
||||
// if only one point isInside
|
||||
bool clampOutside(Vec2<Type>& v1, Vec2<Type>& v2) {
|
||||
bool const in1 = isInside(v1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue