Gorgon Game Engine
Gorgon::Geometry Namespace Reference

This namespace contains geometric element classes. More...

Classes

class  basic_Bounds
 This class represents boundaries of 2D objects. More...
 
class  basic_Margin
 This class defines Margin of an object or an area. More...
 
class  basic_Point
 This class represents a 2D point. More...
 
class  basic_Point3D
 
class  basic_PointProperty
 Property support for point class. More...
 
class  basic_Rectangle
 Represents a rectangle in a 2D space. More...
 
class  basic_Size
 This class represents a 2D geometric size. More...
 
class  basic_SizeProperty
 Property support for point class. More...
 
class  basic_Transform3D
 
class  Line
 This class represents a set of points. More...
 
class  PointList
 This class represents a set of points. More...
 

Typedefs

typedef basic_Bounds< int > Bounds
 
typedef basic_Bounds< FloatBoundsf
 
typedef basic_Margin< int > Margin
 
using Point = basic_Point< int >
 
using Point3D = basic_Point3D< Float >
 
using Pointf = basic_Point< Float >
 
template<class C_ , Pointf(C_::*)() const Getter_, void(C_::*)(const Pointf &) Setter_>
using PointfProperty = basic_PointProperty< C_, Pointf, Getter_, Setter_ >
 
template<class C_ , Point(C_::*)() const Getter_, void(C_::*)(const Point &) Setter_>
using PointProperty = basic_PointProperty< C_, Point, Getter_, Setter_ >
 
typedef basic_Rectangle< int > Rectangle
 
typedef basic_Rectangle< FloatRectanglef
 
using Size = basic_Size< int >
 
using Sizef = basic_Size< Float >
 
template<class C_ , Sizef(C_::*)() const Getter_, void(C_::*)(const Sizef &) Setter_>
using SizefProperty = basic_SizeProperty< C_, Sizef, Getter_, Setter_ >
 
template<class C_ , Size(C_::*)() const Getter_, void(C_::*)(const Size &) Setter_>
using SizeProperty = basic_SizeProperty< C_, Size, Getter_, Setter_ >
 
using Transform3D = basic_Transform3D< Float >
 

Functions

template<class T_ >
basic_Size< T_ > Combine (const basic_Size< T_ > &l, const basic_Size< T_ > &r)
 Returns the minimum required size that can hold both size objects. More...
 
template<class T_ >
bool Contains (const basic_Bounds< T_ > &outer, const basic_Bounds< T_ > &inner)
 Checks whether the outer bounds contain inner bounds. More...
 
template<class T_ >
void HorizontalMirror (basic_Point< T_ > &point)
 Reflects the given point horizontally. More...
 
template<class T_ >
void HorizontalMirror (basic_Point< T_ > &point, const basic_Point< T_ > &origin)
 Reflects the given point horizontally considering given origin. More...
 
template<class C_ , class T_ , T_(C_::*)() const Getter_, void(C_::*)(const T_ &) Setter_>
void HorizontalMirror (basic_PointProperty< C_, T_, Getter_, Setter_ > &point)
 Reflects the given point horizontally. More...
 
template<class C_ , class T_ , T_(C_::*)() const Getter_, void(C_::*)(const T_ &) Setter_>
void HorizontalMirror (basic_PointProperty< C_, T_, Getter_, Setter_ > &point, const basic_Point< T_ > &origin)
 Reflects the given point horizontally considering given origin. More...
 
void init_scripting ()
 
template<class T_ >
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. More...
 
template<class T_ >
bool IsColliding (const basic_Bounds< T_ > &l, const basic_Bounds< T_ > &r)
 Checks whether two bounds are colliding. More...
 
template<class T_ >
bool IsInside (const basic_Bounds< T_ > &b, const basic_Point< T_ > &p)
 Checks whether the given point is inside this bounds. More...
 
template<class T_ >
bool IsInside (const basic_Rectangle< T_ > &r, const basic_Point< T_ > &p)
 Checks whether a given point is inside the given rectangle. More...
 
template<class P_ >
bool operator!= (PointList< P_ > &left, const PointList< P_ > &right)
 Comparison: this operation is expensive: O(n). More...
 
template<class T_ , class O_ >
auto operator* (const basic_Point< T_ > &l, const basic_Size< O_ > &r) -> basic_Point< decltype(l.X *r.Width)>
 Allows multiplication of point with a size object. More...
 
template<class T_ >
basic_Size< T_ > operator* (const basic_Size< T_ > &size, double factor)
 Multiplies a size with a scalar, effectively resizing it. More...
 
template<class T_ >
basic_Size< T_ > operator* (double factor, const basic_Size< T_ > &size)
 Multiplies a size with a scalar, effectively resizing it. More...
 
template<typename T_ , typename R_ >
basic_Bounds< T_ > operator+ (const basic_Bounds< T_ > &b, const basic_Margin< R_ > &m)
 Adds a Margin object to a bounds. More...
 
template<typename T_ , typename R_ >
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 Margin. More...
 
template<typename T_ , typename R_ >
basic_Bounds< T_ > operator- (const basic_Bounds< T_ > &b, const basic_Margin< R_ > &m)
 Removes a Margin object from a bounds object,. More...
 
template<typename T_ , typename R_ >
basic_Margin< T_ > operator- (const basic_Bounds< T_ > &b1, const basic_Bounds< R_ > &b2)
 Subtracts two bounds to find marginal difference between them. More...
 
template<typename T_ , typename R_ >
basic_Size< T_ > operator- (const basic_Size< T_ > &s, const basic_Margin< R_ > &m)
 Subtracts a Margin from a size. More...
 
template<class T_ , class O_ >
auto operator/ (const basic_Point< T_ > &l, const basic_Size< O_ > &r) -> basic_Point< decltype(l.X *r.Width)>
 Allows division of point with a size object. More...
 
template<class T_ >
basic_Size< T_ > operator/ (const basic_Size< T_ > &size, double factor)
 Divides a size with a scalar, effectively resizing it. More...
 
template<class T_ >
basic_Size< T_ > operator/ (double factor, const basic_Size< T_ > &size)
 Divides a size with a scalar, effectively resizing it. More...
 
template<class P_ >
bool operator< (PointList< P_ > &left, const PointList< P_ > &right)
 Comparison: this operation is expensive: O(n). More...
 
template<class T_ >
std::ostream & operator<< (std::ostream &out, const basic_Bounds< T_ > &bounds)
 Allows streaming of bounds. More...
 
template<class T_ >
std::ostream & operator<< (std::ostream &out, const basic_Margin< T_ > &Margin)
 
template<class T_ >
std::ostream & operator<< (std::ostream &out, const basic_Point3D< T_ > &point)
 Allows streaming of point. More...
 
template<class T_ >
std::ostream & operator<< (std::ostream &out, const basic_Point< T_ > &point)
 Allows streaming of point. More...
 
template<class T_ >
std::ostream & operator<< (std::ostream &out, const basic_Rectangle< T_ > &Rectangle)
 Allows streaming of Rectangle. More...
 
