org.grinvin.gred.transformations

Class OrthogonalProjection

Implemented Interfaces:
Transformation

public class OrthogonalProjection
extends AbstractTransformation

Orthogonal projection from a three-dimensional space onto a 2-dimensional space.

Constructor Summary

OrthogonalProjection()
Create a projection along the Z-axis.

Method Summary

@Override
double[] transform(double[] src, double[] dest)
int
getDimension()
Return the dimension of the source space.
void
rotateX(double angle)
Perform a rotation around the X-axis over the given angle.
void
rotateXY(double angleX, double angleY)
Combines the effect of a rotation along the X-axis followed by a rotation along the Y-axis.
void
rotateY(double angle)
Perform a rotation around the Y-axis over the given angle.
void
rotateZ(double angle)
Perform a rotation around the Z-axis over the given angle.
void
zoom(double factor)
Zoom by the given factor in destination space.

Methods inherited from class org.grinvin.gred.transformations.AbstractTransformation

getDimension, inverseTransform, isInvertible, transform

Methods inherited from class org.grinvin.gred.transformations.TransformationSupport

addTransformationListener, fireTransformationChanged, removeTransformationListener

Constructor Details

OrthogonalProjection

public OrthogonalProjection()
Create a projection along the Z-axis.

Method Details

double[] transform

public @Override double[] transform(double[] src,
                                    double[] dest)

getDimension

public int getDimension()
Return the dimension of the source space.
Specified by:
getDimension in interface Transformation
Overrides:
getDimension in interface AbstractTransformation

rotateX

public void rotateX(double angle)
Perform a rotation around the X-axis over the given angle.

rotateXY

public void rotateXY(double angleX,
                     double angleY)
Combines the effect of a rotation along the X-axis followed by a rotation along the Y-axis.

rotateY

public void rotateY(double angle)
Perform a rotation around the Y-axis over the given angle.

rotateZ

public void rotateZ(double angle)
Perform a rotation around the Z-axis over the given angle.

zoom

public void zoom(double factor)
Zoom by the given factor in destination space.