|
JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java (public API).
|
2D Vector based upon two integer components. More...
Public Member Functions | |
| Vec2i () | |
| Vec2i (final Vec2i o) | |
| Vec2i | copy () |
| Vec2i (final int[] xy) | |
| Vec2i (final int x, final int y) | |
| void | set (final Vec2i o) |
| this = o, returns this. More... | |
| void | set (final int x, final int y) |
| this = { x, y }, returns this. More... | |
| Vec2i | set (final int[] xy) |
| this = xy, returns this. More... | |
| Vec2i | toArray (final int[] xy) |
| xy[0..1] = this. More... | |
| int[] | get (final int[] xy) |
| xy = this, returns xy. More... | |
| int | x () |
| int | y () |
| void | setX (final int x) |
| void | setY (final int y) |
| boolean | isZero () |
| Return true if all components are zero. More... | |
| int | length () |
| Return the length of this vector, a.k.a the norm or magnitude More... | |
| int | lengthSq () |
| Return the squared length of this vector, a.k.a the squared norm or squared magnitude More... | |
| int | distSq (final Vec2i o) |
| Return the squared distance between this vector and the given one. More... | |
| int | dist (final Vec2i o) |
| Return the distance between this vector and the given one. More... | |
| boolean | isEqual (final Vec2i o) |
| Equals check. More... | |
| boolean | equals (final Object o) |
| String | toString () |
2D Vector based upon two integer components.
Definition at line 34 of file Vec2i.java.
| com.jogamp.math.Vec2i.Vec2i | ( | ) |
| com.jogamp.math.Vec2i.Vec2i | ( | final Vec2i | o | ) |
Definition at line 40 of file Vec2i.java.
| com.jogamp.math.Vec2i.Vec2i | ( | final int[] | xy | ) |
Definition at line 48 of file Vec2i.java.
| com.jogamp.math.Vec2i.Vec2i | ( | final int | x, |
| final int | y | ||
| ) |
Definition at line 52 of file Vec2i.java.
| Vec2i com.jogamp.math.Vec2i.copy | ( | ) |
| int com.jogamp.math.Vec2i.dist | ( | final Vec2i | o | ) |
Return the distance between this vector and the given one.
Definition at line 130 of file Vec2i.java.
| int com.jogamp.math.Vec2i.distSq | ( | final Vec2i | o | ) |
Return the squared distance between this vector and the given one.
When comparing the relative distance between two points it is usually sufficient to compare the squared distances, thus avoiding an expensive square root operation.
Definition at line 121 of file Vec2i.java.
| boolean com.jogamp.math.Vec2i.equals | ( | final Object | o | ) |
| int[] com.jogamp.math.Vec2i.get | ( | final int[] | xy | ) |
xy = this, returns xy.
Definition at line 83 of file Vec2i.java.
| boolean com.jogamp.math.Vec2i.isEqual | ( | final Vec2i | o | ) |
Equals check.
| o | comparison value |
Definition at line 139 of file Vec2i.java.
| boolean com.jogamp.math.Vec2i.isZero | ( | ) |
Return true if all components are zero.
Definition at line 96 of file Vec2i.java.
| int com.jogamp.math.Vec2i.length | ( | ) |
Return the length of this vector, a.k.a the norm or magnitude
Definition at line 103 of file Vec2i.java.
| int com.jogamp.math.Vec2i.lengthSq | ( | ) |
Return the squared length of this vector, a.k.a the squared norm or squared magnitude
Definition at line 110 of file Vec2i.java.
| void com.jogamp.math.Vec2i.set | ( | final int | x, |
| final int | y | ||
| ) |
this = { x, y }, returns this.
Definition at line 63 of file Vec2i.java.
| Vec2i com.jogamp.math.Vec2i.set | ( | final int[] | xy | ) |
this = xy, returns this.
Definition at line 69 of file Vec2i.java.
| void com.jogamp.math.Vec2i.set | ( | final Vec2i | o | ) |
this = o, returns this.
Definition at line 57 of file Vec2i.java.
| void com.jogamp.math.Vec2i.setX | ( | final int | x | ) |
| void com.jogamp.math.Vec2i.setY | ( | final int | y | ) |
| Vec2i com.jogamp.math.Vec2i.toArray | ( | final int[] | xy | ) |
| String com.jogamp.math.Vec2i.toString | ( | ) |
Definition at line 157 of file Vec2i.java.
| int com.jogamp.math.Vec2i.x | ( | ) |
Definition at line 89 of file Vec2i.java.
| int com.jogamp.math.Vec2i.y | ( | ) |
Definition at line 90 of file Vec2i.java.