template<class T_ >
std::ostream & operator<< (std::ostream &out, const basic_Transform3D< T_ > &transform)
 
template<class P_ >
bool operator<= (PointList< P_ > &left, const PointList< P_ > &right)
 Comparison: this operation is expensive: O(n). More...
 
template<class P_ >
bool operator== (PointList< P_ > &left, const PointList< P_ > &right)
 Comparison: this operation is expensive: O(n). More...
 
template<class P_ >
bool operator> (PointList< P_ > &left, const PointList< P_ > &right)
 Comparison: this operation is expensive: O(n). More...
 
template<class P_ >
bool operator>= (PointList< P_ > &left, const PointList< P_ > &right)
 Comparison: this operation is expensive: O(n). More...
 
template<class T_ >
std::istream & operator>> (std::istream &in, basic_Bounds< T_ > &bounds)
 Stream extractor for bounds. More...
 
template<class T_ >
std::istream & operator>> (std::istream &in, basic_Margin< T_ > &Margin)
 Allows Margin to be read from a stream. More...
 
template<class T_ >
std::istream & operator>> (std::istream &in, basic_Point< T_ > &point)
 Reads a point from a stream. More...
 
template<class T_ >
std::istream & operator>> (std::istream &in, basic_Rectangle< T_ > &rect)
 Allows reading a rectangle from a stream TODO requires more work. More...
 
template<class T_ >
std::istream & operator>> (std::istream &in, basic_Size< T_ > &size)
 Reads a size object from a stream. More...
 
template<class T_ >
void ReflectX (basic_Point< T_ > &point)
 Reflects the given point along the X axis. More...
 
template<class T_ >
void ReflectX (basic_Point< T_ > &point, const basic_Point< T_ > &origin)
 Reflects the given point along the X axis considering given origin. More...
 
template<class C_ , class T_ , T_(C_::*)() const Getter_, void(C_::*)(const T_ &) Setter_>
void ReflectX (basic_PointProperty< C_, T_, Getter_, Setter_ > &point)
 Reflects the given point along the X axis. More...
 
template<class C_ , class T_ , T_(C_::*)() const Getter_, void(C_::*)(const T_ &) Setter_>
void ReflectX (basic_PointProperty< C_, T_, Getter_, Setter_ > &point, const basic_Point< T_ > &origin)
 Reflects the given point along the X axis considering given origin. More...
 
template<class T_ >
void ReflectY (basic_Point< T_ > &point)
 Reflects the given point along the Y axis. More...
 
template<class T_ >
void ReflectY (basic_Point< T_ > &point, const basic_Point< T_ > &origin)
 Reflects the given point along the Y axis considering given origin. More...
 
template<class C_ , class T_ , T_(C_::*)() const Getter_, void(C_::*)(const T_ &) Setter_>
void ReflectY (basic_PointProperty< C_, T_, Getter_, Setter_ > &point)
 Reflects the given point along the Y axis. More...
 
template<class C_ , class T_ , T_(C_::*)() const Getter_, void(C_::*)(const T_ &) Setter_>
void ReflectY (basic_PointProperty< C_, T_, Getter_, Setter_ > &point, const basic_Point< T_ > &origin)
 Reflects the given point along the Y axis considering given origin. More...
 
template<class T_ >
void Rotate (basic_Bounds< T_ > &bounds, Float angle)
 Rotates the given bounds by the given angle. More...
 
template<class T_ >
void Rotate (basic_Bounds< T_ > &bounds, Float angle, const basic_Point< T_ > &origin)
 Rotates the given bounds by the given angle around the given origin. More...
 
template<class T_ >
void Rotate (basic_Point< T_ > &point, Float angle)
 Rotates the given point by the given angle. More...
 
template<class T_ >
void Rotate (basic_Point< T_ > &point, Float angle, const basic_Point< T_ > &origin)
 Rotates the given point by the given angle around the given origin. More...
 
template<class C_ , class T_ , T_(C_::*)() const Getter_, void(C_::*)(const T_ &) Setter_>
void Rotate (basic_PointProperty< C_, T_, Getter_, Setter_ > &point, Float angle)
 Rotates the given point by the given angle. More...
 
template<class C_ , class T_ , T_(C_::*)() const Getter_, void(C_::*)(const T_ &) Setter_>
void Rotate (basic_PointProperty< C_, T_, Getter_, Setter_ > &point, Float angle, const T_ &origin)
 Rotates the given point by the given angle around the given origin. More...
 
Pointf Round (Pointf num)
 Performs a rounding operation over a floating point point. More...
 
template<class T_ , class O_ >
void Scale (basic_Bounds< T_ > &bounds, const basic_Size< O_ > &size)
 Scales the given bounds by the given factors for x and y coordinates. Center of the bounds is used as origin. More...
 
template<class T_ , class O_ >
void Scale (basic_Bounds< T_ > &bounds, const basic_Size< O_ > &size, const basic_Point< T_ > &origin)
 Scales the given bounds by the given factor, considering specified point as origin. More...
 
template<class T_ , class O_ >
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. More...
 
template<class T_ , class O_ >
void Scale (basic_Bounds< T_ > &bounds, const O_ &size, const basic_Point< T_ > &origin)
 Scales the given bounds by the given factor, considering specified point as origin. More...
 
template<class T_ , class O_ >
void Scale (basic_Bounds< T_ > &bounds, const O_ &sizex, const O_ &sizey)
 Scales the given bounds by the given factors for x and y coordinates. Center of the bounds is used as origin. More...
 
template<class T_ , class O_ >
void Scale (basic_Bounds< T_ > &bounds, const O_ &sizex, const O_ &sizey, const basic_Point< T_ > &origin)
 Scales the given bounds by the given factor, considering specified point as origin. More...
 
template<class T_ , class O_ >
void Scale (basic_Point< T_ > &point, const basic_Size< O_ > &size)
 Scales the given point by the given factor. More...
 
template<class T_ , class O1_ , class O2_ >
void Scale (basic_Point< T_ > &point, const O1_ &sizex, const O2_ &sizey)
 Scales the given point by the given factors for x and y coordinates. More...
 
template<class T_ , class O1_ , class O2_ >
void Scale (basic_Point< T_ > &point, const O1_ &sizex, const O2_ &sizey, const basic_Point< T_ > &origin)
 Scales the given point by the given factor, considering given point as origin. More...
 
template<class T_ , class O_ >
void Scale (basic_Point< T_ > &point, const O_ &size)
 Scales the given point by the given factor. More...
 
template<class T_ , class O_ >
void Scale (basic_Point< T_ > &point, const O_ &size, const basic_Point< T_ > &origin)
 Scales the given point by the given factor, considering given point as origin. More...
 
template<class C_ , class T_ , T_(C_::*)() const Getter_, void(C_::*)(const T_ &) Setter_, class O_ >
void Scale (basic_PointProperty< C_, T_, Getter_, Setter_ > &point, const basic_Size< O_ > &size)
 Scales the given point by the given factor. More...
 
