Package org.eclipse.birt.chart.computation

# Class Vector

java.lang.Object
org.eclipse.birt.chart.computation.Vector

public class Vector extends Object
A Vector class used to perform 3D computation.

## Constructor Summary

Constructors
Constructor
Description
`Vector()`
The default constructor.
`Vector(double x, double y, double z)`
`Vector(double x, double y, double z, boolean isPoint)`
`Vector(Vector v)`
`Vector(Location3D loc)`
`Vector(Location3D start, Location3D end)`

## Method Summary

Modifier and Type
Method
Description
`void`
`add(Vector v)`
`double`
`cosineValue(Vector v)`
`Vector`
`crossProduct(Vector v)`
`boolean`
`equals(Object other)`
`double`
`get(int i)`
`Vector`
`getAdd(Vector v)`
`Vector`
`getMultiply(org.eclipse.birt.chart.internal.computations.Matrix m)`
`double`
`getNorm()`
`Vector`
`getNormalized()`
`Vector`
`getSub(Vector v)`
`int`
`hashCode()`
`void`
`inverse()`
Returns the inverse direction of this vector.
`boolean`
`isPoint()`
`void`
`multiply(org.eclipse.birt.chart.internal.computations.Matrix m)`
`void`
`normalize()`
`void`
`perspective(double distance)`
`void`
`project(int dist)`
`void`
`rotate(Angle3D angle)`
`double`
`scalarProduct(Vector v)`
`void`
`scale(double f)`
`void`
`set(double x, double y, double z)`
`void`
`set(double x, double y, double z, boolean isPoint)`
`void`
`sub(Vector v)`
`String`
`toString()`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Constructor Details

### Vector

public Vector()
The default constructor. This makes an origin point.

### Vector

public Vector(Location3D start, Location3D end)

Parameters:
  `start` -
  `end` -

### Vector

public Vector(Vector v)

Parameters:
  `v` -

### Vector

public Vector(Location3D loc)

Parameters:
  `loc` -

### Vector

public Vector(double x, double y, double z)

Parameters:
  `x` -
  `y` -
  `z` -

### Vector

public Vector(double x, double y, double z, boolean isPoint)

Parameters:
  `x` -
  `y` -
  `z` -
  `isPoint` -

## Method Details

### set

public void set(double x, double y, double z, boolean isPoint)

Parameters:
  `x` -
  `y` -
  `z` -
  `isPoint` -

### set

public void set(double x, double y, double z)

Parameters:
  `x` -
  `y` -
  `z` -

### get

public double get(int i)

Parameters:
  `i` -
Returns:

### add

public void add(Vector v)

Parameters:
  `v` -

### getAdd

public Vector getAdd(Vector v)

### sub

public void sub(Vector v)

Parameters:
  `v` -

### getSub

public Vector getSub(Vector v)

### scale

public void scale(double f)

Parameters:
  `f` -

### perspective

public void perspective(double distance)

Parameters:
  `distance` -

### isPoint

public boolean isPoint()

Returns:

### crossProduct

public Vector crossProduct(Vector v)

Parameters:
  `v` -
Returns:

### scalarProduct

public double scalarProduct(Vector v)

Parameters:
  `v` -
Returns:

### cosineValue

public double cosineValue(Vector v)

Parameters:
  `v` -
Returns:

### rotate

public void rotate(Angle3D angle)

Parameters:
  `angle` -

### project

public void project(int dist)

Parameters:
  `dist` -

### inverse

public void inverse()
Returns the inverse direction of this vector.

### multiply

public void multiply(org.eclipse.birt.chart.internal.computations.Matrix m)

Parameters:
  `m` -

### getMultiply

public Vector getMultiply(org.eclipse.birt.chart.internal.computations.Matrix m)

Parameters:
  `m` -
Returns:

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### getNorm

public double getNorm()

### getNormalized

public Vector getNormalized()

### normalize

public void normalize()

### equals

public boolean equals(Object other)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`