Class Vector
java.lang.Object
com.lowagie.text.pdf.parser.Vector
Deprecated.
Represents a vector (i.e. a point in space). This class is completely unrelated to the
For many PDF related operations, the z coordinate is specified as 1 This is to support the coordinate transformation calculations. If it helps, just think of all PDF drawing operations as occurring in a single plane with z=1.
Vector
class in the standard JRE.
For many PDF related operations, the z coordinate is specified as 1 This is to support the coordinate transformation calculations. If it helps, just think of all PDF drawing operations as occurring in a single plane with z=1.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intDeprecated.index of the X coordinateprivate static final intDeprecated.index of the Y coordinateprivate static final intDeprecated.index of the Z coordinateprivate final float[]Deprecated.the values inside the vector -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Computes the sum of this vector and the specified vectorDeprecated.Computes the cross product of this vector and the specified matrixDeprecated.Computes the cross product of this vector and the specified vectorfloatDeprecated.Computes the dot product of this vector with the specified vectorfloatget(int index) Deprecated.Gets the value from a coordinate of the vectorfloatlength()Deprecated.Computes the length of this vector Note: If you are working with raw vectors from PDF, be careful - the Z axis will generally be set to 1.floatDeprecated.Computes the length squared of this vector.Deprecated.Computes the difference between this vector and the specified vectortoString()Deprecated.
-
Field Details
-
I1
private static final int I1Deprecated.index of the X coordinate- See Also:
-
I2
private static final int I2Deprecated.index of the Y coordinate- See Also:
-
I3
private static final int I3Deprecated.index of the Z coordinate- See Also:
-
values
private final float[] valuesDeprecated.the values inside the vector
-
-
Constructor Details
-
Vector
public Vector(float x, float y, float z) Deprecated.Creates a new Vector- Parameters:
x- the X coordinatey- the Y coordinatez- the Z coordinate
-
-
Method Details
-
get
public float get(int index) Deprecated.Gets the value from a coordinate of the vector- Parameters:
index- the index of the value to get (I1, I2 or I3)- Returns:
- value from a coordinate of the vector
-
cross
-
subtract
-
add
-
cross
-
dot
Deprecated.Computes the dot product of this vector with the specified vector- Parameters:
with- the vector to dot product this vector with- Returns:
- the dot product
-
length
public float length()Deprecated.Computes the length of this vector Note: If you are working with raw vectors from PDF, be careful - the Z axis will generally be set to 1. If you want to compute the length of a vector, subtract it from the origin first (this will set the Z axis to 0).For example:
aVector.subtract(originVector).length();- Returns:
- the length of this vector
-
lengthSquared
public float lengthSquared()Deprecated.Computes the length squared of this vector.The square of the length is less expensive to compute, and is often useful without taking the square root.
Note: See the important note underlength()- Returns:
- the square of the length of the vector
-
toString
-