 |
Gorgon Game Engine
|
Go to the documentation of this file.
16 namespace Gorgon {
namespace Geometry {
44 explicit operator std::string()
const {
45 std::ostringstream str;
181 template <
typename T_,
typename R_>
187 template <
typename T_,
typename R_>
193 template <
typename T_,
typename R_>
201 template <
typename T_,
typename R_>
209 template <
typename T_,
typename R_>
227 while(in.peek()==
' ' || in.peek()==
'(')
231 std::stringstream ss;
233 while(in.peek()!=
',' && !in.eof())
234 s.append(1, (
char)in.get());
243 while(in.peek()==
' ' || in.peek()==
'\t')
246 while(in.peek()!=
',' && !in.eof())
247 s.append(1, (
char)in.get());
257 while(in.peek()==
' ' || in.peek()==
'\t')
260 while(in.peek()!=
',' && !in.eof())
261 s.append(1, (
char)in.get());
271 while(in.peek()==
' ' || in.peek()==
'\t')
274 while(in.peek()!=
'>' && in.peek()!=
' ' && in.peek()!=
'\t' && in.peek()!=
'\n' && in.peek()!=
'\r' && !in.eof())
275 s.append(1, in.get());
This class represents boundaries of 2D objects.
Definition: Bounds.h:27
basic_Margin CombineMargins(const basic_Margin &other) const
Combines two margins that are next to each other, basically taking the maximum margin from each side ...
Definition: Margin.h:64
basic_Margin & operator+=(const basic_Margin &right)
Adds a Margin to this one.
Definition: Margin.h:99
T_ Left
Left margin.
Definition: Margin.h:167
T_ TotalX() const
Calculates and returns the total Margin in X axis.
Definition: Margin.h:74
contains the Bounds class
T_ Height
Height of this size object.
Definition: Size.h:261
T_ BaseType
Base type of the margin elements.
Definition: Margin.h:25
T_ Vertical() const
Calculates and returns the total Margin in Y axis.
Definition: Margin.h:83
basic_Size< T_ > operator-(const basic_Size< T_ > &s, const basic_Margin< R_ > &m)
Subtracts a Margin from a size.
Definition: Margin.h:188
std::istream & operator>>(std::istream &in, basic_Bounds< T_ > &bounds)
Stream extractor for bounds.
Definition: Bounds.h:423
basic_Margin AddToLeft(T_ width, basic_Margin Margin=0)
Adds an object to the left of this Margin to create a new Margin marking the used area.
Definition: Margin.h:132
T_ Horizontal() const
Calculates and returns the total Margin in X axis.
Definition: Margin.h:80
T_ Left
Left-most boundary.
Definition: Bounds.h:399
T_ Top
Top margin.
Definition: Margin.h:170
basic_Margin operator-(const basic_Margin &right) const
Subtracts two Margin.
Definition: Margin.h:94
Root namespace for Gorgon Game Engine.
Definition: Any.h:19
This class represents a 2D geometric size.
Definition: Size.h:23
basic_Margin< int > Margin
Definition: Margin.h:289
basic_Margin(T_ left, T_ top, T_ right, T_ bottom)
Sets all Margin separately.
Definition: Margin.h:39
basic_Margin AddToBottom(T_ height, basic_Margin Margin=0)
Adds an object to the bottom of this Margin to create a new Margin marking the used area.
Definition: Margin.h:156
basic_Margin()
Default constructor.
Definition: Margin.h:28
basic_Margin CombinePadding(const basic_Margin &other) const
Combines two margins that are inside each other, basically taking the maximum margin from each side.
Definition: Margin.h:53
basic_Margin operator+(const basic_Margin &right) const
Adds two Margin.
Definition: Margin.h:89
T_ Bottom
Bottom margin.
Definition: Margin.h:176
basic_Margin(T_ all)
Sets all Margin to the given value.
Definition: Margin.h:32
This class represents a 2D point.
Definition: Point.h:32
basic_Size< T_ > Total() const
Calculates and returns the total Margin in X axis.
Definition: Margin.h:86
basic_Margin(T_ horizontal, T_ vertical)
Sets horizontal and vertical Margin separately.
Definition: Margin.h:35
basic_Size< T_ > operator+(const basic_Size< T_ > &s, const basic_Margin< R_ > &m)
Adds a Margin object to a size structure, resultant size can contain previous size with the given Mar...
Definition: Margin.h:182
T_ Right
Right-most boundary.
Definition: Bounds.h:405
T_ Right
Right margin.
Definition: Margin.h:173
T_ Bottom
Bottom-most boundary.
Definition: Bounds.h:408
std::ostream & operator<<(std::ostream &out, const basic_Bounds< T_ > &bounds)
Allows streaming of bounds.
Definition: Bounds.h:415
basic_Point< T_ > TopLeft() const
Top left coordinate of the object that will be placed within a <0:inf, 0:inf> bounds that has this Ma...
Definition: Margin.h:162
bool operator==(const basic_Margin &margin) const
Compares two Margin.
Definition: Margin.h:119
T_ Width
Width of this size object.
Definition: Size.h:258
This class defines Margin of an object or an area.
Definition: Margin.h:22
basic_Margin AddToTop(T_ height, const basic_Margin &Margin=0)
Adds an object to the top of this Margin to create a new Margin marking the used area.
Definition: Margin.h:140
bool operator!=(const basic_Margin &margin) const
Compares two Margin.
Definition: Margin.h:124
basic_Margin AddToRight(T_ width, basic_Margin Margin=0)
Adds an object to the right of this Margin to create a new Margin marking the used area.
Definition: Margin.h:148
T_ TotalY() const
Calculates and returns the total Margin in Y axis.
Definition: Margin.h:77
basic_Margin & operator-=(const basic_Margin &right)
Subtracts a Margin from this one.
Definition: Margin.h:109
T_ Top
Top-most boundary.
Definition: Bounds.h:402