template<class C_ , class T_ , T_(C_::*)() const Getter_, void(C_::*)(const T_ &) Setter_, class O1_ , class O2_ >
void Scale (basic_PointProperty< C_, T_, Getter_, Setter_ > &point, const O1_ &sizex, const O2_ &sizey)
 Scales the given point by the given factors for x and y coordinates. More...
 
template<class C_ , class T_ , T_(C_::*)() const Getter_, void(C_::*)(const T_ &) Setter_, class O1_ , class O2_ >
void Scale (basic_PointProperty< C_, T_, Getter_, Setter_ > &point, const O1_ &sizex, const O2_ &sizey, const T_ &origin)
 Scales the given point by the given factor, considering given point as origin. More...
 
template<class C_ , class T_ , T_(C_::*)() const Getter_, void(C_::*)(const T_ &) Setter_, class O_ >
void Scale (basic_PointProperty< C_, T_, Getter_, Setter_ > &point, const O_ &size)
 Scales the given point by the given factor. More...
 
template<class C_ , class T_ , T_(C_::*)() const Getter_, void(C_::*)(const T_ &) Setter_, class O_ >
void Scale (basic_PointProperty< C_, T_, Getter_, Setter_ > &point, const O_ &size, const basic_Point< T_ > &origin)
 Scales the given point by the given factor, considering given point as origin. More...
 
template<class T_ , class O_ >
void Scale (basic_Size< T_ > &l, const basic_Size< O_ > &size)
 Scales the given l by the given factor. More...
 
template<class T_ , class O1_ , class O2_ >
void Scale (basic_Size< T_ > &l, const O1_ &sizex, const O2_ &sizey)
 Scales the given size by the given factors for x and y coordinates. More...
 
template<class T_ , class O_ >
void Scale (basic_Size< T_ > &l, const O_ &size)
 Scales the given size by the given factor. More...
 
template<class C_ , class T_ , T_(C_::*)() const Getter_, void(C_::*)(const T_ &) Setter_, class O_ >
void Scale (basic_SizeProperty< C_, T_, Getter_, Setter_ > &l, const basic_Size< O_ > &size)
 Scales the given l by the given factor. More...
 
template<class C_ , class T_ , T_(C_::*)() const Getter_, void(C_::*)(const T_ &) Setter_, class O1_ , class O2_ >
void Scale (basic_SizeProperty< C_, T_, Getter_, Setter_ > &l, const O1_ &sizex, const O2_ &sizey)
 Scales the given size by the given factors for x and y coordinates. More...
 
template<class C_ , class T_ , T_(C_::*)() const Getter_, void(C_::*)(const T_ &) Setter_, class O_ >
void Scale (basic_SizeProperty< C_, T_, Getter_, Setter_ > &l, const O_ &size)
 Scales the given size by the given factor. More...
 
template<class T_ , class O_ >
void SkewX (basic_Bounds< T_ > &bounds, const O_ &rate)
 Skews the given bounds with the given rate along X axis. More...
 
template<class T_ , class O_ >
void SkewX (basic_Bounds< T_ > &bounds, const O_ &rate, const basic_Point< T_ > &origin)
 Skews the given bounds with the given rate along X axis considering given bounds as the origin. More...
 
template<class T_ , class O_ >
void SkewX (basic_Point< T_ > &point, const O_ &rate)
 Skews the given point with the given rate along X axis. More...
 
template<class T_ , class O_ >
void SkewX (basic_Point< T_ > &point, const O_ &rate, const basic_Point< T_ > &origin)
 Skews the given point with the given rate along X axis considering given point as the origin. More...
 
template<class C_ , class T_ , T_(C_::*)() const Getter_, void(C_::*)(const T_ &) Setter_, class O_ >
void SkewX (basic_PointProperty< C_, T_, Getter_, Setter_ > &point, const O_ &rate)
 Skews the given point with the given rate along X axis. More...
 
template<class C_ , class T_ , T_(C_::*)() const Getter_, void(C_::*)(const T_ &) Setter_, class O_ >
void SkewX (basic_PointProperty< C_, T_, Getter_, Setter_ > &point, const O_ &rate, const T_ &origin)
 Skews the given point with the given rate along X axis considering given point as the origin. More...
 
template<class T_ , class O_ >
void SkewY (basic_Bounds< T_ > &bounds, const O_ &rate)
 Skews the given bounds with the given rate along Y axis. More...
 
template<class T_ , class O_ >
void SkewY (basic_Bounds< T_ > &bounds, const O_ &rate, const basic_Point< T_ > &origin)
 Skews the given bounds with the given rate along Y axis considering given bounds as the origin. More...
 
template<class T_ , class O_ >
void SkewY (basic_Point< T_ > &point, const O_ &rate)
 Skews the given point with the given rate along Y axis. More...
 
template<class T_ , class O_ >
void SkewY (basic_Point< T_ > &point, const O_ &rate, const basic_Point< T_ > &origin)
 Skews the given point with the given rate along Y axis considering given point as the origin. More...
 
template<class C_ , class T_ , T_(C_::*)() const Getter_, void(C_::*)(const T_ &) Setter_, class O_ >
void SkewY (basic_PointProperty< C_, T_, Getter_, Setter_ > &point, const O_ &rate)
 Skews the given point with the given rate along Y axis. More...
 
template<class C_ , class T_ , T_(C_::*)() const Getter_, void(C_::*)(const T_ &) Setter_, class O_ >
void SkewY (basic_PointProperty< C_, T_, Getter_, Setter_ > &point, const O_ &rate, const basic_Point< T_ > &origin)
 Skews the given point with the given rate along Y axis considering given point as the origin. More...
 
template<class P_ >
void swap (PointList< P_ > &left, PointList< P_ > &right)
 
template<class T_ >
void Translate (basic_Bounds< T_ > &bounds, const basic_Point< T_ > &other)
 Translation moves the given bounds by the given amount. More...
 
template<class T_ , class O_ >
void Translate (basic_Bounds< T_ > &bounds, O_ x, O_ y)
 Translation moves the given bounds by the given amount. More...
 
template<class T_ >
void Translate (basic_Point< T_ > &point, const basic_Point< T_ > &other)
 Translation moves the given point by the given amount. More...
 
template<class T_ , class O_ >
void Translate (basic_Point< T_ > &point, O_ x, O_ y)
 Translation moves the given point by the given amount. More...
 
template<class C_ , class T_ , T_(C_::*)() const Getter_, void(C_::*)(const T_ &) Setter_>
void Translate (basic_PointProperty< C_, T_, Getter_, Setter_ > &point, const T_ &other)
 Translation moves the given point by the given amount. More...
 
template<class C_ , class T_ , T_(C_::*)() const Getter_, void(C_::*)(const T_ &) Setter_, class O_ >
void Translate (basic_PointProperty< C_, T_, Getter_, Setter_ > &point, O_ x, O_ y)
 Translation moves the given point by the given amount. More...
 
