public abstract class ParallelProjection extends AbstractProjection implements InverseProjection, Rotateable2D, Transformable2D, Rotateable3D, Transformable3D, Resetable
Modifier and Type | Class and Description |
---|---|
static class |
ParallelProjection.XY |
static class |
ParallelProjection.XZ |
static class |
ParallelProjection.YZ |
static class |
ParallelProjection.ZX |
static class |
ParallelProjection.ZY |
Modifier and Type | Field and Description |
---|---|
protected Matrix3D |
matrix |
protected Matrix3D |
resetMatrix |
defaultProjections
X, Y, Z
U, V, W
Modifier | Constructor and Description |
---|---|
protected |
ParallelProjection()
Creates a 3D parallel projection.
|
protected |
ParallelProjection(Matrix3D matrix) |
protected |
ParallelProjection(Matrix3D matrix,
Matrix3D resetMatrix)
Used for cloning
|
Modifier and Type | Method and Description |
---|---|
double[] |
deltaTransform(double[] xyz)
Returns an array of length 3: uvw = delta projection(xyz).
|
String |
getFormula()
Returns the formula in text readable form
|
double[] |
getModelTranslation(double[] uvw,
ViewPort viewPort)
Returns Model translation from screen translation.
|
double[] |
getScale()
Returns current scale
|
double[] |
getScreenTranslation(double[] xyz,
ViewPort viewPort)
Returns Screen translation from model translation.
|
double[] |
getTranslate()
Return current translation
|
double[] |
inverseDeltaTransform(double[] uvw)
Returns an array of length 3: xyz = inverse delta projection(uvw).
|
double[] |
inverseTransform(double[] uvw)
Returns an array of length 3: xyz = inverse projection(uvw).
|
Object |
reset(Object newState)
Resets graphics panel to a new state or its initial state.
|
void |
restore(org.freehep.xml.io.XMLIOManager xmlioManager,
org.jdom.Element nodeEl) |
void |
rotate(double theta)
Rotates viewpoint in Z-plane over theta radians.
|
void |
rotate(double theta,
double nx,
double ny,
double nz)
Rotate theta radians over unit vector (nx,ny,nz).
|
void |
save(org.freehep.xml.io.XMLIOManager xmlioManager,
org.jdom.Element nodeEl) |
void |
scale(double s)
Scales by factor s.
|
void |
scale(double sx,
double sy)
Scales by factor sx,sy.
|
void |
scale(double sx,
double sy,
double sz)
Scales by factor sx, sy, sz.
|
void |
setScale(double s)
Set scale to factor s.
|
void |
setScale(double sx,
double sy)
Set scales to factors sx,sy.
|
void |
setScale(double sx,
double sy,
double sz)
Set scales to factors sx, sy, sz.
|
void |
setTranslate(double tx,
double ty)
Set translate to tx and ty.
|
void |
setTranslate(double tx,
double ty,
double tz)
Set translate to tx, ty and tz.
|
void |
shear(double shx,
double shy)
Shears the viewpoint.
|
String |
toString()
Returns name of projection
|
double[] |
transform(double[] xyz)
Returns an array of length 3: uvw = projection(xyz).
|
double[][] |
transform(double[][] xyz,
int n)
Implements this method in terms of double[] transform(double[] xyz).
|
void |
translate(double tx,
double ty)
Translate over tx and ty.
|
void |
translate(double tx,
double ty,
double tz)
Translate over tx, ty and tz.
|
copy, getFeature, getID, getName, getViewPort, setViewPort, supports, transform, transform
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
copy, getFeature, getName, getViewPort, setViewPort, supports, transform, transform
getID
protected ParallelProjection()
protected ParallelProjection(Matrix3D matrix)
public String getFormula()
Projection
getFormula
in interface Projection
getFormula
in class AbstractProjection
public double[] transform(double[] xyz)
Projection
transform
in interface Projection
transform
in class AbstractProjection
public double[][] transform(double[][] xyz, int n)
AbstractProjection
transform
in interface Projection
transform
in class AbstractProjection
public double[] deltaTransform(double[] xyz)
Projection
deltaTransform
in interface Projection
deltaTransform
in class AbstractProjection
public double[] inverseTransform(double[] uvw) throws UnsupportedOperationException
InverseProjection
inverseTransform
in interface InverseProjection
UnsupportedOperationException
public double[] inverseDeltaTransform(double[] uvw) throws UnsupportedOperationException
InverseProjection
inverseDeltaTransform
in interface InverseProjection
UnsupportedOperationException
public String toString()
AbstractProjection
toString
in class AbstractProjection
public void rotate(double theta, double nx, double ny, double nz)
Rotateable3D
rotate
in interface Rotateable3D
public void rotate(double theta)
Rotateable2D
rotate
in interface Rotateable2D
public double[] getModelTranslation(double[] uvw, ViewPort viewPort)
Translateable
getModelTranslation
in interface Translateable
public double[] getScreenTranslation(double[] xyz, ViewPort viewPort)
Translateable
getScreenTranslation
in interface Translateable
public void scale(double s)
Scaleable
public void setScale(double s)
Scaleable
public void scale(double sx, double sy, double sz)
Scaleable3D
scale
in interface Scaleable3D
public void setScale(double sx, double sy, double sz)
Scaleable3D
setScale
in interface Scaleable3D
public double[] getScale()
Scaleable2D
getScale
in interface Scaleable2D
getScale
in interface Scaleable3D
public void translate(double tx, double ty, double tz)
Translateable3D
translate
in interface Translateable3D
public void setTranslate(double tx, double ty, double tz)
Translateable3D
setTranslate
in interface Translateable3D
public double[] getTranslate()
Translateable2D
getTranslate
in interface Translateable2D
getTranslate
in interface Translateable3D
public void scale(double sx, double sy)
Scaleable2D
scale
in interface Scaleable2D
public void setScale(double sx, double sy)
Scaleable2D
setScale
in interface Scaleable2D
public void shear(double shx, double shy)
[ 1 shx 0 0 ] [ shy 1 0 0 ] [ 0 0 1 0 ] [ 0 0 0 1 ]
shear
in interface Shearable2D
public void translate(double tx, double ty)
Translateable2D
translate
in interface Translateable2D
public void setTranslate(double tx, double ty)
Translateable2D
setTranslate
in interface Translateable2D
public Object reset(Object newState)
Resetable
public void save(org.freehep.xml.io.XMLIOManager xmlioManager, org.jdom.Element nodeEl)
save
in interface org.freehep.xml.io.XMLIO
save
in class AbstractProjection
public void restore(org.freehep.xml.io.XMLIOManager xmlioManager, org.jdom.Element nodeEl)
restore
in interface org.freehep.xml.io.XMLIO
restore
in class AbstractProjection
Copyright © 1996-2014 FreeHEP. All Rights Reserved.