Gorgon Game Engine
basic_SizeProperty< C_, T_, Getter_, Setter_ > Class Template Reference

Property support for point class. More...

Inheritance diagram for basic_SizeProperty< C_, T_, Getter_, Setter_ >:
[legend]

Public Member Functions

 basic_SizeProperty (basic_SizeProperty &&)=default
 
 basic_SizeProperty (C_ &object)
 
 basic_SizeProperty (C_ *object)
 
Float Angle () const
 Calculates the angle of the line formed from the origin to this point. More...
 
Float Angle (const T_ &origin) const
 Calculates the angle of the line formed from the given point to this point. More...
 
bool Compare (const T_ &point) const
 Compares two points. More...
 
T_ CrossProduct (const T_ &value) const
 Calculates cross product of two points. More...
 
Float Distance () const
 Calculates Euclidean distance from this point to origin. More...
 
Float Distance (const T_ &target) const
 Calculates Euclidean distance from this point to the given target. More...
 
T_ DotProduct (const T_ &value) const
 Calculates dot product of two points. More...
 
Float EuclideanSquare () const
 Calculates EuclideanSquare distance from this point to the given target. More...
 
Float EuclideanSquare (const T_ &target) const
 Calculates EuclideanSquare distance from this point to the given target. More...
 
T_::BaseType GetHeight () const
 Returns Height component. More...
 
T_::BaseType GetWidth () const
 Returns Width component. More...
 
Float ManhattanDistance () const
 Calculates Manhattan distance from this point to origin. More...
 
Float ManhattanDistance (const T_ &target) const
 Calculates Manhattan distance from this point to the given target. More...
 
T_ Normalize () const
 Normalizes the point as a unit vector. More...
 
 operator const T_ () const
 
 operator T_ ()
 
bool operator!= (const T_ &point) const
 Compares two points. More...
 
T_ operator* (const T_ &value) const
 Multiplies two points. This is essentially a dot product. More...
 
template<class O_ >
T_ operator* (O_ value) const
 Multiply this point with a scalar value. More...
 
template<class O_ >
basic_SizePropertyoperator*= (O_ value)
 Scales this point. More...
 
T_ operator+ (const T_ &point) const
 Adds another point to this one and returns the result. More...
 
basic_SizePropertyoperator+= (const T_ &point)
 Adds another point from this point. More...
 
T_ operator- () const
 Negates this point. More...
 
T_ operator- (const T_ &point) const
 
basic_SizePropertyoperator-= (const T_ &point)
 Subtracts another point from this point. More...
 
template<class O_ >
T_ operator/ (O_ value) const
 Divides this point to a scalar value. More...
 
template<class O_ >
basic_SizePropertyoperator/= (O_ value)
 Scales this point. More...
 
basic_SizePropertyoperator= (basic_SizeProperty &&)=default
 
basic_SizePropertyoperator= (const T_ &value)
 
bool operator== (const T_ &point) const
 Compares two points. More...
 
T_ Perpendicular () const
 Calculates perpendicular vector to this point. More...
 
void SetHeight (const typename T_::BaseType &value)
 Sets Height component. More...
 
void SetWidth (const typename T_::BaseType &value)
 Sets Width component. More...
 
Float Slope () const
 Calculates the slope of the line formed from the origin to this point. More...
 
Float Slope (const T_ &point) const
 Calculates the slope of the line formed from the given point to this point. More...
 
- Public Member Functions inherited from Property< C_, T_, Getter_, Setter_ >
 Property (C_ &Object)
 
 Property (C_ *Object)
 
 Property (const Property &)=delete
 
 Property (Property &&)=default
 
T_ Get () const
 
 operator const T_ () const
 
 operator T_ ()
 
bool operator!= (const T_ &v) const
 
T_ operator* () const
 
template<class O_ >
Propertyoperator= (const O_ &value)
 
Propertyoperator= (const Property &)=delete
 
template<class AC_ , T_(AC_::*)() const G_, void(AC_::*)(const T_ &) S_>
Propertyoperator= (const Property< AC_, T_, G_, S_ > &prop)
 
Propertyoperator= (const T_ &value)
 
Propertyoperator= (Property &&)=default
 
bool operator== (const T_ &v) const
 
void Set (const T_ &value)
 

Public Attributes

NumericProperty< basic_SizeProperty, typename T_::BaseType, &basic_SizeProperty::GetHeight, &basic_SizeProperty::SetHeightHeight
 
NumericProperty< basic_SizeProperty, typename T_::BaseType, &basic_SizeProperty::GetWidth, &basic_SizeProperty::SetWidthWidth
 

Additional Inherited Members

- Public Types inherited from Property< C_, T_, Getter_, Setter_ >
using Type = T_
 
