Gorgon Game Engine
Bounds.h
Go to the documentation of this file.
1 
3 #pragma once
4 
5 #include <iostream>
6 #include <ostream>
7 #include <string>
8 #include <iomanip>
9 #include <limits>
10 #include <sstream>
11 
12 #include "Point.h"
13 #include "Size.h"
14 #include "../String.h"
15 
16 
17 namespace Gorgon { namespace Geometry {
18 
26  template <class T_>
27  class basic_Bounds {
28  public:
30  typedef T_ BaseType;
31 
34 
37  basic_Bounds(const T_ &left, const T_ &top, const T_ &right, const T_ &bottom) : Left(left), Top(top),
38  Right(right), Bottom(bottom) {
39  Normalize();
40  }
41 
43  basic_Bounds(const basic_Point<T_> &topleft, const basic_Point<T_> &bottomright) : Left(topleft.X), Top(topleft.Y),
44  Right(bottomright.X), Bottom(bottomright.Y) {
45  Normalize();
46  }
47 
49  basic_Bounds(const basic_Point<T_> &topleft, const basic_Size<T_> &size) : Left(topleft.X), Top(topleft.Y),
50  Right(topleft.X+size.Width), Bottom(topleft.Y+size.Height) {
51  Normalize();
52  }
53 
55  basic_Bounds(const T_ &left, const T_ &top, const basic_Size<T_> &size) : Left(left), Top(top),
56  Right(TopLeft().X+size.Width), Bottom(TopLeft().Y+size.Height) {
57  Normalize();
58  }
59 
61  basic_Bounds(const basic_Point<T_> &topleft, const T_ &width, const T_ &height) :
62  Left(topleft.X), Top(topleft.Y), Right(topleft.X+width), Bottom(topleft.Y+height) {
63  Normalize();
64  }
65 
67  template<class O_>
68  explicit basic_Bounds(const basic_Bounds<O_> &r) : Left((T_)r.Left), Top((T_)r.Top),
69  Right((T_)r.Right), Bottom((T_)r.Bottom) {
70  }
71 
72  explicit basic_Bounds(const std::string &str) {
73  auto s=str.begin();
74 
75  while(s!=str.end() && *s==' ')
76  s++;
77 
78  //todo finish parsing....
79  }
80 
81  explicit operator std::string() const {
82  return std::string("[")+String::From(Left)+" - "+String::From(Right)+", "+String::From(Top)+" - "+String::From(Bottom)+"]";
83  }
84 
86  bool operator ==(const basic_Bounds &other) const {
87  return Left==other.Left && Right==other.Right && Top==other.Top && Bottom==other.Bottom;
88  }
89 
91  bool operator !=(const basic_Bounds &other) {
92  return !this->operator==(other);
93  }
94 
97  void Normalize() {
98  using std::swap;
99 
100  if(Left>Right) swap(Left,Right);
101  if(Top>Bottom) swap(Top,Bottom);
102  }
103 
106  return{Left, Top};
107  }
108 
111  return{Right, Top};
112  }
113 
116  return{Left+Width()/2, Top+Height()/2};
117  }
118 
121  return{Left, Bottom};
122  }
123 
126  return{Right, Bottom};
127  }
128 
130  T_ Width() const {
131  return Right-Left;
132  }
133 
135  T_ Height() const {
136  return Bottom-Top;
137  }
138 
139 
142  return{Width(), Height()};
143  }
144 
145  void Resize(const basic_Size<T_> &size) {
146  Right = Left+size.Width;
147  Bottom = Top +size.Height;
148  }
149 
153  return{
154  Left < r.Left ? Left : r.Left,
155  Top < r.Top ? Top : r.Top,
156  Right > r.Right ? Right : r.Right,
157  Bottom> r.Bottom? Bottom: r.Bottom
158  };
159  }
160 
166  Left = Left > Left ? Left : r.Left;
167  Top = Top > Top ? Top : r.Top;
168  Right = Right < Right ? Right : r.Right;
170 
171  if(Left>Right || Top>Bottom) {
172  return{0, 0, 0, 0};
173  }
174 
175  return b;
176  }
177 
181  Left =Left < b.Left ? Left : b.Left ;
182  Top =Top < b.Top ? Top : b.Top ;
183  Right =Right > b.Right ? Right : b.Right ;
185 
186  return *this;
187  }
188 
193  Left =Left > b.Left ? Left : b.Left ;
194  Top =Top > b.Top ? Top : b.Top ;
195  Right =Right < b.Right ? Right : b.Right ;
197 
198  return *this;
199  }
200 
202  void SetWidth(const T_ &width) {
203  Right = Left + width;
204  }
205 
207  void SetHeight(const T_ &height) {
208  Bottom= Top + height;
209  }
210 
212  void Move(const basic_Point<T_> &p) {
213  Right = (Right-Left)+p.X ;
214  Bottom= (Bottom-Top)+p.Y ;
215  Left = p.X ;
216  Top = p.Y ;
217  }
218 
220  void Move(const T_ &x, const T_ &y) {
221  Right = (Right-Left)+x ;
222  Bottom= (Bottom-Top)+y ;
223  Left = x;
224  Top = y;
225  }
226 
230  return{
231  Left + p.X,
232  Top + p.Y,
233  Right + p.X,
234  Bottom + p.Y
235  };
236  }
237 
241  return{
242  Left - p.X,
243  Top - p.Y,
244  Right - p.X,
245  Bottom - p.Y
246  };
247  }
248 
251  return{
252  Left ,
253  Top ,
254  Right + s.Width ,
255  Bottom + s.Height
256  };
257  }
258 
262  return{
263  Left ,
264  Top ,
265  Right - s.Width ,
266  Bottom - s.Height
267  };
268  }
269 
272  template<class O_>
274  return{
275  T_(Left * s.Width),
276  T_(Top * s.Height),
277  T_(Right * s.Width),
278  T_(Bottom * s.Height)
279  };
280  }
281 
284  template<class O_>
286  return{
287  T_(Left / s.Width),
288  T_(Top / s.Height),
289  T_(Right / s.Width),
290  T_(Bottom / s.Height)
291  };
292  }
293 
296  template<class O_>
297  basic_Bounds operator *(const O_ &s) {
298  return{
299  T_(Left * s),
300  T_(Top * s),
301  T_(Right * s),
302  T_(Bottom * s)
303  };
304  }
305 
308  template<class O_>
309  basic_Bounds operator /(const O_ &s) {
310  return{
311  T_(Left / s),
312  T_(Top / s),
313  T_(Right / s),
314  T_(Bottom / s)
315  };
316  }
317 
320  Left += p.X;
321  Top += p.Y;
322  Right += p.X;
323  Bottom += p.Y;
324 
325  return *this;
326  }
327 
330  Left -= p.X;
331  Top -= p.Y;
332  Right -= p.X;
333  Bottom -= p.Y;
334 
335  return *this;
336  }
337 
340  Right += s.Width;
341  Bottom += s.Height;
342 
343  return *this;
344  }
345 
348  Right -= s.Width;
349  Bottom -= s.Height;
350 
351  return *this;
352  }
353 
355  template<class O_>
357  Left = Left *s.Width;
358  Top = Top *s.Height;
359  Right = Right *s.Width;
360  Bottom = Bottom*s.Height;
361 
362  return *this;
363  }
364 
366  template<class O_>
368  Left = Left /s.Width;
369  Top = Top /s.Height;
370  Right = Right /s.Width;
371  Bottom = Bottom/s.Height;
372 
373  return *this;
374  }
375 
377  template<class O_>
378  basic_Bounds &operator *=(const O_ &s) {
379  Left = Left *s;
380  Top = Top *s;
381  Right = Right *s;
382  Bottom = Bottom*s;
383 
384  return *this;
385  }
386 
388  template<class O_>
389  basic_Bounds &operator /=(const O_ &s) {
390  Left = Left /s;
391  Top = Top /s;
392  Right = Right /s;
393  Bottom = Bottom/s;
394 
395  return *this;
396  }
397 
399  T_ Left;
400 
402  T_ Top;
403 
405  T_ Right;
406 
408  T_ Bottom;
409  };
410 
411 
414  template <class T_>
415  std::ostream &operator << (std::ostream &out, const basic_Bounds<T_> &bounds) {
416  out<<"[("<<bounds.Left<<", "<<bounds.Top<<") - ("<<bounds.Right<<", "<<bounds.Bottom<<")]";
417 
418  return out;
419  }
420 
422  template <class T_>
423  std::istream &operator >> (std::istream &in, basic_Bounds<T_> &bounds) {
424  while(in.peek()==' ')
425  in.ignore(1);
426 
427  bool par=false;
428 
429  if(in.peek()=='[') {
430  in.ignore(1);
431  par = true;
432  }
433 
434  decltype(bounds.TopLeft()) tl, br;
435 
436  in>>tl;
437 
438  while(in.peek()==' ')
439  in.ignore(1);
440 
441  if(in.peek()=='-') {
442  in.ignore(1);
443  }
444 
445  in>>br;
446 
447  if(in.bad()) return in;
448 
449  bounds.Top =tl.Y;
450  bounds.Left =tl.X;
451  bounds.Bottom=br.Y;
452  bounds.Right =br.X;
453 
454 
455  if(par) {
456  while(in.peek()==' ') {
457  in.ignore(1);
458  }
459  }
460 
461  if(in.peek()==']')
462  in.ignore(1);
463 
464  return in;
465  }
466 
470  template <class T_>
473  b.Left = l.Left > l.Left ? l.Left : r.Left;
474  b.Top = l.Top > l.Top ? l.Top : r.Top;
475  b.Right = l.Right < l.Right ? l.Right : r.Right;
476  b.Bottom= l.Bottom< l.Bottom? l.Bottom: r.Bottom;
477 
478  if(b.Left>b.Right || b.Top>b.Bottom) {
479  return basic_Bounds<T_>(0,0,0,0);
480  }
481 
482  return b;
483  }
484 
487  template <class T_>
489  return{
490  l.Left < r.Left ? l.Left : r.Left ,
491  l.Top < r.Top ? l.Top : r.Top ,
492  l.Right > r.Right ? l.Right : r.Right ,
493  l.Bottom> r.Bottom? l.Bottom: r.Bottom
494  };
495  }
496 
499  template <class T_>
500  bool IsColliding(const basic_Bounds<T_> &l, const basic_Bounds<T_> &r) {
501  // check disjunction x-coordinates
502  if(l.Left > r.Right) return false;
503  if(l.Right < r.Left) return false;
504 
505  // check disjunction on y-coordinates
506  if(l.Top > r.Bottom) return false;
507  if(l.Bottom < r.Top) return false;
508 
509  return true;
510  }
511 
513  template<class T_>
514  bool IsInside(const basic_Bounds<T_> &b, const basic_Point<T_> &p) {
515  return p.X>=b.Left && p.Y>=b.Top && p.X<b.Right && p.Y<b.Bottom;
516  }
517 
519  template<class T_>
520  bool Contains(const basic_Bounds<T_> &outer, const basic_Bounds<T_> &inner) {
521  return inner.Left >= outer.Left && inner.Top >= outer.Top && inner.Right <= outer.Right && inner.Bottom <= outer.Bottom;
522  }
523 
525  template<class T_, class O_>
526  void Translate(basic_Bounds<T_> &bounds, O_ x, O_ y) {
527  bounds.Left += x;
528  bounds.Right += x;
529  bounds.Top += y;
530  bounds.Bottom+= y;
531  }
532 
534  template<class T_>
535  void Translate(basic_Bounds<T_> &bounds, const basic_Point<T_> &other) {
536  bounds.Left += other.X;
537  bounds.Right += other.X;
538  bounds.Top += other.Y;
539  bounds.Bottom+= other.Y;
540  }
541 
543  template <class T_, class O_>
544  void Scale(basic_Bounds<T_> &bounds, const O_ &size) {
545  Float xc = ( bounds.Left + bounds.Right ) / Float(2);
546  Float yc = ( bounds.Top + bounds.Bottom) / Float(2);
547 
548  bounds.Left = T_( (bounds.Left - xc)*size + xc );
549  bounds.Right = T_( (bounds.Right - xc)*size + xc );
550  bounds.Top = T_( (bounds.Top - yc)*size + yc );
551  bounds.Left = T_( (bounds.Left - yc)*size + yc );
552  }
553 
555  template <class T_, class O_>
556  void Scale(basic_Bounds<T_> &bounds, const O_ &sizex, const O_ &sizey) {
557  Float xc = ( bounds.Left + bounds.Right ) / Float(2);
558  Float yc = ( bounds.Top + bounds.Bottom) / Float(2);
559 
560  bounds.Left = T_( (bounds.Left - xc)*sizex + xc );
561  bounds.Right = T_( (bounds.Right - xc)*sizex + xc );
562  bounds.Top = T_( (bounds.Top - yc)*sizey + yc );
563  bounds.Left = T_( (bounds.Left - yc)*sizey + yc );
564  }
565 
567  template <class T_, class O_>
568  void Scale(basic_Bounds<T_> &bounds, const basic_Size<O_> &size) {
569  Float xc = ( bounds.Left + bounds.Right ) / Float(2);
570  Float yc = ( bounds.Top + bounds.Bottom) / Float(2);
571 
572  bounds.Left = T_( (bounds.Left - xc)*size.Width + xc );
573  bounds.Right = T_( (bounds.Right - xc)*size.Width + xc );
574  bounds.Top = T_( (bounds.Top - yc)*size.Height + yc );
575  bounds.Left = T_( (bounds.Left - yc)*size.Height + yc );
576  }
577 
580  template <class T_, class O_>
581  void Scale(basic_Bounds<T_> &bounds, const O_ &size, const basic_Point<T_> &origin) {
582  bounds.Left = T_( (bounds.Left - origin.X)*size + origin.X );
583  bounds.Right = T_( (bounds.Right - origin.X)*size + origin.X );
584  bounds.Top = T_( (bounds.Top - origin.Y)*size + origin.Y );
585  bounds.Left = T_( (bounds.Left - origin.Y)*size + origin.Y );
586  }
587 
590  template <class T_, class O_>
591  void Scale(basic_Bounds<T_> &bounds, const O_ &sizex, const O_ &sizey, const basic_Point<T_> &origin) {
592  bounds.Left = T_( (bounds.Left - origin.X)*sizex + origin.X );
593  bounds.Right = T_( (bounds.Right - origin.X)*sizex + origin.X );
594  bounds.Top = T_( (bounds.Top - origin.Y)*sizey + origin.Y );
595  bounds.Left = T_( (bounds.Left - origin.Y)*sizey + origin.Y );
596  }
597 
600  template <class T_, class O_>
601  void Scale(basic_Bounds<T_> &bounds, const basic_Size<O_> &size, const basic_Point<T_> &origin) {
602  bounds.Left = T_( (bounds.Left - origin.X)*size.Width + origin.X );
603  bounds.Right = T_( (bounds.Right - origin.X)*size.Width + origin.X );
604  bounds.Top = T_( (bounds.Top - origin.Y)*size.Height + origin.Y );
605  bounds.Left = T_( (bounds.Left - origin.Y)*size.Height + origin.Y );
606  }
607 
608 
613  template<class T_>
614  void Rotate(basic_Bounds<T_> &bounds, Float angle) {
615  basic_Point<T_> cn = bounds.Center();
616  basic_Point<T_> tl = bounds.TopLeft();
617  basic_Point<T_> tr = bounds.TopRight();
618  basic_Point<T_> bl = bounds.BottomLeft();
619  basic_Point<T_> br = bounds.BottomRight();
620 
621  Rotate(tl, angle, cn);
622  Rotate(tr, angle, cn);
623  Rotate(bl, angle, cn);
624  Rotate(br, angle, cn);
625 
626  bounds.Left = std::min( std::min(tl.X, tr.X) , std::min(bl.X, br.X) );
627  bounds.Right = std::max( std::max(tl.X, tr.X) , std::max(bl.X, br.X) );
628  bounds.Top = std::min( std::min(tl.Y, tr.Y) , std::min(bl.Y, br.Y) );
629  bounds.Bottom= std::max( std::max(tl.Y, tr.Y) , std::max(bl.Y, br.Y) );
630  }
631 
636  template<class T_>
637  void Rotate(basic_Bounds<T_> &bounds, Float angle, const basic_Point<T_> &origin) {
638  basic_Point<T_> tl = bounds.TopLeft();
639  basic_Point<T_> tr = bounds.TopRight();
640  basic_Point<T_> bl = bounds.BottomLeft();
641  basic_Point<T_> br = bounds.BottomRight();
642 
643  Rotate(tl, angle, origin);
644  Rotate(tr, angle, origin);
645  Rotate(bl, angle, origin);
646  Rotate(br, angle, origin);
647 
648  bounds.Left = std::min( std::min(tl.X, tr.X) , std::min(bl.X, br.X) );
649  bounds.Right = std::max( std::max(tl.X, tr.X) , std::max(bl.X, br.X) );
650  bounds.Top = std::min( std::min(tl.Y, tr.Y) , std::min(bl.Y, br.Y) );
651  bounds.Bottom= std::max( std::max(tl.Y, tr.Y) , std::max(bl.Y, br.Y) );
652  }
653 
657  template <class T_, class O_>
658  void SkewX(basic_Bounds<T_> &bounds, const O_ &rate) {
659  Float yc = ( bounds.Top + bounds.Bottom) / Float(2);
660 
661  if(rate>0) {
662  bounds.Left = T_( bounds.Left + (bounds.Top -yc)*rate );
663  bounds.Right = T_( bounds.Right + (bounds.Bottom-yc)*rate );
664  }
665  else {
666  bounds.Left = T_( bounds.Left + (bounds.Bottom-yc)*rate );
667  bounds.Right = T_( bounds.Right + (bounds.Top -yc)*rate );
668  }
669  }
670 
674  template <class T_, class O_>
675  void SkewY(basic_Bounds<T_> &bounds, const O_ &rate) {
676  Float xc = ( bounds.Left + bounds.Right ) / Float(2);
677 
678  if(rate>0) {
679  bounds.Top = T_( bounds.Top + (bounds.Left -xc)*rate );
680  bounds.Bottom= T_( bounds.Bottom+ (bounds.Right -xc)*rate );
681  }
682  else {
683  bounds.Top = T_( bounds.Top + (bounds.Right -xc)*rate );
684  bounds.Bottom= T_( bounds.Bottom+ (bounds.Left -xc)*rate );
685  }
686  }
687 
691  template <class T_, class O_>
692  void SkewX(basic_Bounds<T_> &bounds, const O_ &rate, const basic_Point<T_> &origin) {
693  if(rate>0) {
694  bounds.Left = T_( bounds.Left + (bounds.Top -origin.Y)*rate );
695  bounds.Right = T_( bounds.Right + (bounds.Bottom-origin.Y)*rate );
696  }
697  else {
698  bounds.Left = T_( bounds.Left + (bounds.Bottom-origin.Y)*rate );
699  bounds.Right = T_( bounds.Right + (bounds.Top -origin.Y)*rate );
700  }
701  }
702 
706  template <class T_, class O_>
707  void SkewY(basic_Bounds<T_> &bounds, const O_ &rate, const basic_Point<T_> &origin) {
708  if(rate>0) {
709  bounds.Top = T_( bounds.Top + (bounds.Left -origin.X)*rate );
710  bounds.Bottom= T_( bounds.Bottom+ (bounds.Right -origin.X)*rate );
711  }
712  else {
713  bounds.Top = T_( bounds.Top + (bounds.Right -origin.X)*rate );
714  bounds.Bottom= T_( bounds.Bottom+ (bounds.Left -origin.X)*rate );
715  }
716  }
717 
720 
723 
724 } }
Gorgon::Filesystem::EntryPoint::Path
std::string Path
The path of the entry point.
Definition: Filesystem.h:44
Gorgon::OS::User::GetDocumentsPath
std::string GetDocumentsPath()
Returns the path where documents of the user should be saved.
Definition: Linux.cpp:41
Gorgon::Filesystem::Iterator::IsValid
bool IsValid() const
Checks whether the iterator is valid.
Definition: Iterator.h:146
Gorgon::Geometry::basic_Bounds
This class represents boundaries of 2D objects.
Definition: Bounds.h:27
Gorgon::Input::Keyboard::Keycodes::Enter
constexpr Key Enter
Definition: Keyboard.h:56
Gorgon::Input::Mouse::None
@ None
Definition: Mouse.h:32
Gorgon::Input::Keyboard::Keycodes::PrintScreen
constexpr Key PrintScreen
Definition: Keyboard.h:47
Gorgon::WindowManager::XA_ATOM
Atom XA_ATOM
Definition: X11.h:79
Gorgon::swap
void swap(Event< Source_, Args_... > &l, Event< Source_, Args_... > &r)
Swaps two events.
Definition: Event.h:351
Gorgon::Time::GetDate
Date GetDate()
Returns the current date.
Definition: Linux.cpp:9
Gorgon::Geometry::SkewY
void SkewY(basic_Bounds< T_ > &bounds, const O_ &rate)
Skews the given bounds with the given rate along Y axis.
Definition: Bounds.h:675
Gorgon::Geometry::IsInside
bool IsInside(const basic_Bounds< T_ > &b, const basic_Point< T_ > &p)
Checks whether the given point is inside this bounds.
Definition: Bounds.h:514
Gorgon::Resource::GID::File
constexpr Type File
File.
Definition: GID.h:84
Gorgon::String::From
std::enable_if< decltype(gorgon__enum_tr_loc(T_()))::isupgradedenum, std::string >::type From(const T_ &e)
Definition: Enum.h:303
Gorgon::Filesystem::GetFilename
std::string GetFilename(std::string path)
Returns the filename portion of a file path.
Definition: Filesystem.h:183
Gorgon::Geometry::basic_Bounds::basic_Bounds
basic_Bounds(const basic_Bounds< O_ > &r)
Conversion constructor that creates bounds from another type.
Definition: Bounds.h:68
Gorgon::WindowManager::XdndActionCopy
Atom XdndActionCopy
Definition: X11.h:107
Gorgon::Input::Keyboard::Keycodes::F4
constexpr Key F4
Definition: Keyboard.h:70
Gorgon::Filesystem::Move
bool Move(const std::string &source, const std::string &target)
Moves a given file or directory.
Definition: Linux.cpp:216
Gorgon::Geometry::basic_Bounds::operator-=
basic_Bounds & operator-=(const basic_Point< T_ > &p)
Offsets this bounds objects by the given coordinates.
Definition: Bounds.h:329
Gorgon::Geometry::basic_Bounds::BottomRight
basic_Point< T_ > BottomRight() const
Returns bottom right corner.
Definition: Bounds.h:125
Gorgon::String::TrimStart
std::string TrimStart(std::string str, const std::string &chars=" \t\n\r")
Strips the whitespace from the start of a string.
Definition: String.h:390
Gorgon::WindowManager::XA_PROTOCOLS
Atom XA_PROTOCOLS
Definition: X11.h:69
Gorgon::Input::Keyboard::Keycodes::F8
constexpr Key F8
Definition: Keyboard.h:74
Gorgon::Geometry::Contains
bool Contains(const basic_Bounds< T_ > &outer, const basic_Bounds< T_ > &inner)
Checks whether the outer bounds contain inner bounds.
Definition: Bounds.h:520
Gorgon::Geometry::basic_Bounds::Move
void Move(const basic_Point< T_ > &p)
Changes the position of the bounds.
Definition: Bounds.h:212
Gorgon::Scripting::Namespace::AddMembers
virtual void AddMembers(std::initializer_list< StaticMember * > newmembers)
Adds a list of members to this namespace.
Definition: Reflection.h:1104
Gorgon::Time::GetTime
unsigned long GetTime()
Returns current time in milliseconds.
Definition: Linux.cpp:34
Gorgon::Input::Keyboard::Keycodes::Space
constexpr Key Space
Definition: Keyboard.h:59
Gorgon::Geometry::basic_Bounds::operator!=
bool operator!=(const basic_Bounds &other)
Compares two bounds objects.
Definition: Bounds.h:91
Gorgon::WindowManager::XdndFinished
Atom XdndFinished
Definition: X11.h:102
Gorgon::Input::Keyboard::Keycodes::CapsLock
constexpr Key CapsLock
Definition: Keyboard.h:52
Gorgon::Geometry::basic_Bounds::operator/=
basic_Bounds & operator/=(const basic_Size< O_ > &s)
Resizes this bounds objects by the given size. Origin of the operation is {0, 0}.
Definition: Bounds.h:367
Gorgon::Scripting::Types::Constant
const Scripting::Type & Constant()
Gorgon::Input::Mouse::X2
@ X2
Definition: Mouse.h:37
Gorgon::Input::Keyboard::Keycodes::F11
constexpr Key F11
Definition: Keyboard.h:77
Gorgon::OS::GetName
std::string GetName()
Returns the name of the current operating system in human readable form.
Definition: Linux.cpp:65
Gorgon::OS::Open
bool Open(const std::string &file)
Opens the given file with the related application.
Definition: Linux.cpp:268
Gorgon::Filesystem::EntryPoint::Writable
bool Writable
Whether the entry point is writable.
Definition: Filesystem.h:53
Point.h
contains point class.
Gorgon::Time::Date::WeekdayType
WeekdayType
Days of week. Starts from sunday.
Definition: Time.h:29
Gorgon::Input::Keyboard::Keycodes::F10
constexpr Key F10
Definition: Keyboard.h:76
Gorgon::WindowManager::XA_Filelist
Atom XA_Filelist
Definition: X11.h:110
Gorgon::Geometry::basic_Bounds::operator+=
basic_Bounds & operator+=(const basic_Point< T_ > &p)
Offsets this bounds objects by the given coordinates.
Definition: Bounds.h:319
Gorgon::Geometry::basic_Point::X
T_ X
X coordinate.
Definition: Point.h:368
Gorgon::Scripting::MappedReferenceType::MapConstructor
void MapConstructor(ParameterList params)
Definition: Embedding.h:1432
Gorgon::Filesystem::ChangeDirectory
bool ChangeDirectory(const std::string &path)
Changes current working directory.
Definition: Linux.cpp:145
Gorgon::Geometry::basic_Bounds::Normalize
void Normalize()
Normalizes bounds object so that Left and Right and Top and Bottom are ordered properly.
Definition: Bounds.h:97
Gorgon::Scripting::operator<<
std::ostream & operator<<(std::ostream &out, const Data &data)
This function parses the code and returns any syntax errors.
Definition: Scripting.h:73
Gorgon::OS::GetEnvVar
std::string GetEnvVar(const std::string &var)
Returns the value of an environment variable.
Definition: Linux.cpp:17
Size.h
contains the Size class
Gorgon::Geometry::basic_Size::Height
T_ Height
Height of this size object.
Definition: Size.h:261
Gorgon::Geometry::basic_Bounds::Width
T_ Width() const
Calculates and returns the width of the bounds.
Definition: Bounds.h:130
Gorgon::WindowManager::XdndLeave
Atom XdndLeave
Definition: X11.h:105
Gorgon::WindowManager::XA_TARGETS
Atom XA_TARGETS
Definition: X11.h:68
Gorgon::Filesystem::PathNotFoundError
This object is thrown from functions that return information rather than status.
Definition: Filesystem.h:22
Gorgon::OS::Start
bool Start(const std::string &name, const std::vector< std::string > &args=std::vector< std::string >())
Starts the given application.
Definition: Linux.cpp:116
Gorgon::OS::DisplayMessage
void DisplayMessage(const std::string &message)
This function shows a OS message box to display errors, for other messages its better to use in-game ...
Definition: Linux.cpp:104
Gorgon::Float
float Float
Represents floating point data type.
Definition: Types.h:16
Gorgon::Geometry::operator>>
std::istream & operator>>(std::istream &in, basic_Bounds< T_ > &bounds)
Stream extractor for bounds.
Definition: Bounds.h:423
Gorgon::Filesystem::Relative
std::string Relative(std::string path, std::string base)
Determine shortest relative path from the given path.
Definition: Filesystem.cpp:67
Gorgon::Time::Date::Millisecond
unsigned int Millisecond
This value is from the last second tick.
Definition: Time.h:220
Gorgon::Geometry::basic_Bounds::basic_Bounds
basic_Bounds(const basic_Point< T_ > &topleft, const basic_Size< T_ > &size)
Constructs bounds from the given coordinates and size.
Definition: Bounds.h:49
Gorgon::Input::Mouse::X1
@ X1
Definition: Mouse.h:36
Gorgon::WindowManager::XdndSelection
Atom XdndSelection
Definition: X11.h:100
Gorgon::Time::Date::Hour
unsigned int Hour
Hour in 24 hour format.
Definition: Time.h:211
Gorgon::Geometry::basic_Bounds::Height
T_ Height() const
Calculates and returns the height of the bounds.
Definition: Bounds.h:135
Gorgon::Filesystem::GetDirectory
std::string GetDirectory(std::string filepath)
Returns the directory portion of a file path.
Definition: Filesystem.h:167
Gorgon::Geometry::Scale
void Scale(basic_Bounds< T_ > &bounds, const O_ &size)
Scales the given bounds by the given factor. Center of the bounds is used as origin.
Definition: Bounds.h:544
Gorgon::Input::Keyboard::Keycodes::F3
constexpr Key F3
Definition: Keyboard.h:69
Gorgon::Geometry::basic_Bounds::basic_Bounds
basic_Bounds(const basic_Point< T_ > &topleft, const T_ &width, const T_ &height)
Constructs bounds from the given coordinates and size.
Definition: Bounds.h:61
Gorgon::Geometry::basic_Bounds::BottomLeft
basic_Point< T_ > BottomLeft() const
Returns bottom left corner.
Definition: Bounds.h:120
Gorgon::OS::GetAppDataPath
std::string GetAppDataPath()
Returns the directory where the system wide application data is stored.
Definition: Linux.cpp:108
Gorgon::Filesystem::IsDirectory
bool IsDirectory(const std::string &path)
Checks whether the given path is a directory.
Definition: Linux.cpp:32
Gorgon::Input::Keyboard::Keycodes::F6
constexpr Key F6
Definition: Keyboard.h:72
Gorgon::Geometry::Translate
void Translate(basic_Bounds< T_ > &bounds, O_ x, O_ y)
Translation moves the given bounds by the given amount.
Definition: Bounds.h:526
Gorgon::Input::Keyboard::Keycodes::Escape
constexpr Key Escape
Definition: Keyboard.h:60
Gorgon::WindowManager::XdndActionMove
Atom XdndActionMove
Definition: X11.h:108
Gorgon::Filesystem::IsHidden
bool IsHidden(const std::string &path)
Checks whether the given path is hidden.
Definition: Linux.cpp:73
Gorgon::Time::Date::Minute
unsigned int Minute
Minute.
Definition: Time.h:214
Gorgon::Geometry::IsColliding
bool IsColliding(const basic_Bounds< T_ > &l, const basic_Bounds< T_ > &r)
Checks whether two bounds are colliding.
Definition: Bounds.h:500
Gorgon::Filesystem::Copy
bool Copy(const std::string &source, const std::string &target)
Copies a file or directory from the given source to destination.
Definition: Linux.cpp:180
Gorgon::Input::Keyboard::Keycodes::X
constexpr Key X
Definition: Keyboard.h:103
Gorgon::Input::Keyboard::Keycodes::Tab
constexpr Key Tab
Definition: Keyboard.h:57
Gorgon::Input::Keyboard::Keycodes::Shift
constexpr Key Shift
Definition: Keyboard.h:30
Gorgon::Geometry::Union
basic_Bounds< T_ > Union(const basic_Bounds< T_ > &l, const basic_Bounds< T_ > &r)
Returns the smallest bounds that contains given bounds.
Definition: Bounds.h:488
Gorgon::Scripting::MappedOperator
This class makes working with operators easier.
Definition: Embedding.h:635
Gorgon::Geometry::basic_Bounds::Left
T_ Left
Left-most boundary.
Definition: Bounds.h:399
Gorgon::WindowManager::XA_STRING
Atom XA_STRING
Definition: X11.h:72
Gorgon::Geometry::SkewX
void SkewX(basic_Bounds< T_ > &bounds, const O_ &rate)
Skews the given bounds with the given rate along X axis.
Definition: Bounds.h:658
Gorgon::Input::Keyboard::Keycodes::PageUp
constexpr Key PageUp
Definition: Keyboard.h:44
Gorgon::Input::Key
int Key
A type to represent an input key.
Definition: Input.h:14
Gorgon::Geometry::swap
void swap(PointList< P_ > &left, PointList< P_ > &right)
Definition: PointList.h:396
Gorgon::Geometry::basic_Bounds::TopRight
basic_Point< T_ > TopRight() const
Returns top right corner.
Definition: Bounds.h:110
Gorgon::Filesystem::ExeDirectory
std::string ExeDirectory()
Returns the directory where the program resides.
Definition: Linux.cpp:220
Gorgon
Root namespace for Gorgon Game Engine.
Definition: Any.h:19
Gorgon::Geometry::basic_Size
This class represents a 2D geometric size.
Definition: Size.h:23
Gorgon::Geometry::basic_Bounds::basic_Bounds
basic_Bounds(const basic_Point< T_ > &topleft, const basic_Point< T_ > &bottomright)
Constructs minimum bounds that includes the given points.
Definition: Bounds.h:43
Gorgon::Scripting::Library
This class represents a library.
Definition: Reflection.h:1596
Gorgon::Filesystem::Load
std::string Load(const std::string &filename)
Loads the given file and returns it in a string form.
Definition: Filesystem.cpp:45
Gorgon::OS::User::GetUsername
std::string GetUsername()
Returns the current username.
Definition: Linux.cpp:27
Gorgon::Input::Keyboard::Keycodes::Up
constexpr Key Up
Definition: Keyboard.h:63
Gorgon::Filesystem::StartupDirectory
std::string StartupDirectory()
Returns the directory where the program is started from.
Definition: Filesystem.cpp:18
Gorgon::Input::Keyboard::Keycodes::F12
constexpr Key F12
Definition: Keyboard.h:78
Gorgon::Input::Keyboard::Keycodes::F1
constexpr Key F1
Definition: Keyboard.h:67
Gorgon::Filesystem::IsExists
bool IsExists(const std::string &path)
Checks whether the given path exists.
Definition: Linux.cpp:60
Gorgon::Filesystem::Iterator::Destroy
void Destroy()
Destroys the current iterator.
Definition: Linux.cpp:431
Gorgon::Filesystem::GetExtension
std::string GetExtension(std::string path)
Returns the extension of the given path, also converts the extension to lower case.
Definition: Filesystem.cpp:140
Gorgon::Geometry::basic_Bounds::operator-
basic_Bounds operator-(const basic_Point< T_ > &p) const
Creates a new bounds object that is the offset of this bounds by the given point.
Definition: Bounds.h:240
Gorgon::Geometry::basic_Bounds::basic_Bounds
basic_Bounds(const T_ &left, const T_ &top, const T_ &right, const T_ &bottom)
Constructor that allows coordinates to be specified individually.
Definition: Bounds.h:37
Gorgon::Geometry::Point
basic_Point< int > Point
Definition: Point.h:598
Gorgon::Time::Date::Month
MonthType Month
Month starts from jan = 1.
Definition: Time.h:202
Gorgon::WindowManager::XdndPosition
Atom XdndPosition
Definition: X11.h:104
Gorgon::String::ToLower
std::string ToLower(std::string str)
Converts the given string to lowercase.
Definition: String.h:416
Gorgon::Filesystem::Save
bool Save(const std::string &filename, const std::string &data, bool append)
Saves a given data into the filename.
Definition: Filesystem.cpp:31
Gorgon::Scripting::Types::Library
const Scripting::Type & Library()
Iterator.h
contains filesystem Iterator. Lists file and directories.
Gorgon::WindowManager::XdndStatus
Atom XdndStatus
Definition: X11.h:103
Gorgon::Input::Keyboard::Keycodes::F7
constexpr Key F7
Definition: Keyboard.h:73
Gorgon::Input::Keyboard::Keycodes::End
constexpr Key End
Definition: Keyboard.h:41
Gorgon::Filesystem::Iterator
This iterator allows iteration of directories.
Definition: Iterator.h:22
Gorgon::WindowManager::XA_CLIPBOARD
Atom XA_CLIPBOARD
X11 atoms for various data identifiers.
Gorgon::Geometry::basic_Bounds::operator|=
basic_Bounds & operator|=(const basic_Bounds &b) const
Performs union operation.
Definition: Bounds.h:180
Gorgon::String::Extract
std::string Extract(std::string &original, const std::string &marker, bool trim=false)
Extracts the part of the string up to the given marker.
Definition: String.h:779
Gorgon::Geometry::Intersect
basic_Bounds< T_ > Intersect(const basic_Bounds< T_ > &l, const basic_Bounds< T_ > &r)
Creates a new bounds that contains only the intersection of two bounds.
Definition: Bounds.h:471
Gorgon::Geometry::basic_Bounds::operator*=
basic_Bounds & operator*=(const basic_Size< O_ > &s)
Resizes this bounds objects by the given size. Origin of the operation is {0, 0}.
Definition: Bounds.h:356
Gorgon::WindowManager::WM_DELETE_WINDOW
Atom WM_DELETE_WINDOW
Definition: X11.h:70
Gorgon::Geometry::basic_Bounds::basic_Bounds
basic_Bounds()
Default constructor, does not zero initialize object.
Definition: Bounds.h:33
Gorgon::Input::BeginDrag
DragInfo & BeginDrag(DragSource &source, A_ &&... data)
Begins a drag operation using the given source and data.
Definition: DnD.h:1035
Gorgon::OS::GetAppSettingPath
std::string GetAppSettingPath()
Returns the directory where the system wide application settings is stored.
Definition: Linux.cpp:112
Gorgon::Time::Date::Day
unsigned int Day
Day in month.
Definition: Time.h:205
Gorgon::Filesystem::Size
unsigned long long Size(const std::string &filename)
Returns the size of the given file.
Definition: Filesystem.cpp:22
Gorgon::Time::Date::MonthType
MonthType
Months, january is 1.
Definition: Time.h:40
Gorgon::Geometry::Bounds
basic_Bounds< int > Bounds
Definition: Bounds.h:722
Gorgon::Time::Date::Timezone
int Timezone
Timezone in minutes, can be negative.
Definition: Time.h:224
Gorgon::Geometry::basic_Bounds::operator*
basic_Bounds operator*(const basic_Size< O_ > &s)
Creates a new bounds object that is the scaled version of this bounds by the given size.
Definition: Bounds.h:273
Gorgon::Filesystem::EntryPoint::Readable
bool Readable
Whether the entry point is readable. Currently all entry points are readable.
Definition: Filesystem.h:47
Gorgon::Input::Keyboard::Keycodes::Delete
constexpr Key Delete
Definition: Keyboard.h:43
Gorgon::Geometry::basic_Bounds::operator==
bool operator==(const basic_Bounds &other) const
Compares two bounds objects.
Definition: Bounds.h:86
Gorgon::Geometry::basic_Point
This class represents a 2D point.
Definition: Point.h:32
Gorgon::Scripting::ConstTag
@ ConstTag
Marks a parameter or a function constant.
Definition: Reflection.h:95
Gorgon::Time::Date
This class represents a specific date including time information.
Definition: Time.h:26
Gorgon::Scripting::MappedValueType
This class allows embedded types to become scripting types that are passed around as values.
Definition: Embedding.h:1300
Gorgon::Input::Keyboard::Keycodes::Alt
constexpr Key Alt
Definition: Keyboard.h:32
Gorgon::Geometry::basic_Bounds::operator&=
basic_Bounds & operator&=(const basic_Bounds &b) const
Performs intersect operation.
Definition: Bounds.h:192
Gorgon::Filesystem::EntryPoint::Name
std::string Name
Name or label of the entry point.
Definition: Filesystem.h:59
Gorgon::OS::User::GetDataPath
std::string GetDataPath()
Returns the path where applications can save data related to this user.
Definition: Linux.cpp:53
Gorgon::Geometry::basic_Bounds::operator&
basic_Bounds operator&(const basic_Bounds &r) const
Performs intersect operation.
Definition: Bounds.h:164
Gorgon::Geometry::basic_Bounds::Move
void Move(const T_ &x, const T_ &y)
Changes the position of the bounds.
Definition: Bounds.h:220
Gorgon::OS::User::GetHomePath
std::string GetHomePath()
Returns the home directory of the user.
Definition: Linux.cpp:49
Gorgon::Filesystem::Delete
bool Delete(const std::string &path)
Deletes the given file or directory.
Definition: Linux.cpp:106
Gorgon::Input::Keyboard::Keycodes::Control
constexpr Key Control
Definition: Keyboard.h:31
Gorgon::Byte
unsigned char Byte
Represents smallest cell in memory.
Definition: Types.h:9
Gorgon::Window::Windows
static const Containers::Collection< Window > & Windows
List of currently created windows.
Definition: Window.h:401
Gorgon::OS::User::IsAdmin
bool IsAdmin()
Check if the currently logged in user is an administrator.
Definition: Linux.cpp:57
Gorgon::Input::Keyboard::Keycodes::F2
constexpr Key F2
Definition: Keyboard.h:68
Gorgon::Scripting::Parameter
This class represents a function parameter description.
Definition: Reflection.h:137
Gorgon::Geometry::basic_Bounds::SetHeight
void SetHeight(const T_ &height)
Changes the height of the bounds, anchor is the topleft.
Definition: Bounds.h:207
Gorgon::Time::Date::Weekday
WeekdayType Weekday
Day of the week, starts from sunday = 0.
Definition: Time.h:208
Gorgon::Input::Mouse::Middle
@ Middle
Definition: Mouse.h:35
Gorgon::Geometry::basic_Bounds::Right
T_ Right
Right-most boundary.
Definition: Bounds.h:405
Gorgon::Input::Keyboard::Keycodes::Pause
constexpr Key Pause
Definition: Keyboard.h:48
Gorgon::Geometry::basic_Bounds::operator/
basic_Bounds operator/(const basic_Size< O_ > &s)
Creates a new bounds object that is the scale version of this bounds by the given size.
Definition: Bounds.h:285
Gorgon::WindowManager::XA_TIMESTAMP
Atom XA_TIMESTAMP
Definition: X11.h:67
Gorgon::OS::processmessages
void processmessages()
This method will notify the system should process any messages that coming from the operating system.
Definition: Linux.cpp:281
Gorgon::Filesystem::ExePath
std::string ExePath()
Returns the the full path of the application.
Definition: Linux.cpp:226
Gorgon::Filesystem::EntryPoint::Removable
bool Removable
Whether the device is removable.
Definition: Filesystem.h:56
Gorgon::GL::UBOBindingPoint::Type
Type
Definition: Shader.h:14
Gorgon::Geometry::basic_Bounds::Bottom
T_ Bottom
Bottom-most boundary.
Definition: Bounds.h:408
Gorgon::Geometry::basic_Bounds::Center
basic_Point< T_ > Center() const
Returns center of bounds.
Definition: Bounds.h:115
Gorgon::Input::finishdrag
void finishdrag(bool success)
Definition: DnD.cpp:166
Gorgon::Geometry::basic_Bounds::Resize
void Resize(const basic_Size< T_ > &size)
Definition: Bounds.h:145
Gorgon::Geometry::basic_Point::Y
T_ Y
Y coordinate.
Definition: Point.h:371
Gorgon::Geometry::operator<<
std::ostream & operator<<(std::ostream &out, const basic_Bounds< T_ > &bounds)
Allows streaming of bounds.
Definition: Bounds.h:415
Gorgon::Geometry::basic_Bounds::TopLeft
basic_Point< T_ > TopLeft() const
Returns top left corner.
Definition: Bounds.h:105
Gorgon::Scripting::MappedReferenceType
This class allows embedded types to become scripting types that are passed around as references.
Definition: Embedding.h:1406
Gorgon::Geometry::basic_Size::Width
T_ Width
Width of this size object.
Definition: Size.h:258
Gorgon::Scripting::FilesystemLib
Library & FilesystemLib()
Definition: Filesystem.cpp:49
Gorgon::Geometry::basic_Bounds::GetSize
basic_Size< T_ > GetSize() const
Returns the size of the bounds object.
Definition: Bounds.h:141
Gorgon::WindowManager::XdndAware
Atom XdndAware
Definition: X11.h:99
Gorgon::Filesystem::IsFile
bool IsFile(const std::string &path)
Checks whether the given path is a file.
Definition: Linux.cpp:46
Gorgon::Filesystem::IsWritable
bool IsWritable(const std::string &path)
Checks whether the given path is writable.
Definition: Linux.cpp:64
Gorgon::end
std::vector< T_ >::const_iterator end(enum_type_id< T_ >)
Definition: Enum.h:288
Gorgon::WindowManager::XdndTypeList
Atom XdndTypeList
Definition: X11.h:109
Gorgon::Geometry::basic_Bounds::operator|
basic_Bounds operator|(const basic_Bounds &r) const
Performs union operation.
Definition: Bounds.h:152
Gorgon::Time::Date::Second
unsigned int Second
Second.
Definition: Time.h:217
Gorgon::Filesystem::Initialize
void Initialize()
Initializes the filesystem module.
Definition: Filesystem.cpp:14
Gorgon::Scripting::MapFunction
Scripting::Function::Overload * MapFunction(F_ fn, const Type *returntype, ParameterList parameters, P_ ...tags)
Definition: Embedding.h:614
Gorgon::Input::Keyboard::Keycodes::Right
constexpr Key Right
Definition: Keyboard.h:64
Gorgon::Input::Keyboard::Keycodes::F5
constexpr Key F5
Definition: Keyboard.h:71
Gorgon::Geometry::basic_Bounds::SetWidth
void SetWidth(const T_ &width)
Changes the width of the bounds, anchor is the topleft.
Definition: Bounds.h:202
Gorgon::Filesystem::Iterator::Next
bool Next()
Next path in the directory.
Definition: Linux.cpp:438
Gorgon::Input::Keyboard::Keycodes::Backspace
constexpr Key Backspace
Definition: Keyboard.h:58
Gorgon::OS::OpenTerminal
void OpenTerminal()
Opens a terminal window to display output from the stdout.
Definition: Linux.cpp:101
Gorgon::Scripting::Types::Function
const Scripting::Type & Function()
Definition: Reflection.h:589
Gorgon::Filesystem::CurrentDirectory
std::string CurrentDirectory()
Returns the current working directory.
Definition: Linux.cpp:149
Gorgon::Geometry::basic_Bounds::basic_Bounds
basic_Bounds(const std::string &str)
Definition: Bounds.h:72
Gorgon::OS::Initialize
void Initialize()
Initializes operating system module.
Definition: Linux.cpp:62
Gorgon::Geometry::basic_Bounds::operator+
basic_Bounds operator+(const basic_Point< T_ > &p) const
Creates a new bounds object that is the offset of this bounds by the given point.
Definition: Bounds.h:229
Gorgon::Filesystem::Iterator::Iterator
Iterator()
Empty constructor. Effectively generates end iterator.
Definition: Iterator.h:45
Gorgon::Geometry::Boundsf
basic_Bounds< Float > Boundsf
Definition: Bounds.h:719
Gorgon::Filesystem::EntryPoints
std::vector< EntryPoint > EntryPoints()
This function returns all entry points in the current system.
Definition: Linux.cpp:232
Gorgon::Filesystem::Canonical
std::string Canonical(const std::string &path)
Canonicalizes a given relative path.
Definition: Linux.cpp:94
Gorgon::Input::Keyboard::Keycodes::PageDown
constexpr Key PageDown
Definition: Keyboard.h:45
Gorgon::Filesystem::EntryPoint
This class represents filesystem entry points (roots, drives).
Definition: Filesystem.h:36
Gorgon::WindowManager::XdndDrop
Atom XdndDrop
Definition: X11.h:106
Gorgon::WindowManager::XA_PRIMARY
Atom XA_PRIMARY
Definition: X11.h:97
Gorgon::OS::User::GetName
std::string GetName()
Returns the name of the current user.
Definition: Linux.cpp:33
Gorgon::Time::Date::Year
unsigned int Year
Full year.
Definition: Time.h:199
Gorgon::Input::Keyboard::Keycodes::F9
constexpr Key F9
Definition: Keyboard.h:75
Gorgon::Input::Keyboard::Keycodes::Left
constexpr Key Left
Definition: Keyboard.h:62
Gorgon::Input::Keyboard::Keycodes::Y
constexpr Key Y
Definition: Keyboard.h:104
Gorgon::Input::Keyboard::Keycodes::GetName
std::string GetName(Key key)
Returns the name of the key.
Definition: Keyboard.cpp:11
Gorgon::Input::Keyboard::Keycodes::Insert
constexpr Key Insert
Definition: Keyboard.h:42
Gorgon::WindowManager::GetAtomName
std::string GetAtomName(Atom atom)
Definition: X11.cpp:215
Gorgon::Geometry::basic_Bounds::BaseType
T_ BaseType
Base type of the bounds elements.
Definition: Bounds.h:30
Gorgon::Input::CancelDrag
void CancelDrag()
Cancel the current drag operation.
Definition: DnD.cpp:207
Gorgon::Filesystem::CreateDirectory
bool CreateDirectory(const std::string &path)
Creates a new directory.
Definition: Linux.cpp:19
Gorgon::Input::Keyboard::Keycodes::Home
constexpr Key Home
Definition: Keyboard.h:40
Gorgon::WindowManager::XdndEnter
Atom XdndEnter
Definition: X11.h:101
Gorgon::Geometry::basic_Bounds::Top
T_ Top
Top-most boundary.
Definition: Bounds.h:402
Gorgon::Geometry::basic_Bounds::basic_Bounds
basic_Bounds(const T_ &left, const T_ &top, const basic_Size< T_ > &size)
Constructs bounds from the given coordinates and size.
Definition: Bounds.h:55
Gorgon::Geometry::Rotate
void Rotate(basic_Bounds< T_ > &bounds, Float angle)
Rotates the given bounds by the given angle.
Definition: Bounds.h:614
Gorgon::Input::Keyboard::Keycodes::Down
constexpr Key Down
Definition: Keyboard.h:65