iText 8.0.5 API
|
Represents a vector (i.e. a point in space). More...
Public Member Functions |
|
Vector (float x, float y, float z) | |
Creates a new Vector More... |
|
virtual float | Get (int index) |
Gets the value from a coordinate of the vector More... |
|
virtual iText.Kernel.Geom.Vector | Cross (Matrix by) |
Computes the cross product of this vector and the specified matrix More... |
|
virtual iText.Kernel.Geom.Vector | Subtract (iText.Kernel.Geom.Vector v) |
Computes the difference between this vector and the specified vector More... |
|
virtual iText.Kernel.Geom.Vector | Cross (iText.Kernel.Geom.Vector with) |
Computes the cross product of this vector and the specified vector More... |
|
virtual iText.Kernel.Geom.Vector | Normalize () |
Normalizes the vector (i.e. returns the unit vector in the same orientation as this vector) More... |
|
virtual iText.Kernel.Geom.Vector | Multiply (float by) |
Multiplies the vector by a scalar More... |
|
virtual float | Dot (iText.Kernel.Geom.Vector with) |
Computes the dot product of this vector with the specified vector More... |
|
virtual float | Length () |
Computes the length of this vector More... |
|
virtual float | LengthSquared () |
Computes the length squared of this vector. More... |
|
override String | ToString () |
|
|
override int | GetHashCode () |
Calculates the hashcode using the values. More... |
|
override bool | Equals (Object obj) |
|
|
Static Public Attributes |
|
const int | I1 = 0 |
index of the X coordinate More... |
|
const int | I2 = 1 |
index of the Y coordinate More... |
|
const int | I3 = 2 |
index of the Z coordinate More... |
|
Represents a vector (i.e. a point in space).
Represents a vector (i.e. a point in space). This class is completely unrelated to the System.Collections.ArrayList
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.
|
inline |
Creates a new Vector
x | the X coordinate |
y | the Y coordinate |
z | the Z coordinate |
|
inlinevirtual |
Computes the cross product of this vector and the specified vector
with | the vector to cross this vector with |
|
inlinevirtual |
Computes the cross product of this vector and the specified matrix
by | the matrix to cross this vector with |
|
inlinevirtual |
Computes the dot product of this vector with the specified vector
with | the vector to dot product this vector with |
|
inlinevirtual |
Gets the value from a coordinate of the vector
index | the index of the value to get (I1, I2 or I3) |
|
inline |
Calculates the hashcode using the values.
|
inlinevirtual |
Computes the length of this vector
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();
|
inlinevirtual |
Computes the length squared of this vector.
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 under Length()
|
inlinevirtual |
Multiplies the vector by a scalar
by | the scalar to multiply by |
|
inlinevirtual |
Normalizes the vector (i.e. returns the unit vector in the same orientation as this vector)
|
inlinevirtual |
Computes the difference between this vector and the specified vector
v | the vector to subtract from this one |
|
static |
index of the X coordinate
|
static |
index of the Y coordinate
|
static |
index of the Z coordinate