![]() |
Gorgon Game Engine
|
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< Float > | Boundsf |
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< Float > | Rectanglef |
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") |
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 basic_Bounds<int> Bounds |
typedef basic_Bounds<Float> Boundsf |
typedef basic_Margin<int> Margin |
using Point = basic_Point<int> |
using Point3D = basic_Point3D<Float> |
using Pointf = basic_Point<Float> |
using PointfProperty = basic_PointProperty<C_, Pointf, Getter_, Setter_> |
using PointProperty = basic_PointProperty<C_, Point, Getter_, Setter_> |
typedef basic_Rectangle<int> Rectangle |
typedef basic_Rectangle<Float> Rectanglef |
using Size = basic_Size<int> |
using Sizef = basic_Size<Float> |
using SizefProperty = basic_SizeProperty<C_, Sizef, Getter_, Setter_> |
using SizeProperty = basic_SizeProperty<C_, Size, Getter_, Setter_> |
using Transform3D = basic_Transform3D<Float> |
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.
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.
void Gorgon::Geometry::HorizontalMirror | ( | basic_Point< T_ > & | point | ) |
Reflects the given point horizontally.
References ReflectX().
void Gorgon::Geometry::HorizontalMirror | ( | basic_Point< T_ > & | point, |
const basic_Point< T_ > & | origin | ||
) |
Reflects the given point horizontally considering given origin.
References ReflectX().
void Gorgon::Geometry::HorizontalMirror | ( | basic_PointProperty< C_, T_, Getter_, Setter_ > & | point | ) |
Reflects the given point horizontally.
References ReflectX().
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().
void Gorgon::Geometry::init_scripting | ( | ) |
References Namespace::AddMember(), basic_Point< T_ >::Angle(), basic_Point< T_ >::Compare(), Gorgon::Scripting::ConstTag, basic_Point< T_ >::Distance(), Hashmap< K_, T_, KeyFn, M_, C_ >::GetCount(), LibGeometry, basic_Point< T_ >::ManhattanDistance(), Gorgon::Scripting::MapFunction(), Namespace::Members, basic_Point< T_ >::Move(), Scale(), basic_Point< T_ >::Slope(), basic_Point< T_ >::X, and basic_Point< T_ >::Y.
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.
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.
bool Gorgon::Geometry::IsInside | ( | const basic_Bounds< T_ > & | b, |
const basic_Point< T_ > & | p | ||
) |
Checks whether the given point is inside this bounds.
References basic_Bounds< T_ >::Bottom, basic_Bounds< T_ >::Left, basic_Bounds< T_ >::Right, basic_Bounds< T_ >::Top, basic_Point< T_ >::X, and basic_Point< T_ >::Y.
bool Gorgon::Geometry::IsInside | ( | const basic_Rectangle< T_ > & | r, |
const basic_Point< T_ > & | p | ||
) |
Checks whether a given point is inside the given rectangle.
References basic_Rectangle< T_ >::Bottom(), basic_Rectangle< T_ >::Right(), basic_Point< T_ >::X, basic_Rectangle< T_ >::X, basic_Point< T_ >::Y, and basic_Rectangle< T_ >::Y.
Comparison: this operation is expensive: O(n).
References PointList< P_ >::Points.
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.
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.
basic_Size<T_> Gorgon::Geometry::operator* | ( | double | factor, |
const basic_Size< T_ > & | size | ||
) |
Multiplies a size with a scalar, effectively resizing it.
References operator*().
basic_Bounds<T_> Gorgon::Geometry::operator+ | ( | const basic_Bounds< T_ > & | b, |
const basic_Margin< R_ > & | m | ||
) |
Adds a Margin object to a bounds.
References basic_Bounds< T_ >::Bottom, basic_Margin< T_ >::Bottom, basic_Bounds< T_ >::Left, basic_Margin< T_ >::Left, basic_Bounds< T_ >::Right, basic_Margin< T_ >::Right, basic_Bounds< T_ >::Top, and basic_Margin< T_ >::Top.
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.
basic_Bounds<T_> Gorgon::Geometry::operator- | ( | const basic_Bounds< T_ > & | b, |
const basic_Margin< R_ > & | m | ||
) |
Removes a Margin object from a bounds object,.
References basic_Bounds< T_ >::Bottom, basic_Margin< T_ >::Bottom, basic_Bounds< T_ >::Left, basic_Margin< T_ >::Left, basic_Bounds< T_ >::Right, basic_Margin< T_ >::Right, basic_Bounds< T_ >::Top, and basic_Margin< T_ >::Top.
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.
basic_Size<T_> Gorgon::Geometry::operator- | ( | const basic_Size< T_ > & | s, |
const basic_Margin< R_ > & | m | ||
) |
Subtracts a Margin from a size.
References basic_Size< T_ >::Height, basic_Margin< T_ >::TotalX(), basic_Margin< T_ >::TotalY(), and basic_Size< T_ >::Width.
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.
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.
basic_Size<T_> Gorgon::Geometry::operator/ | ( | double | factor, |
const basic_Size< T_ > & | size | ||
) |
Divides a size with a scalar, effectively resizing it.
References operator/().
Comparison: this operation is expensive: O(n).
References PointList< P_ >::Points.
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.
std::ostream& Gorgon::Geometry::operator<< | ( | std::ostream & | out, |
const basic_Margin< T_ > & | Margin | ||
) |
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.
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.
std::ostream& Gorgon::Geometry::operator<< | ( | std::ostream & | out, |
const basic_Rectangle< T_ > & | Rectangle | ||
) |
Allows streaming of Rectangle.
References basic_Rectangle< T_ >::Height, basic_Rectangle< T_ >::Width, basic_Rectangle< T_ >::X, and basic_Rectangle< T_ >::Y.
std::ostream& Gorgon::Geometry::operator<< | ( | std::ostream & | out, |
const basic_Transform3D< T_ > & | transform | ||
) |
References basic_Transform3D< T_ >::Get().
Comparison: this operation is expensive: O(n).
References PointList< P_ >::Points.
Comparison: this operation is expensive: O(n).
References PointList< P_ >::Points.
Comparison: this operation is expensive: O(n).
References PointList< P_ >::Points.
Comparison: this operation is expensive: O(n).
References PointList< P_ >::Points.
std::istream& Gorgon::Geometry::operator>> | ( | std::istream & | in, |
basic_Bounds< T_ > & | bounds | ||
) |
Stream extractor for bounds.
References basic_Bounds< T_ >::Bottom, basic_Bounds< T_ >::Left, basic_Bounds< T_ >::Right, basic_Bounds< T_ >::Top, and basic_Bounds< T_ >::TopLeft().
std::istream& Gorgon::Geometry::operator>> | ( | std::istream & | in, |
basic_Margin< T_ > & | Margin | ||
) |
Allows Margin to be read from a stream.
References basic_Margin< T_ >::Bottom, basic_Margin< T_ >::Left, basic_Margin< T_ >::Right, and basic_Margin< T_ >::Top.
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.
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.
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.
void Gorgon::Geometry::ReflectX | ( | basic_Point< T_ > & | point | ) |
Reflects the given point along the X axis.
References basic_Point< T_ >::Y.
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.
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.
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.
void Gorgon::Geometry::ReflectY | ( | basic_Point< T_ > & | point | ) |
Reflects the given point along the Y axis.
References basic_Point< T_ >::X.
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.
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.
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.
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.
bounds | object to be rotated |
angle | is 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.
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.
bounds | object to be rotated |
angle | is the Euler rotation angle in radians |
origin | of 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.
void Gorgon::Geometry::Rotate | ( | basic_Point< T_ > & | point, |
Float | angle | ||
) |
Rotates the given point by the given angle.
point | the point to rotate |
angle | is the Euler rotation angle in radians |
References basic_Point< T_ >::X, and basic_Point< T_ >::Y.
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.
point | the point to rotate |
angle | is the Euler rotation angle in radians |
origin | is the origin of rotation |
References basic_Point< T_ >::X, and basic_Point< T_ >::Y.
void Gorgon::Geometry::Rotate | ( | basic_PointProperty< C_, T_, Getter_, Setter_ > & | point, |
Float | angle | ||
) |
Rotates the given point by the given angle.
point | the point to rotate |
angle | is the Euler rotation angle in radians |
References Rotate().
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.
point | the point to rotate |
angle | is the Euler rotation angle in radians |
origin | is the origin of rotation |
References Rotate().
Performs a rounding operation over a floating point point.
References basic_Point< T_ >::X, and basic_Point< T_ >::Y.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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().
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().
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().
void Gorgon::Geometry::Scale | ( | basic_PointProperty< C_, T_, Getter_, Setter_ > & | point, |
const O_ & | size | ||
) |
Scales the given point by the given factor.
References Scale().
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().
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.
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.
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.
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().
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().
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().
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.
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.
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.
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.
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().
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.
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.
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.
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.
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.
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().
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.
References PointList< P_ >::Swap().
void Gorgon::Geometry::Translate | ( | basic_Bounds< T_ > & | bounds, |
const basic_Point< T_ > & | other | ||
) |
Translation moves the given bounds by the given amount.
References basic_Bounds< T_ >::Bottom, basic_Bounds< T_ >::Left, basic_Bounds< T_ >::Right, basic_Bounds< T_ >::Top, basic_Point< T_ >::X, and basic_Point< T_ >::Y.
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.
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.
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.
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().
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().
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.
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.
void Gorgon::Geometry::VerticalMirror | ( | basic_Point< T_ > & | point | ) |
Reflects the given point vertically.
References ReflectY().
void Gorgon::Geometry::VerticalMirror | ( | basic_Point< T_ > & | point | ) |
Reflects the given point vertically.
References ReflectY().
void Gorgon::Geometry::VerticalMirror | ( | basic_Point< T_ > & | point, |
const basic_Point< T_ > & | origin | ||
) |
Reflects the given point vertically considering given origin.
References ReflectY().
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().
Scripting::Library LibGeometry("Geometry", "Data types under geometry module and their member functions and operators") |