template<class T_ >
basic_Bounds< T_ > Union (const basic_Bounds< T_ > &l, const basic_Bounds< T_ > &r)
 Returns the smallest bounds that contains given bounds. More...
 
template<class T_ >
basic_Size< T_ > Union (const basic_Size< T_ > &l, const basic_Size< T_ > &r)
 Returns the maximum size that can fit into both size objects. More...
 
template<class T_ >
void VerticalMirror (basic_Point< T_ > &point)
 Reflects the given point vertically. More...
 
template<class C_ , class T_ , T_(C_::*)() const Getter_, void(C_::*)(const T_ &) Setter_>
void VerticalMirror (basic_Point< T_ > &point)
 Reflects the given point vertically. More...
 
template<class T_ >
void VerticalMirror (basic_Point< T_ > &point, const basic_Point< T_ > &origin)
 Reflects the given point vertically considering given origin. More...
 
template<class C_ , class T_ , T_(C_::*)() const Getter_, void(C_::*)(const T_ &) Setter_>
void VerticalMirror (basic_PointProperty< C_, T_, Getter_, Setter_ > &point, const basic_Point< T_ > &origin)
 Reflects the given point vertically considering given origin. More...
 

Variables

Scripting::Library LibGeometry ("Geometry", "Data types under geometry module and their member functions and operators")
 

Detailed Description

This namespace contains geometric element classes.

Geometric objects are constructed without value initialization. Most objects can be converted to each other. Non member transformations are defined for all objects. However, some transformations cannot be applied to some objects and does not exists (e.g. Scale for Size). Necessary operators are defined between the objects as well as within the objects. For instance a rectangle can be multiplied by a size. Additionally Every geometric object has its unique string representation. They can be streamed as strings, read from a stream or converted from/to string. Regardless of type, string constructors allow the use of comma separated lists. Additionally, a static parse function exists in all objects that throws in case of a syntax error.

Typedef Documentation

◆ Bounds

typedef basic_Bounds<int> Bounds
See also
basic_Bounds

◆ Boundsf

◆ Margin

typedef basic_Margin<int> Margin

◆ Point

using Point = basic_Point<int>
See also
basic_Point

◆ Point3D

◆ Pointf

See also
basic_Point

◆ PointfProperty

using PointfProperty = basic_PointProperty<C_, Pointf, Getter_, Setter_>

◆ PointProperty

using PointProperty = basic_PointProperty<C_, Point, Getter_, Setter_>

◆ Rectangle

◆ Rectanglef

◆ Size

using Size = basic_Size<int>
See also
basic_Size

◆ Sizef

See also
basic_Size

◆ SizefProperty

using SizefProperty = basic_SizeProperty<C_, Sizef, Getter_, Setter_>

◆ SizeProperty

using SizeProperty = basic_SizeProperty<C_, Size, Getter_, Setter_>

◆ Transform3D

Function Documentation

◆ Combine()

basic_Size<T_> Gorgon::Geometry::Combine ( const basic_Size< T_ > &  l,
const basic_Size< T_ > &  r 
)

Returns the minimum required size that can hold both size objects.

References basic_Size< T_ >::Height, and basic_Size< T_ >::Width.

◆ Contains()

bool Gorgon::Geometry::Contains ( const basic_Bounds< T_ > &  outer,
const basic_Bounds< T_ > &  inner 
)

Checks whether the outer bounds contain inner bounds.

References basic_Bounds< T_ >::Bottom, basic_Bounds< T_ >::Left, basic_Bounds< T_ >::Right, and basic_Bounds< T_ >::Top.

◆ HorizontalMirror() [1/4]

void Gorgon::Geometry::HorizontalMirror ( basic_Point< T_ > &  point)

Reflects the given point horizontally.

References ReflectX().

◆ HorizontalMirror() [2/4]

void Gorgon::Geometry::HorizontalMirror ( basic_Point< T_ > &  point,
const basic_Point< T_ > &  origin 
)

Reflects the given point horizontally considering given origin.

References ReflectX().

◆ HorizontalMirror() [3/4]

void Gorgon::Geometry::HorizontalMirror ( basic_PointProperty< C_, T_, Getter_, Setter_ > &  point)

Reflects the given point horizontally.

References ReflectX().

◆ HorizontalMirror() [4/4]

void Gorgon::Geometry::HorizontalMirror ( basic_PointProperty< C_, T_, Getter_, Setter_ > &  point,
const basic_Point< T_ > &  origin 
)

Reflects the given point horizontally considering given origin.

References ReflectX().

◆ init_scripting()

◆ Intersect()

basic_Bounds<T_> Gorgon::Geometry::Intersect ( const basic_Bounds< T_ > &  l,
const basic_Bounds< T_ > &  r 
)

Creates a new bounds that contains only the intersection of two bounds.

If they do not intersect, a bounds of [0-0, 0-0] is returned. It is possible to use this function without referring to Geometry namespace.

References basic_Bounds< T_ >::Bottom, basic_Bounds< T_ >::Left, basic_Bounds< T_ >::Right, and basic_Bounds< T_ >::Top.

◆ IsColliding()

bool Gorgon::Geometry::IsColliding ( const basic_Bounds< T_ > &  l,
const basic_Bounds< T_ > &  r 
)

Checks whether two bounds are colliding.

It is possible to use this function without referring to Geometry namespace.

References basic_Bounds< T_ >::Bottom, basic_Bounds< T_ >::Left, basic_Bounds< T_ >::Right, and basic_Bounds< T_ >::Top.

◆ IsInside() [1/2]

bool Gorgon::Geometry::IsInside ( const basic_Bounds< T_ > &  b,
const basic_Point< T_ > &  p 
)

◆ IsInside() [2/2]

bool Gorgon::Geometry::IsInside ( const basic_Rectangle< T_ > &  r,
const basic_Point< T_ > &  p 
)

◆ operator!=()

bool Gorgon::Geometry::operator!= ( PointList< P_ > &  left,
const PointList< P_ > &  right 
)

Comparison: this operation is expensive: O(n).

References PointList< P_ >::Points.

◆ operator*() [1/3]

auto Gorgon::Geometry::operator* ( const basic_Point< T_ > &  l,
const basic_Size< O_ > &  r 
) -> basic_Point<decltype(l.X*r.Width)>

Allows multiplication of point with a size object.

References basic_Point< T_ >::X.

◆ operator*() [2/3]

basic_Size<T_> Gorgon::Geometry::operator* ( const basic_Size< T_ > &  size,
double  factor 
)

Multiplies a size with a scalar, effectively resizing it.

References basic_Size< T_ >::Height, and basic_Size< T_ >::Width.

◆ operator*() [3/3]

basic_Size<T_> Gorgon::Geometry::operator* ( double  factor,
const basic_Size< T_ > &  size 
)

Multiplies a size with a scalar, effectively resizing it.

References operator*().

◆ operator+() [1/2]

◆ operator+() [2/2]

