Package | Description |
---|---|
org.eclipse.draw2d.geometry |
Types representing or manipulating geometric values, such as Points, Dimensions, etc.
|
Modifier and Type | Field and Description |
---|---|
Vector |
Straight.direction
direction vector of this straight
|
Vector |
Straight.position
position vector of this straight
|
Modifier and Type | Method and Description |
---|---|
Vector |
Vector.getAdded(Vector other)
Creates a new Vector which is the sum of this Vector with another.
|
Vector |
Vector.getAveraged(Vector other)
Creates a new Vector which represents the average of this Vector with
another.
|
Vector |
Vector.getDivided(double factor)
Creates a new Vector which represents this Vector divided by the provided
scalar factor.
|
Vector |
Straight.getIntersection(Straight other)
Computes the intersection point of this Straight and the provided one, if
it exists.
|
Vector |
Vector.getMultiplied(double factor)
Creates a new Vector which represents this Vector multiplied by the
provided scalar factor.
|
Vector |
Vector.getOrthogonalComplement()
Returns the orthogonal complement of this Vector, which is defined to be
(-y, x).
|
Vector |
Straight.getProjection(Vector vector)
Returns the projection of the given Vector onto this Straight, which is
the point on this Straight with the minimal distance to the point,
denoted by the provided Vector.
|
Vector |
Vector.getSubtracted(Vector other)
Creates a new Vector which is the difference of this Vector with the
provided Vector.
|
Modifier and Type | Method and Description |
---|---|
boolean |
Straight.contains(Vector vector)
Calculates whether the point indicated by the provided Vector is a point
on this Straight.
|
boolean |
Straight.containsWithinSegment(Vector segmentStart,
Vector segmentEnd,
Vector vector)
Calculates whether the point indicated by the provided Vector is a point
on the straight segment between the given start and end points.
|
Vector |
Vector.getAdded(Vector other)
Creates a new Vector which is the sum of this Vector with another.
|
double |
Vector.getAngle(Vector other)
Returns the angle (in degrees) between this Vector and the provided
Vector.
|
Vector |
Vector.getAveraged(Vector other)
Creates a new Vector which represents the average of this Vector with
another.
|
double |
Vector.getCrossProduct(Vector other)
Calculates the cross product of this Vector with another.
|
double |
Vector.getDissimilarity(Vector other)
Calculates the magnitude of the cross product of this Vector with
another.
|
double |
Straight.getDistance(Vector vector)
Returns the distance of the provided Vector to this Straight, which is
the distance between the provided Vector and its projection onto this
Straight.
|
double |
Vector.getDotProduct(Vector other)
Calculates the dot product of this Vector with another.
|
Vector |
Straight.getProjection(Vector vector)
Returns the projection of the given Vector onto this Straight, which is
the point on this Straight with the minimal distance to the point,
denoted by the provided Vector.
|
double |
Vector.getSimilarity(Vector other)
Calculates the similarity of this Vector with another.
|
Vector |
Vector.getSubtracted(Vector other)
Creates a new Vector which is the difference of this Vector with the
provided Vector.
|
boolean |
Straight.intersectsWithinSegment(Vector segmentStart,
Vector segmentEnd,
Straight other)
Checks whether this Straight and the provided one have an intersection
point, which is inside the specified segment between segmentStart and
segmentEnd.
|
boolean |
Vector.isOrthogonalTo(Vector other)
Calculates whether this Vector and the provided one are orthogonal to
each other.
|
boolean |
Vector.isParallelTo(Vector other)
Calculates whether this Vector and the provided one are parallel to each
other.
|
Constructor and Description |
---|
Straight(Vector position,
Vector direction)
Constructs a new Straight with the given position and direction.
|
Vector(Vector start,
Vector end)
Constructs a Vector representing the difference between two provided
Vectors.
|
Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.