Package | Description |
---|---|
pythagoras.f |
The Pythagoras geometry utility classes specialized on
float . |
Modifier and Type | Field and Description |
---|---|
Vector |
Ray2.direction
The ray's unit direction vector.
|
Vector |
Ray2.origin
The ray's point of origin.
|
Modifier and Type | Method and Description |
---|---|
Vector |
IVector.add(float x,
float y)
Adds a vector to this one.
|
Vector |
AbstractVector.add(float x,
float y) |
Vector |
IVector.add(float x,
float y,
Vector result)
Adds a vector to this one and stores the result in the object provided.
|
Vector |
AbstractVector.add(float x,
float y,
Vector result) |
Vector |
IVector.add(IVector other)
Adds a vector to this one.
|
Vector |
AbstractVector.add(IVector other) |
Vector |
IVector.add(IVector other,
Vector result)
Adds a vector to this one, storing the result in the object provided.
|
Vector |
AbstractVector.add(IVector other,
Vector result) |
Vector |
Vector.addLocal(float x,
float y)
Adds a vector in-place to this one.
|
Vector |
Vector.addLocal(IVector other)
Adds a vector in-place to this one.
|
Vector |
IVector.addScaled(IVector other,
float v)
Adds a scaled vector to this one.
|
Vector |
AbstractVector.addScaled(IVector other,
float v) |
Vector |
IVector.addScaled(IVector other,
float v,
Vector result)
Adds a scaled vector to this one and stores the result in the supplied vector.
|
Vector |
AbstractVector.addScaled(IVector other,
float v,
Vector result) |
Vector |
Vector.addScaledLocal(IVector other,
float v)
Adds a scaled vector in-place to this one.
|
Vector |
IVector.clone()
Returns a mutable copy of this vector.
|
Vector |
AbstractVector.clone() |
Vector |
IVector.cross(IVector other)
Computes the cross product of this and the specified other vector.
|
Vector |
AbstractVector.cross(IVector other) |
Vector |
IVector.cross(IVector other,
Vector result)
Computes the cross product of this and the specified other vector, placing the result in
the object supplied.
|
Vector |
AbstractVector.cross(IVector other,
Vector result) |
Vector |
Vector.crossLocal(IVector other)
Computes the cross product of this and the specified other vector, storing the result in
this vector.
|
Vector |
Matrix3.extractScale() |
Vector |
Matrix3.extractScale(Vector result) |
static Vector |
Vectors.from(XY from,
XY to)
Creates a vector from
from to to . |
static Vector |
Vectors.fromPolar(float magnitude,
float angle)
Creates a new vector from polar coordinates.
|
Vector |
Ray2.getNearestPoint(IVector point,
Vector result) |
Vector |
IRay2.getNearestPoint(IVector point,
Vector result)
Computes the nearest point on the Ray to the supplied point.
|
static Vector |
Vectors.inverseTransform(float x,
float y,
float sx,
float sy,
float rotation,
Vector result)
Inverse transforms a vector as specified, storing the result in the vector provided.
|
Vector |
Transform.inverseTransform(IVector v,
Vector into)
Inverse transforms the supplied vector, writing the result into
into . |
Vector |
IdentityTransform.inverseTransform(IVector v,
Vector into) |
Vector |
AffineTransform.inverseTransform(IVector v,
Vector into) |
Vector |
IVector.lerp(IVector other,
float t)
Linearly interpolates between this and the specified other vector by the supplied amount.
|
Vector |
AbstractVector.lerp(IVector other,
float t) |
Vector |
IVector.lerp(IVector other,
float t,
Vector result)
Linearly interpolates between this and the supplied other vector by the supplied amount,
storing the result in the supplied object.
|
Vector |
AbstractVector.lerp(IVector other,
float t,
Vector result) |
Vector |
Vector.lerpLocal(IVector other,
float t)
Linearly interpolates between this and
other in-place by the supplied amount. |
Vector |
IVector.negate()
Negates this vector.
|
Vector |
AbstractVector.negate() |
Vector |
IVector.negate(Vector result)
Negates this vector, storing the result in the supplied object.
|
Vector |
AbstractVector.negate(Vector result) |
Vector |
Vector.negateLocal()
Negates this vector in-place.
|
Vector |
IVector.normalize()
Normalizes this vector.
|
Vector |
AbstractVector.normalize() |
Vector |
IVector.normalize(Vector result)
Normalizes this vector, storing the result in the object supplied.
|
Vector |
AbstractVector.normalize(Vector result) |
Vector |
Vector.normalizeLocal()
Normalizes this vector in-place.
|
Vector |
IVector.rotate(float angle)
Rotates this vector by the specified angle.
|
Vector |
AbstractVector.rotate(float angle) |
Vector |
IVector.rotate(float angle,
Vector result)
Rotates this vector by the specified angle, storing the result in the vector provided.
|
Vector |
AbstractVector.rotate(float angle,
Vector result) |
Vector |
IVector.rotateAndAdd(float angle,
IVector add,
Vector result)
Rotates this vector by the specified angle and adds another vector to it, placing the
result in the object provided.
|
Vector |
AbstractVector.rotateAndAdd(float angle,
IVector add,
Vector result) |
Vector |
Vector.rotateLocal(float angle)
Rotates this vector in-place by the specified angle.
|
Vector |
IVector.rotateScaleAndAdd(float angle,
float scale,
IVector add,
Vector result)
Rotates this vector by the specified angle, applies a uniform scale, and adds another
vector to it, placing the result in the object provided.
|
Vector |
AbstractVector.rotateScaleAndAdd(float angle,
float scale,
IVector add,
Vector result) |
Vector |
Transform.scale()
Returns the scale vector for this transform.
|
Vector |
AbstractTransform.scale() |
Vector |
IVector.scale(float v)
Scales this vector uniformly by the specified magnitude.
|
Vector |
AbstractVector.scale(float v) |
Vector |
IVector.scale(float v,
Vector result)
Scales this vector uniformly by the specified magnitude, and places the result in the
supplied object.
|
Vector |
AbstractVector.scale(float v,
Vector result) |
Vector |
IVector.scale(IVector other)
Scales this vector's x and y components independently by the x and y components of the
supplied vector.
|
Vector |
AbstractVector.scale(IVector other) |
Vector |
IVector.scale(IVector other,
Vector result)
Scales this vector's x and y components independently by the x and y components of the
supplied vector, and stores the result in the object provided.
|
Vector |
AbstractVector.scale(IVector other,
Vector result) |
Vector |
Vector.scaleLocal(float v)
Scales this vector in place, uniformly by the specified magnitude.
|
Vector |
Vector.scaleLocal(IVector other)
Scales this vector's x and y components, in place, independently by the x and y components
of the supplied vector.
|
Vector |
Vector.set(float[] values)
Copies the elements of an array.
|
Vector |
Vector.set(float x,
float y)
Sets all of the elements of the vector.
|
Vector |
Vector.set(XY other)
Copies the elements of another vector.
|
Vector |
Vector.setAngle(float angle)
Sets this vector's angle, preserving its magnitude.
|
Vector |
Vector.setLength(float length)
Sets this vector's magnitude, preserving its angle.
|
Vector |
IVector.subtract(float x,
float y)
Subtracts a vector from this one.
|
Vector |
AbstractVector.subtract(float x,
float y) |
Vector |
IVector.subtract(float x,
float y,
Vector result)
Subtracts a vector from this one and places the result in the supplied object.
|
Vector |
AbstractVector.subtract(float x,
float y,
Vector result) |
Vector |
IVector.subtract(IVector other)
Subtracts a vector from this one.
|
Vector |
AbstractVector.subtract(IVector other) |
Vector |
IVector.subtract(IVector other,
Vector result)
Subtracts a vector from this one and places the result in the supplied object.
|
Vector |
AbstractVector.subtract(IVector other,
Vector result) |
Vector |
Vector.subtractLocal(float x,
float y)
Subtracts a vector in-place from this one.
|
Vector |
Vector.subtractLocal(IVector other)
Subtracts a vector in-place from this one.
|
static Vector |
Vectors.transform(float x,
float y,
float sx,
float sy,
float sina,
float cosa,
float tx,
float ty,
Vector result)
Transforms a vector as specified (as a point, accounting for translation), storing the
result in the vector provided.
|
static Vector |
Vectors.transform(float x,
float y,
float sx,
float sy,
float rotation,
float tx,
float ty,
Vector result)
Transforms a vector as specified (as a point, accounting for translation), storing the
result in the vector provided.
|
static Vector |
Vectors.transform(float x,
float y,
float sx,
float sy,
float sina,
float cosa,
Vector result)
Transforms a vector as specified, storing the result in the vector provided.
|
static Vector |
Vectors.transform(float x,
float y,
float sx,
float sy,
float rotation,
Vector result)
Transforms a vector as specified, storing the result in the vector provided.
|
Vector |
Transform.transform(IVector v,
Vector into)
Transforms the supplied vector, writing the result into
into . |
Vector |
IdentityTransform.transform(IVector v,
Vector into) |
Vector |
AffineTransform.transform(IVector v,
Vector into) |
Vector |
Matrix3.transformPoint(IVector point) |
Vector |
Transform.transformPoint(IVector v,
Vector into)
Transforms the supplied vector as a point (accounting for translation), writing the result
into
into . |
Vector |
Matrix3.transformPoint(IVector point,
Vector result) |
Vector |
IdentityTransform.transformPoint(IVector v,
Vector into) |
Vector |
AffineTransform.transformPoint(IVector v,
Vector into) |
Vector |
Matrix3.transformPointLocal(Vector point) |
Vector |
Matrix3.transformVector(IVector vector) |
Vector |
Matrix3.transformVector(IVector vector,
Vector result) |
Vector |
Matrix3.transformVectorLocal(Vector vector) |
Vector |
Transform.translation()
Returns the translation vector for this transform.
|
Vector |
AbstractTransform.translation() |
Modifier and Type | Method and Description |
---|---|
Vector |
IVector.add(float x,
float y,
Vector result)
Adds a vector to this one and stores the result in the object provided.
|
Vector |
AbstractVector.add(float x,
float y,
Vector result) |
Vector |
IVector.add(IVector other,
Vector result)
Adds a vector to this one, storing the result in the object provided.
|
Vector |
AbstractVector.add(IVector other,
Vector result) |
Vector |
IVector.addScaled(IVector other,
float v,
Vector result)
Adds a scaled vector to this one and stores the result in the supplied vector.
|
Vector |
AbstractVector.addScaled(IVector other,
float v,
Vector result) |
Vector |
IVector.cross(IVector other,
Vector result)
Computes the cross product of this and the specified other vector, placing the result in
the object supplied.
|
Vector |
AbstractVector.cross(IVector other,
Vector result) |
Vector |
Matrix3.extractScale(Vector result) |
boolean |
Ray2.getIntersection(IVector center,
float radius,
Vector result) |
boolean |
IRay2.getIntersection(IVector center,
float radius,
Vector result)
Finds the intersection between the ray and a circle with the given center and radius.
|
boolean |
Ray2.getIntersection(IVector start,
IVector end,
float radius,
Vector result) |
boolean |
IRay2.getIntersection(IVector start,
IVector end,
float radius,
Vector result)
Finds the intersection between the ray and a capsule with the given start point, end point,
and radius.
|
boolean |
Ray2.getIntersection(IVector start,
IVector end,
Vector result) |
boolean |
IRay2.getIntersection(IVector start,
IVector end,
Vector result)
Finds the intersection between the ray and a line segment with the given start and end
points.
|
Vector |
Ray2.getNearestPoint(IVector point,
Vector result) |
Vector |
IRay2.getNearestPoint(IVector point,
Vector result)
Computes the nearest point on the Ray to the supplied point.
|
static Vector |
Vectors.inverseTransform(float x,
float y,
float sx,
float sy,
float rotation,
Vector result)
Inverse transforms a vector as specified, storing the result in the vector provided.
|
Vector |
Transform.inverseTransform(IVector v,
Vector into)
Inverse transforms the supplied vector, writing the result into
into . |
Vector |
IdentityTransform.inverseTransform(IVector v,
Vector into) |
Vector |
AffineTransform.inverseTransform(IVector v,
Vector into) |
Vector |
IVector.lerp(IVector other,
float t,
Vector result)
Linearly interpolates between this and the supplied other vector by the supplied amount,
storing the result in the supplied object.
|
Vector |
AbstractVector.lerp(IVector other,
float t,
Vector result) |
Vector |
IVector.negate(Vector result)
Negates this vector, storing the result in the supplied object.
|
Vector |
AbstractVector.negate(Vector result) |
Vector |
IVector.normalize(Vector result)
Normalizes this vector, storing the result in the object supplied.
|
Vector |
AbstractVector.normalize(Vector result) |
Vector |
IVector.rotate(float angle,
Vector result)
Rotates this vector by the specified angle, storing the result in the vector provided.
|
Vector |
AbstractVector.rotate(float angle,
Vector result) |
Vector |
IVector.rotateAndAdd(float angle,
IVector add,
Vector result)
Rotates this vector by the specified angle and adds another vector to it, placing the
result in the object provided.
|
Vector |
AbstractVector.rotateAndAdd(float angle,
IVector add,
Vector result) |
Vector |
IVector.rotateScaleAndAdd(float angle,
float scale,
IVector add,
Vector result)
Rotates this vector by the specified angle, applies a uniform scale, and adds another
vector to it, placing the result in the object provided.
|
Vector |
AbstractVector.rotateScaleAndAdd(float angle,
float scale,
IVector add,
Vector result) |
Vector |
IVector.scale(float v,
Vector result)
Scales this vector uniformly by the specified magnitude, and places the result in the
supplied object.
|
Vector |
AbstractVector.scale(float v,
Vector result) |
Vector |
IVector.scale(IVector other,
Vector result)
Scales this vector's x and y components independently by the x and y components of the
supplied vector, and stores the result in the object provided.
|
Vector |
AbstractVector.scale(IVector other,
Vector result) |
Vector |
IVector.subtract(float x,
float y,
Vector result)
Subtracts a vector from this one and places the result in the supplied object.
|
Vector |
AbstractVector.subtract(float x,
float y,
Vector result) |
Vector |
IVector.subtract(IVector other,
Vector result)
Subtracts a vector from this one and places the result in the supplied object.
|
Vector |
AbstractVector.subtract(IVector other,
Vector result) |
static Vector |
Vectors.transform(float x,
float y,
float sx,
float sy,
float sina,
float cosa,
float tx,
float ty,
Vector result)
Transforms a vector as specified (as a point, accounting for translation), storing the
result in the vector provided.
|
static Vector |
Vectors.transform(float x,
float y,
float sx,
float sy,
float rotation,
float tx,
float ty,
Vector result)
Transforms a vector as specified (as a point, accounting for translation), storing the
result in the vector provided.
|
static Vector |
Vectors.transform(float x,
float y,
float sx,
float sy,
float sina,
float cosa,
Vector result)
Transforms a vector as specified, storing the result in the vector provided.
|
static Vector |
Vectors.transform(float x,
float y,
float sx,
float sy,
float rotation,
Vector result)
Transforms a vector as specified, storing the result in the vector provided.
|
Vector |
Transform.transform(IVector v,
Vector into)
Transforms the supplied vector, writing the result into
into . |
Vector |
IdentityTransform.transform(IVector v,
Vector into) |
Vector |
AffineTransform.transform(IVector v,
Vector into) |
Vector |
Transform.transformPoint(IVector v,
Vector into)
Transforms the supplied vector as a point (accounting for translation), writing the result
into
into . |
Vector |
Matrix3.transformPoint(IVector point,
Vector result) |
Vector |
IdentityTransform.transformPoint(IVector v,
Vector into) |
Vector |
AffineTransform.transformPoint(IVector v,
Vector into) |
Vector |
Matrix3.transformPointLocal(Vector point) |
Vector |
Matrix3.transformVector(IVector vector,
Vector result) |
Vector |
Matrix3.transformVectorLocal(Vector vector) |
Constructor and Description |
---|
Ray2(Vector origin,
Vector direction)
Creates a ray with the values contained in the supplied origin point and unit direction
vector.
|
Copyright © 2017. All rights reserved.