basic_Size<T_> Gorgon::Geometry::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 Margin.

References basic_Size< T_ >::Height, basic_Margin< T_ >::TotalX(), basic_Margin< T_ >::TotalY(), and basic_Size< T_ >::Width.

◆ operator-() [1/3]

basic_Bounds<T_> Gorgon::Geometry::operator- ( const basic_Bounds< T_ > &  b,
const basic_Margin< R_ > &  m 
)

◆ operator-() [2/3]

basic_Margin<T_> Gorgon::Geometry::operator- ( const basic_Bounds< T_ > &  b1,
const basic_Bounds< R_ > &  b2 
)

Subtracts two bounds to find marginal difference between them.

References basic_Bounds< T_ >::Bottom, basic_Bounds< T_ >::Left, basic_Bounds< T_ >::Right, and basic_Bounds< T_ >::Top.

◆ operator-() [3/3]

basic_Size<T_> Gorgon::Geometry::operator- ( const basic_Size< T_ > &  s,
const basic_Margin< R_ > &  m 
)

◆ operator/() [1/3]

auto Gorgon::Geometry::operator/ ( const basic_Point< T_ > &  l,
const basic_Size< O_ > &  r 
) -> basic_Point<decltype(l.X*r.Width)>

Allows division of point with a size object.

References basic_Point< T_ >::X.

◆ operator/() [2/3]

basic_Size<T_> Gorgon::Geometry::operator/ ( const basic_Size< T_ > &  size,
double  factor 
)

Divides a size with a scalar, effectively resizing it.

References basic_Size< T_ >::Height, and basic_Size< T_ >::Width.

◆ operator/() [3/3]

basic_Size<T_> Gorgon::Geometry::operator/ ( double  factor,
const basic_Size< T_ > &  size 
)

Divides a size with a scalar, effectively resizing it.

References operator/().

◆ operator<()

bool Gorgon::Geometry::operator< ( PointList< P_ > &  left,
const PointList< P_ > &  right 
)

Comparison: this operation is expensive: O(n).

References PointList< P_ >::Points.

◆ operator<<() [1/6]

std::ostream& Gorgon::Geometry::operator<< ( std::ostream &  out,
const basic_Bounds< T_ > &  bounds 
)

Allows streaming of bounds.

in string representation, bounds is shown as [(l, t) - (r, b)]

References basic_Bounds< T_ >::Bottom, basic_Bounds< T_ >::Left, basic_Bounds< T_ >::Right, and basic_Bounds< T_ >::Top.

◆ operator<<() [2/6]

std::ostream& Gorgon::Geometry::operator<< ( std::ostream &  out,
const basic_Margin< T_ > &  Margin 
)

◆ operator<<() [3/6]

std::ostream& Gorgon::Geometry::operator<< ( std::ostream &  out,
const basic_Point3D< T_ > &  point 
)

Allows streaming of point.

A point will be printed inside parenthesis with a comma separating X and Y values.

References basic_Point3D< T_ >::X, basic_Point3D< T_ >::Y, and basic_Point3D< T_ >::Z.

◆ operator<<() [4/6]

std::ostream& Gorgon::Geometry::operator<< ( std::ostream &  out,
const basic_Point< T_ > &  point 
)

Allows streaming of point.

A point will be printed inside parenthesis with a comma separating X and Y values.

References basic_Point< T_ >::X, and basic_Point< T_ >::Y.

◆ operator<<() [5/6]

std::ostream& Gorgon::Geometry::operator<< ( std::ostream &  out,
const basic_Rectangle< T_ > &  Rectangle 
)

◆ operator<<() [6/6]

std::ostream& Gorgon::Geometry::operator<< ( std::ostream &  out,
const basic_Transform3D< T_ > &  transform 
)

◆ operator<=()

bool Gorgon::Geometry::operator<= ( PointList< P_ > &  left,
const PointList< P_ > &  right 
)

Comparison: this operation is expensive: O(n).

References PointList< P_ >::Points.

◆ operator==()

bool Gorgon::Geometry::operator== ( PointList< P_ > &  left,
const PointList< P_ > &  right 
)

Comparison: this operation is expensive: O(n).

References PointList< P_ >::Points.

◆ operator>()

bool Gorgon::Geometry::operator> ( PointList< P_ > &  left,
const PointList< P_ > &  right 
)

Comparison: this operation is expensive: O(n).

References PointList< P_ >::Points.

◆ operator>=()

bool Gorgon::Geometry::operator>= ( PointList< P_ > &  left,
const PointList< P_ > &  right 
)

Comparison: this operation is expensive: O(n).

References PointList< P_ >::Points.

◆ operator>>() [1/5]

std::istream& Gorgon::Geometry::operator>> ( std::istream &  in,
basic_Bounds< T_ > &  bounds 
)

◆ operator>>() [2/5]

std::istream& Gorgon::Geometry::operator>> ( std::istream &  in,
basic_Margin< T_ > &  Margin 
)

◆ operator>>() [3/5]

std::istream& Gorgon::Geometry::operator>> ( std::istream &  in,
basic_Point< T_ > &  point 
)

Reads a point from a stream.

Requires comma in between x and y. parentheses are optional. They wont even be matched to each other. A point entry should not contain space before closing parenthesis otherwise, parenthesis will not be extracted.

References basic_Point< T_ >::X, and basic_Point< T_ >::Y.

◆ operator>>() [4/5]

std::istream& Gorgon::Geometry::operator>> ( std::istream &  in,
basic_Rectangle< T_ > &  rect 
)

Allows reading a rectangle from a stream TODO requires more work.

References basic_Rectangle< T_ >::Height, and basic_Rectangle< T_ >::Width.

◆ operator>>() [5/5]

std::istream& Gorgon::Geometry::operator>> ( std::istream &  in,
basic_Size< T_ > &  size 
)

Reads a size object from a stream.

Width and Height components should be separated by an x.

References basic_Size< T_ >::Height, and basic_Size< T_ >::Width.

◆ ReflectX() [1/4]

void Gorgon::Geometry::ReflectX ( basic_Point< T_ > &  point)

Reflects the given point along the X axis.

References basic_Point< T_ >::Y.

◆ ReflectX() [2/4]

void Gorgon::Geometry::ReflectX ( basic_Point< T_ > &  point,
const basic_Point< T_ > &  origin 
)

Reflects the given point along the X axis considering given origin.

References basic_Point< T_ >::Y.

◆ ReflectX() [3/4]

void Gorgon::Geometry::ReflectX ( basic_PointProperty< C_, T_, Getter_, Setter_ > &  point)

Reflects the given point along the X axis.

References basic_PointProperty< C_, T_, Getter_, Setter_ >::Y.

◆ ReflectX() [4/4]

void Gorgon::Geometry::ReflectX ( basic_PointProperty< C_, T_, Getter_, Setter_ > &  point,
const basic_Point< T_ > &  origin 
)

Reflects the given point along the X axis considering given origin.