- Protected Attributes inherited from Property< C_, T_, Getter_, Setter_ >
C_ & Object
 

Detailed Description

template<class C_, class T_, T_(C_::*)() const Getter_, void(C_::*)(const T_ &) Setter_>
class Gorgon::Geometry::basic_SizeProperty< C_, T_, Getter_, Setter_ >

Property support for point class.

Constructor & Destructor Documentation

◆ basic_SizeProperty() [1/3]

basic_SizeProperty ( C_ *  object)

◆ basic_SizeProperty() [2/3]

basic_SizeProperty ( C_ &  object)

◆ basic_SizeProperty() [3/3]

basic_SizeProperty ( basic_SizeProperty< C_, T_, Getter_, Setter_ > &&  )
default

Member Function Documentation

◆ Angle() [1/2]

Float Angle ( ) const

Calculates the angle of the line formed from the origin to this point.

Returns
angle in radians

◆ Angle() [2/2]

Float Angle ( const T_ &  origin) const

Calculates the angle of the line formed from the given point to this point.

Parameters
originis the starting point of the line
Returns
angle in radians

◆ Compare()

bool Compare ( const T_ &  point) const

Compares two points.

◆ CrossProduct()

T_ CrossProduct ( const T_ &  value) const

Calculates cross product of two points.

◆ Distance() [1/2]

Float Distance ( ) const

Calculates Euclidean distance from this point to origin.

◆ Distance() [2/2]

Float Distance ( const T_ &  target) const

Calculates Euclidean distance from this point to the given target.

◆ DotProduct()

T_ DotProduct ( const T_ &  value) const

Calculates dot product of two points.

◆ EuclideanSquare() [1/2]

Float EuclideanSquare ( ) const

Calculates EuclideanSquare distance from this point to the given target.

◆ EuclideanSquare() [2/2]

Float EuclideanSquare ( const T_ &  target) const

Calculates EuclideanSquare distance from this point to the given target.

◆ GetHeight()

T_::BaseType GetHeight ( ) const

Returns Height component.

◆ GetWidth()

T_::BaseType GetWidth ( ) const

Returns Width component.

◆ ManhattanDistance() [1/2]

Float ManhattanDistance ( ) const

Calculates Manhattan distance from this point to origin.

◆ ManhattanDistance() [2/2]

Float ManhattanDistance ( const T_ &  target) const

Calculates Manhattan distance from this point to the given target.

◆ Normalize()

T_ Normalize ( ) const

Normalizes the point as a unit vector.

◆ operator const T_()

operator const T_ ( ) const

◆ operator T_()

operator T_ ( )

◆ operator!=()

bool operator!= ( const T_ &  point) const

Compares two points.

◆ operator*() [1/2]

T_ operator* ( const T_ &  value) const

Multiplies two points. This is essentially a dot product.

◆ operator*() [2/2]

T_ operator* ( O_  value) const

Multiply this point with a scalar value.

This is effectively scales the point

◆ operator*=()

basic_SizeProperty& operator*= ( O_  value)

Scales this point.

◆ operator+()

T_ operator+ ( const T_ &  point) const

Adds another point to this one and returns the result.

◆ operator+=()

basic_SizeProperty& operator+= ( const T_ &  point)

Adds another point from this point.

Result is assigned to this point

◆ operator-() [1/2]

T_ operator- ( ) const

Negates this point.

◆ operator-() [2/2]

T_ operator- ( const T_ &  point) const

◆ operator-=()

basic_SizeProperty& operator-= ( const T_ &  point)

Subtracts another point from this point.

Result is assigned to this point

◆ operator/()

T_ operator/ ( O_  value) const

Divides this point to a scalar value.

This is effectively scales the point

◆ operator/=()

basic_SizeProperty& operator/= ( O_  value)

Scales this point.

◆ operator=() [1/2]

basic_SizeProperty& operator= ( basic_SizeProperty< C_, T_, Getter_, Setter_ > &&  )
default

◆ operator=() [2/2]

basic_SizeProperty& operator= ( const T_ &  value)

◆ operator==()

bool operator== ( const T_ &  point) const

Compares two points.

◆ Perpendicular()

T_ Perpendicular ( ) const

Calculates perpendicular vector to this point.

◆ SetHeight()

void SetHeight ( const typename T_::BaseType &  value)

Sets Height component.

◆ SetWidth()

void SetWidth ( const typename T_::BaseType &  value)

Sets Width component.

◆ Slope() [1/2]

Float Slope ( ) const

Calculates the slope of the line formed from the origin to this point.

◆ Slope() [2/2]

Float Slope ( const T_ &  point) const

Calculates the slope of the line formed from the given point to this point.

Parameters
pointis the starting point of the line

Member Data Documentation

◆ Height

◆ Width


The documentation for this class was generated from the following file: