|
Drag[en]gine Script Module DragonScript 1.35
|
Immutable 2-component integer point. More...
Public Member Functions | |
Constructors | |
| Point | new () |
| Create point with all components set to 0. | |
| Point | new (int x, int y) |
| Create point with components. | |
| Point | new (Point point) |
| Create copy of a point. | |
Operators | |
| Point | operator- () |
| Point with each component negated. | |
| Point | operator+ (Point point) |
| Sum of two points. | |
| Point | operator- (Point point) |
| Difference between two points. | |
| Point | operator* (int scalar) |
| Point with each component scaled by a value. | |
| Point | operator/ (int scalar) |
| Point with each component divided by a value. | |
| int | operator* (Point point) |
| Dot product of two points. | |
| bool | operator< (Point point) |
| Check if each component of this point is smaller than another point. | |
| bool | operator<= (Point point) |
| Check if each component of this point is smaller than or equal to another point. | |
| bool | operator> (Point point) |
| Check if each component of this point is larger than another point. | |
| bool | operator>= (Point point) |
| Check if each component of this point is larger than or equal to another point. | |
Management | |
| int | getX () |
| X component. | |
| int | getY () |
| Y component. | |
| Point | smallest (Point p) |
| Point with smallest components of this point and another point. | |
| Point | smallest (int x, int y) |
| Point with smallest components of this point and another point. | |
| Point | largest (Point point) |
| Point with largest components of this point and another point. | |
| Point | largest (int x, int y) |
| Point with largest components of this point and another point. | |
| Point | absolute () |
| Point with absolute value of each component. | |
| bool | isEqualTo (Point point) |
| Points are equal. | |
| bool | isAtLeast (int value) |
| Both components are larger than or equal to a value. | |
| bool | isAtMost (int value) |
| Both components are smaller than or equal to a value. | |
| bool | isZero () |
| Point is equal to zero point. | |
| Point | compMultiply (Point point) |
| Multiply with point component wise. | |
| Point | compDivide (Point point) |
| Divide by point component wise. | |
| void | writeToFile (FileWriter writer) |
| Write point to a file writer. | |
| bool | equals (Object other) |
| Point is equal to another object. | |
| int | hashCode () |
| Hash code for use as dictionary keys. | |
| String | toString () |
| String representation of point. | |
| static Point | readFromFile (FileReader reader) |
| Read point from a file reader. | |
Immutable 2-component integer point.
This is a native class. It can not be subclassed.
| Point Dragengine.Gui.Point.absolute | ( | ) |
Divide by point component wise.
| EDivisionByZero | A component of point is 0. |
References isAtLeast().
Referenced by hashCode().
| bool Dragengine.Gui.Point.equals | ( | Object | other | ) |
Point is equal to another object.
Implements Object.equals(Object).
References compMultiply().
Referenced by operator*().
| int Dragengine.Gui.Point.getX | ( | ) |
X component.
Referenced by getY().
| int Dragengine.Gui.Point.getY | ( | ) |
| int Dragengine.Gui.Point.hashCode | ( | ) |
Hash code for use as dictionary keys.
Implements Object.hashCode().
References compDivide().
Referenced by operator*().
| bool Dragengine.Gui.Point.isAtLeast | ( | int | value | ) |
Both components are larger than or equal to a value.
References largest().
Referenced by compDivide().
| bool Dragengine.Gui.Point.isAtMost | ( | int | value | ) |
Both components are smaller than or equal to a value.
Referenced by writeToFile().
| bool Dragengine.Gui.Point.isEqualTo | ( | Point | point | ) |
| bool Dragengine.Gui.Point.isZero | ( | ) |
| Point Dragengine.Gui.Point.largest | ( | int | x, |
| int | y ) |
Point with largest components of this point and another point.
Point with largest components of this point and another point.
References smallest().
Referenced by isAtLeast(), and isEqualTo().
| Point Dragengine.Gui.Point.new | ( | ) |
| Point Dragengine.Gui.Point.operator* | ( | int | scalar | ) |
| int Dragengine.Gui.Point.operator* | ( | Point | point | ) |
Dot product of two points.
References hashCode().
| Point Dragengine.Gui.Point.operator- | ( | ) |
Point with each component negated.
References writeToFile().
| Point Dragengine.Gui.Point.operator/ | ( | int | scalar | ) |
Point with each component divided by a value.
| EDivisionByZero | scalar is 0. |
| bool Dragengine.Gui.Point.operator< | ( | Point | point | ) |
Check if each component of this point is smaller than another point.
| bool Dragengine.Gui.Point.operator<= | ( | Point | point | ) |
Check if each component of this point is smaller than or equal to another point.
| bool Dragengine.Gui.Point.operator> | ( | Point | point | ) |
Check if each component of this point is larger than another point.
References toString().
| bool Dragengine.Gui.Point.operator>= | ( | Point | point | ) |
Check if each component of this point is larger than or equal to another point.
|
static |
Read point from a file reader.
Referenced by toString().
| Point Dragengine.Gui.Point.smallest | ( | int | x, |
| int | y ) |
Point with smallest components of this point and another point.
Point with smallest components of this point and another point.
References getY().
Referenced by absolute(), and largest().
| String Dragengine.Gui.Point.toString | ( | ) |
String representation of point.
Implements Object.toString()
References readFromFile().
Referenced by operator>().
| void Dragengine.Gui.Point.writeToFile | ( | FileWriter | writer | ) |