References basic_Point< T_ >::Y, and basic_PointProperty< C_, T_, Getter_, Setter_ >::Y.

◆ ReflectY() [1/4]

void Gorgon::Geometry::ReflectY ( basic_Point< T_ > &  point)

Reflects the given point along the Y axis.

References basic_Point< T_ >::X.

◆ ReflectY() [2/4]

void Gorgon::Geometry::ReflectY ( basic_Point< T_ > &  point,
const basic_Point< T_ > &  origin 
)

Reflects the given point along the Y axis considering given origin.

References basic_Point< T_ >::X.

◆ ReflectY() [3/4]

void Gorgon::Geometry::ReflectY ( basic_PointProperty< C_, T_, Getter_, Setter_ > &  point)

Reflects the given point along the Y axis.

References basic_PointProperty< C_, T_, Getter_, Setter_ >::X.

◆ ReflectY() [4/4]

void Gorgon::Geometry::ReflectY ( basic_PointProperty< C_, T_, Getter_, Setter_ > &  point,
const basic_Point< T_ > &  origin 
)

Reflects the given point along the Y axis considering given origin.

References basic_Point< T_ >::X, and basic_PointProperty< C_, T_, Getter_, Setter_ >::X.

◆ Rotate() [1/6]

void Gorgon::Geometry::Rotate ( basic_Bounds< T_ > &  bounds,
Float  angle 
)

Rotates the given bounds by the given angle.

Rotation is performed as if given bounds is a rectangle and the result is the bounds of this rotated rectangle. Center of the bounds is used as origin.

Parameters
boundsobject to be rotated
angleis the Euler rotation angle in radians

References basic_Bounds< T_ >::Bottom, basic_Bounds< T_ >::BottomLeft(), basic_Bounds< T_ >::BottomRight(), basic_Bounds< T_ >::Center(), basic_Bounds< T_ >::Left, basic_Bounds< T_ >::Right, basic_Bounds< T_ >::Top, basic_Bounds< T_ >::TopLeft(), basic_Bounds< T_ >::TopRight(), basic_Point< T_ >::X, and basic_Point< T_ >::Y.

◆ Rotate() [2/6]

void Gorgon::Geometry::Rotate ( basic_Bounds< T_ > &  bounds,
Float  angle,
const basic_Point< T_ > &  origin 
)

Rotates the given bounds by the given angle around the given origin.

Parameters
boundsobject to be rotated
angleis the Euler rotation angle in radians
originof the rotation

References basic_Bounds< T_ >::Bottom, basic_Bounds< T_ >::BottomLeft(), basic_Bounds< T_ >::BottomRight(), basic_Bounds< T_ >::Left, basic_Bounds< T_ >::Right, Rotate(), basic_Bounds< T_ >::Top, basic_Bounds< T_ >::TopLeft(), basic_Bounds< T_ >::TopRight(), basic_Point< T_ >::X, and basic_Point< T_ >::Y.

◆ Rotate() [3/6]

void Gorgon::Geometry::Rotate ( basic_Point< T_ > &  point,
Float  angle 
)

Rotates the given point by the given angle.

Parameters
pointthe point to rotate
angleis the Euler rotation angle in radians

References basic_Point< T_ >::X, and basic_Point< T_ >::Y.

◆ Rotate() [4/6]

void Gorgon::Geometry::Rotate ( basic_Point< T_ > &  point,
Float  angle,
const basic_Point< T_ > &  origin 
)

Rotates the given point by the given angle around the given origin.

Parameters
pointthe point to rotate
angleis the Euler rotation angle in radians
originis the origin of rotation

References basic_Point< T_ >::X, and basic_Point< T_ >::Y.

◆ Rotate() [5/6]

void Gorgon::Geometry::Rotate ( basic_PointProperty< C_, T_, Getter_, Setter_ > &  point,
Float  angle 
)

Rotates the given point by the given angle.

Parameters
pointthe point to rotate
angleis the Euler rotation angle in radians

References Rotate().

◆ Rotate() [6/6]

void Gorgon::Geometry::Rotate ( basic_PointProperty< C_, T_, Getter_, Setter_ > &  point,
Float  angle,
const T_ &  origin 
)

Rotates the given point by the given angle around the given origin.

Parameters
pointthe point to rotate
angleis the Euler rotation angle in radians
originis the origin of rotation

References Rotate().

◆ Round()

Pointf Gorgon::Geometry::Round ( Pointf  num)

Performs a rounding operation over a floating point point.

References basic_Point< T_ >::X, and basic_Point< T_ >::Y.

◆ Scale() [1/22]

void Gorgon::Geometry::Scale ( basic_Bounds< T_ > &  bounds,
const basic_Size< O_ > &  size 
)

Scales the given bounds by the given factors for x and y coordinates. Center of the bounds is used as origin.

References basic_Bounds< T_ >::Bottom, basic_Size< T_ >::Height, basic_Bounds< T_ >::Left, basic_Bounds< T_ >::Right, basic_Bounds< T_ >::Top, and basic_Size< T_ >::Width.

◆ Scale() [2/22]

void Gorgon::Geometry::Scale ( basic_Bounds< T_ > &  bounds,
const basic_Size< O_ > &  size,
const basic_Point< T_ > &  origin 
)

Scales the given bounds by the given factor, considering specified point as origin.

References basic_Size< T_ >::Height, basic_Bounds< T_ >::Left, basic_Bounds< T_ >::Right, basic_Bounds< T_ >::Top, basic_Size< T_ >::Width, basic_Point< T_ >::X, and basic_Point< T_ >::Y.

◆ Scale() [3/22]

void Gorgon::Geometry::Scale ( basic_Bounds< T_ > &  bounds,
const O_ &  size 
)

Scales the given bounds by the given factor. Center of the bounds is used as origin.

References basic_Bounds< T_ >::Bottom, basic_Bounds< T_ >::Left, basic_Bounds< T_ >::Right, and basic_Bounds< T_ >::Top.

◆ Scale() [4/22]

void Gorgon::Geometry::Scale ( basic_Bounds< T_ > &  bounds,
const O_ &  size,
const basic_Point< T_ > &  origin 
)

Scales the given bounds by the given factor, considering specified point as origin.

References basic_Bounds< T_ >::Left, basic_Bounds< T_ >::Right, basic_Bounds< T_ >::Top, basic_Point< T_ >::X, and basic_Point< T_ >::Y.

◆ Scale() [5/22]

void Gorgon::Geometry::Scale ( basic_Bounds< T_ > &  bounds,
const O_ &  sizex,
const O_ &  sizey 
)

Scales the given bounds by the given factors for x and y coordinates. Center of the bounds is used as origin.

References basic_Bounds< T_ >::Bottom, basic_Bounds< T_ >::Left, basic_Bounds< T_ >::Right, and basic_Bounds< T_ >::Top.

◆ Scale() [6/22]

void Gorgon::Geometry::Scale ( basic_Bounds< T_ > &  bounds,
const O_ &  sizex,
const O_ &  sizey,
const basic_Point< T_ > &  origin 
)

Scales the given bounds by the given factor, considering specified point as origin.

This method variant is mostly there to allow scaling by Size.

References basic_Bounds< T_ >::Left, basic_Bounds< T_ >::Right, basic_Bounds< T_ >::Top, basic_Point< T_ >::X, and basic_Point< T_ >::Y.

◆ Scale() [7/22]

void Gorgon::Geometry::Scale ( basic_Point< T_ > &  point,
const basic_Size< O_ > &  size 
)

Scales the given point by the given factor.

References basic_Size< T_ >::Height, basic_Size< T_ >::Width, basic_Point< T_ >::X, and basic_Point< T_ >::Y.

◆ Scale() [8/22]

void Gorgon::Geometry::Scale ( basic_Point< T_ > &  point,
const O1_ &  sizex,
const O2_ &  sizey 
)

Scales the given point by the given factors for x and y coordinates.

References basic_Point< T_ >::X, and basic_Point< T_ >::Y.

◆ Scale() [9/22]

void Gorgon::Geometry::Scale ( basic_Point< T_ > &  point,
const O1_ &  sizex,
const O2_ &  sizey,
const basic_Point< T_ > &  origin 
)

Scales the given point by the given factor, considering given point as origin.

References basic_Point< T_ >::X, and basic_Point< T_ >::Y.

◆ Scale() [10/22]

void Gorgon::Geometry::Scale ( basic_Point< T_ > &  point,
const O_ &  size 
)

Scales the given point by the given factor.

References basic_Point< T_ >::X, and basic_Point< T_ >::Y.

◆ Scale() [11/22]

void Gorgon::Geometry::Scale ( basic_Point< T_ > &  point,
const O_ &  size,
const basic_Point< T_ > &  origin 
)

Scales the given point by the given factor, considering given point as origin.

References basic_Point< T_ >::X, and basic_Point< T_ >::Y.

◆ Scale() [12/22]

void Gorgon::Geometry::Scale ( basic_PointProperty< C_, T_, Getter_, Setter_ > &  point,
const basic_Size< O_ > &  size 
)

Scales the given point by the given factor.

References Scale().

◆ Scale() [13/22]

void Gorgon::Geometry::Scale ( basic_PointProperty< C_, T_, Getter_, Setter_ > &  point,
const O1_ &  sizex,
const O2_ &  sizey 
)

Scales the given point by the given factors for x and y coordinates.

References Scale().

◆ Scale() [14/22]

void Gorgon::Geometry::Scale ( basic_PointProperty< C_, T_, Getter_, Setter_ > &  point,
const O1_ &  sizex,
const O2_ &  sizey,
const T_ &  origin 
)

Scales the given point by the given factor, considering given point as origin.

References Scale().

◆ Scale() [15/22]

void Gorgon::Geometry::Scale ( basic_PointProperty< C_, T_, Getter_, Setter_ > &  point,
const O_ &  size 
)

Scales the given point by the given factor.

References Scale().

◆ Scale() [16/22]

void Gorgon::Geometry::Scale ( basic_PointProperty< C_, T_, Getter_, Setter_ > &  point,
const O_ &  size,
const basic_Point< T_ > &  origin 
)

Scales the given point by the given factor, considering given point as origin.

References Scale().

◆ Scale() [17/22]

void Gorgon::Geometry::Scale ( basic_Size< T_ > &  l,
const basic_Size< O_ > &  size 
)

Scales the given l by the given factor.

References basic_Size< T_ >::Height, and basic_Size< T_ >::Width.

◆ Scale() [18/22]

void Gorgon::Geometry::Scale ( basic_Size< T_ > &  l,
const O1_ &  sizex,
const O2_ &  sizey 
)

Scales the given size by the given factors for x and y coordinates.

References basic_Size< T_ >::Height, and basic_Size< T_ >::Width.

◆ Scale() [19/22]

void Gorgon::Geometry::Scale ( basic_Size< T_ > &  l,
const O_ &  size 
)

Scales the given size by the given factor.

References basic_Size< T_ >::Height, and basic_Size< T_ >::Width.

◆ Scale() [20/22]

void Gorgon::Geometry::Scale ( basic_SizeProperty< C_, T_, Getter_, Setter_ > &  l,
const basic_Size< O_ > &  size 
)

Scales the given l by the given factor.

References Property< C_, T_, Getter_, Setter_ >::Get(), Scale(), and Property< C_, T_, Getter_, Setter_ >::Set().

◆ Scale() [21/22]

void Gorgon::Geometry::Scale ( basic_SizeProperty< C_, T_, Getter_, Setter_ > &  l,
const O1_ &  sizex,
const O2_ &  sizey 
)

Scales the given size by the given factors for x and y coordinates.

References Property< C_, T_, Getter_, Setter_ >::Get(), Scale(), and Property< C_, T_, Getter_, Setter_ >::Set().

◆ Scale() [22/22]

void Gorgon::Geometry::Scale ( basic_SizeProperty< C_, T_, Getter_, Setter_ > &  l,
const O_ &  size 
)

Scales the given size by the given factor.

References Property< C_, T_, Getter_, Setter_ >::Get(), Scale(), and Property< C_, T_, Getter_, Setter_ >::Set().

◆ SkewX() [1/6]

void Gorgon::Geometry::SkewX ( basic_Bounds< T_ > &  bounds,
const O_ &  rate 
)

Skews the given bounds with the given rate along X axis.

Skew operation transforms objects in a way that it converts a rectangle to a parallelogram. Require normalized bounds.

References basic_Bounds< T_ >::Bottom, basic_Bounds< T_ >::Left, basic_Bounds< T_ >::Right, and basic_Bounds< T_ >::Top.

◆ SkewX() [2/6]

void Gorgon::Geometry::SkewX ( basic_Bounds< T_ > &  bounds,
const O_ &  rate,
const basic_Point< T_ > &  origin 
)

Skews the given bounds with the given rate along X axis considering given bounds as the origin.

Skew operation transforms objects in a way that it converts a rectangle to a parallelogram.

References basic_Bounds< T_ >::Bottom, basic_Bounds< T_ >::Left, basic_Bounds< T_ >::Right, basic_Bounds< T_ >::Top, and basic_Point< T_ >::Y.

◆ SkewX() [3/6]

void Gorgon::Geometry::SkewX ( basic_Point< T_ > &  point,
const O_ &  rate 
)

Skews the given point with the given rate along X axis.

Skew operation transforms objects in a way that it converts a rectangle to a parallelogram.

References basic_Point< T_ >::X, and basic_Point< T_ >::Y.

◆ SkewX() [4/6]

void Gorgon::Geometry::SkewX ( basic_Point< T_ > &  point,
const O_ &  rate,
const basic_Point< T_ > &  origin 
)

Skews the given point with the given rate along X axis considering given point as the origin.

Skew operation transforms objects in a way that it converts a rectangle to a parallelogram.

References basic_Point< T_ >::X, and basic_Point< T_ >::Y.

