![]() |
Gorgon Game Engine
|
Property support for point class. More...
Public Member Functions | |
basic_PointProperty (basic_PointProperty &&)=default | |
basic_PointProperty (C_ &object) | |
basic_PointProperty (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 | GetX () const |
Returns X component. More... | |
T_::BaseType | GetY () const |
Returns Y 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... | |
void | Move (const T_ &x, const T_ &y) |
Moves this point to the given coordinates. 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_PointProperty & | operator*= (O_ value) |
Scales this point. More... | |
T_ | operator+ (const T_ &point) const |
Adds another point to this one and returns the result. More... | |
basic_PointProperty & | operator+= (const T_ &point) |
Adds another point from this point. More... | |
T_ | operator- () const |
Negates this point. More... | |
T_ | operator- (const T_ &point) const |
basic_PointProperty & | operator-= (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_PointProperty & | operator/= (O_ value) |
Scales this point. More... | |
basic_PointProperty & | operator= (basic_PointProperty &&)=default |
basic_PointProperty & | operator= (const T_ &value) |
bool | operator== (const T_ &point) const |
Compares two points. More... | |
T_ | Perpendicular () const |
Calculates perpendicular vector to this point. More... | |
void | SetX (const typename T_::BaseType &value) |
Sets X component. More... | |
void | SetY (const typename T_::BaseType &value) |
Sets Y 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 Attributes | |
NumericProperty< basic_PointProperty, typename T_::BaseType, &basic_PointProperty::GetX, &basic_PointProperty::SetX > | X |
NumericProperty< basic_PointProperty, typename T_::BaseType, &basic_PointProperty::GetY, &basic_PointProperty::SetY > | Y |
Property support for point class.
basic_PointProperty | ( | C_ * | object | ) |
basic_PointProperty | ( | C_ & | object | ) |
|
default |
Float Angle | ( | ) | const |
Calculates the angle of the line formed from the origin to this point.
Float Angle | ( | const T_ & | origin | ) | const |
Calculates the angle of the line formed from the given point to this point.
origin | is the starting point of the line |
bool Compare | ( | const T_ & | point | ) | const |
Compares two points.
T_ CrossProduct | ( | const T_ & | value | ) | const |
Calculates cross product of two points.
Float Distance | ( | ) | const |
Calculates Euclidean distance from this point to origin.
Float Distance | ( | const T_ & | target | ) | const |
Calculates Euclidean distance from this point to the given target.
T_ DotProduct | ( | const T_ & | value | ) | const |
Calculates dot product of two points.
Float EuclideanSquare | ( | ) | const |
Calculates EuclideanSquare distance from this point to the given target.
Float EuclideanSquare | ( | const T_ & | target | ) | const |
Calculates EuclideanSquare distance from this point to the given target.
T_::BaseType GetX | ( | ) | const |
Returns X component.
T_::BaseType GetY | ( | ) | const |
Returns Y component.
Float ManhattanDistance | ( | ) | const |
Calculates Manhattan distance from this point to origin.
Float ManhattanDistance | ( | const T_ & | target | ) | const |
Calculates Manhattan distance from this point to the given target.
void Move | ( | const T_ & | x, |
const T_ & | y | ||
) |
Moves this point to the given coordinates.
T_ Normalize | ( | ) | const |
Normalizes the point as a unit vector.
operator const T_ | ( | ) | const |
References Property< C_, T_, Getter_, Setter_ >::Object.
operator T_ | ( | ) |
bool operator!= | ( | const T_ & | point | ) | const |
Compares two points.
T_ operator* | ( | const T_ & | value | ) | const |
Multiplies two points. This is essentially a dot product.
T_ operator* | ( | O_ | value | ) | const |
Multiply this point with a scalar value.
This is effectively scales the point
basic_PointProperty& operator*= | ( | O_ | value | ) |
Scales this point.
T_ operator+ | ( | const T_ & | point | ) | const |
Adds another point to this one and returns the result.
basic_PointProperty& operator+= | ( | const T_ & | point | ) |
Adds another point from this point.
Result is assigned to this point
T_ operator- | ( | ) | const |
Negates this point.
T_ operator- | ( | const T_ & | point | ) | const |
basic_PointProperty& operator-= | ( | const T_ & | point | ) |
Subtracts another point from this point.
Result is assigned to this point
T_ operator/ | ( | O_ | value | ) | const |
Divides this point to a scalar value.
This is effectively scales the point
basic_PointProperty& operator/= | ( | O_ | value | ) |
Scales this point.
|
default |
basic_PointProperty& operator= | ( | const T_ & | value | ) |
bool operator== | ( | const T_ & | point | ) | const |
Compares two points.
T_ Perpendicular | ( | ) | const |
Calculates perpendicular vector to this point.
void SetX | ( | const typename T_::BaseType & | value | ) |
Sets X component.
void SetY | ( | const typename T_::BaseType & | value | ) |
Sets Y component.
Float Slope | ( | ) | const |
Calculates the slope of the line formed from the origin to this point.
Float Slope | ( | const T_ & | point | ) | const |
Calculates the slope of the line formed from the given point to this point.
point | is the starting point of the line |
NumericProperty<basic_PointProperty, typename T_::BaseType, &basic_PointProperty::GetX, &basic_PointProperty::SetX> X |
NumericProperty<basic_PointProperty, typename T_::BaseType, &basic_PointProperty::GetY, &basic_PointProperty::SetY> Y |