SetaPDF_Core_Geometry_Vector Class representing a vecotr.
File: /SetaPDF v2/Core/Geometry/Vector.php
Internally the matrix is represented as a 3x3 matrix.
Class hierarchy
Summary
Properties
$_x
protected float SetaPDF_Core_Geometry_Vector::$_x
The X value.
$_y
protected float SetaPDF_Core_Geometry_Vector::$_y
The Y value.
$_z
protected float SetaPDF_Core_Geometry_Vector::$_z
The Z value.
Static Methods
byPoint()
public static SetaPDF_Core_Geometry_Vector::byPoint (
SetaPDF_Core_Geometry_Point $point
): SetaPDF_Core_Geometry_VectorCreates an instance by a point.
Parameters
- $point : SetaPDF_Core_Geometry_Point
Methods
__construct()
public SetaPDF_Core_Geometry_Vector::__construct (
[ integer|float $x = 0.0 [, integer|float $y = 0.0 [, integer|float $z = 0.0 ]]]
)The constructor.
Parameters
- $x : integer|float
- $y : integer|float
- $z : integer|float
add()
public SetaPDF_Core_Geometry_Vector::add (
SetaPDF_Core_Geometry_Vector $vector
): SetaPDF_Core_Geometry_VectorAdd a vector to this vector and return the resulting vector.
Parameters
- $vector : SetaPDF_Core_Geometry_Vector
cross()
Compute the cross product of this and another vector and return the resulting vector.
Parameters
- $with : SetaPDF_Core_Geometry_Vector
divide()
Devide the vector by a float value and return the resulting vector.
Parameters
- $by : float|int
multiply()
public SetaPDF_Core_Geometry_Vector::multiply (
float|int|SetaPDF_Core_Geometry_Matrix $with
): SetaPDF_Core_Geometry_VectorMultiply the vector with a float value or a matrix and return the resulting vector.
Parameters
- $with : float|int|SetaPDF_Core_Geometry_Matrix
scalar()
Computes the scalar/dot/inner product of this and another vector.
Parameters
- $with : SetaPDF_Core_Geometry_Vector
subtract()
public SetaPDF_Core_Geometry_Vector::subtract (
SetaPDF_Core_Geometry_Vector $vector
): SetaPDF_Core_Geometry_VectorSubtract a vector from this vector and return the resulting vector.
Parameters
- $vector : SetaPDF_Core_Geometry_Vector