◆ SkewX() [5/6]

void Gorgon::Geometry::SkewX ( basic_PointProperty< C_, T_, Getter_, Setter_ > &  point,
const O_ &  rate 
)

Skews the given point with the given rate along X axis.

Skew operation transforms objects in a way that it converts a rectangle to a parallelogram.

References SkewX().

◆ SkewX() [6/6]

void Gorgon::Geometry::SkewX ( basic_PointProperty< C_, T_, Getter_, Setter_ > &  point,
const O_ &  rate,
const T_ &  origin 
)

Skews the given point with the given rate along X axis considering given point as the origin.

Skew operation transforms objects in a way that it converts a rectangle to a parallelogram.

References basic_PointProperty< C_, T_, Getter_, Setter_ >::X, and basic_PointProperty< C_, T_, Getter_, Setter_ >::Y.

◆ SkewY() [1/6]

void Gorgon::Geometry::SkewY ( basic_Bounds< T_ > &  bounds,
const O_ &  rate 
)

Skews the given bounds with the given rate along Y axis.

Skew operation transforms objects in a way that it converts a rectangle to a parallelogram.

References basic_Bounds< T_ >::Bottom, basic_Bounds< T_ >::Left, basic_Bounds< T_ >::Right, and basic_Bounds< T_ >::Top.

◆ SkewY() [2/6]

void Gorgon::Geometry::SkewY ( basic_Bounds< T_ > &  bounds,
const O_ &  rate,
const basic_Point< T_ > &  origin 
)

Skews the given bounds with the given rate along Y axis considering given bounds as the origin.

Skew operation transforms objects in a way that it converts a rectangle to a parallelogram.

References basic_Bounds< T_ >::Bottom, basic_Bounds< T_ >::Left, basic_Bounds< T_ >::Right, basic_Bounds< T_ >::Top, and basic_Point< T_ >::X.

◆ SkewY() [3/6]

void Gorgon::Geometry::SkewY ( basic_Point< T_ > &  point,
const O_ &  rate 
)

Skews the given point with the given rate along Y axis.

Skew operation transforms objects in a way that it converts a rectangle to a parallelogram.

References basic_Point< T_ >::X, and basic_Point< T_ >::Y.

◆ SkewY() [4/6]

void Gorgon::Geometry::SkewY ( basic_Point< T_ > &  point,
const O_ &  rate,
const basic_Point< T_ > &  origin 
)

Skews the given point with the given rate along Y axis considering given point as the origin.

Skew operation transforms objects in a way that it converts a rectangle to a parallelogram.

References basic_Point< T_ >::X, and basic_Point< T_ >::Y.

◆ SkewY() [5/6]

void Gorgon::Geometry::SkewY ( basic_PointProperty< C_, T_, Getter_, Setter_ > &  point,
const O_ &  rate 
)

Skews the given point with the given rate along Y axis.

Skew operation transforms objects in a way that it converts a rectangle to a parallelogram.

References SkewY().

◆ SkewY() [6/6]

void Gorgon::Geometry::SkewY ( basic_PointProperty< C_, T_, Getter_, Setter_ > &  point,
const O_ &  rate,
const basic_Point< T_ > &  origin 
)

Skews the given point with the given rate along Y axis considering given point as the origin.

Skew operation transforms objects in a way that it converts a rectangle to a parallelogram.

References basic_Point< T_ >::X, basic_PointProperty< C_, T_, Getter_, Setter_ >::X, and basic_PointProperty< C_, T_, Getter_, Setter_ >::Y.

◆ swap()

void Gorgon::Geometry::swap ( PointList< P_ > &  left,
PointList< P_ > &  right 
)

◆ Translate() [1/6]

void Gorgon::Geometry::Translate ( basic_Bounds< T_ > &  bounds,
const basic_Point< T_ > &  other 
)

◆ Translate() [2/6]

void Gorgon::Geometry::Translate ( basic_Bounds< T_ > &  bounds,
O_  x,
O_  y 
)

Translation moves the given bounds by the given amount.

References basic_Bounds< T_ >::Bottom, basic_Bounds< T_ >::Left, basic_Bounds< T_ >::Right, and basic_Bounds< T_ >::Top.

◆ Translate() [3/6]

void Gorgon::Geometry::Translate ( basic_Point< T_ > &  point,
const basic_Point< T_ > &  other 
)

Translation moves the given point by the given amount.

References basic_Point< T_ >::X, and basic_Point< T_ >::Y.

◆ Translate() [4/6]

void Gorgon::Geometry::Translate ( basic_Point< T_ > &  point,
O_  x,
O_  y 
)

Translation moves the given point by the given amount.

References basic_Point< T_ >::X, and basic_Point< T_ >::Y.

◆ Translate() [5/6]

void Gorgon::Geometry::Translate ( basic_PointProperty< C_, T_, Getter_, Setter_ > &  point,
const T_ &  other 
)

Translation moves the given point by the given amount.

References Translate().

◆ Translate() [6/6]

void Gorgon::Geometry::Translate ( basic_PointProperty< C_, T_, Getter_, Setter_ > &  point,
O_  x,
O_  y 
)

Translation moves the given point by the given amount.

References Translate().

◆ Union() [1/2]

basic_Bounds<T_> Gorgon::Geometry::Union ( const basic_Bounds< T_ > &  l,
const basic_Bounds< T_ > &  r 
)

Returns the smallest bounds that contains given bounds.

It is possible to use this function without referring to Geometry namespace.

References basic_Bounds< T_ >::Bottom, basic_Bounds< T_ >::Left, basic_Bounds< T_ >::Right, and basic_Bounds< T_ >::Top.

◆ Union() [2/2]

basic_Size<T_> Gorgon::Geometry::Union ( const basic_Size< T_ > &  l,
const basic_Size< T_ > &  r 
)

Returns the maximum size that can fit into both size objects.

References basic_Size< T_ >::Height, and basic_Size< T_ >::Width.

◆ VerticalMirror() [1/4]

void Gorgon::Geometry::VerticalMirror ( basic_Point< T_ > &  point)

Reflects the given point vertically.

References ReflectY().

◆ VerticalMirror() [2/4]

void Gorgon::Geometry::VerticalMirror ( basic_Point< T_ > &  point)

Reflects the given point vertically.

References ReflectY().

◆ VerticalMirror() [3/4]

void Gorgon::Geometry::VerticalMirror ( basic_Point< T_ > &  point,
const basic_Point< T_ > &  origin 
)

Reflects the given point vertically considering given origin.

References ReflectY().

◆ VerticalMirror() [4/4]

void Gorgon::Geometry::VerticalMirror ( basic_PointProperty< C_, T_, Getter_, Setter_ > &  point,
const basic_Point< T_ > &  origin 
)

Reflects the given point vertically considering given origin.

References ReflectY().

Variable Documentation

◆ LibGeometry

Scripting::Library LibGeometry("Geometry", "Data types under geometry module and their member functions and operators")