public class FlatProjection extends AbstractProjection implements InverseProjection, Rotateable2D, Transformable2D, Resetable
Modifier and Type | Field and Description |
---|---|
static double |
defaultScaleFactor |
defaultProjections
X, Y, Z
U, V, W
Constructor and Description |
---|
FlatProjection()
Creates a 2D projection.
|
FlatProjection(double s)
Creates a 2D projection with given scale factor.
|
Modifier and Type | Method and Description |
---|---|
Projection |
copy()
Returns a deep copy of the projection.
|
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) |
double[] |
getScale() |
double[] |
getScreenTranslation(double[] xyz,
ViewPort viewPort) |
double[] |
getTranslate() |
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) |
void |
restore(org.freehep.xml.io.XMLIOManager xmlioManager,
org.jdom.Element nodeEl) |
void |
rotate(double theta) |
void |
save(org.freehep.xml.io.XMLIOManager xmlioManager,
org.jdom.Element nodeEl) |
void |
scale(double s) |
void |
scale(double sx,
double sy) |
void |
setScale(double s) |
void |
setScale(double sx,
double sy) |
void |
setTranslate(double tx,
double ty) |
void |
shear(double shx,
double shy) |
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) |
getFeature, getID, getName, getViewPort, setViewPort, supports, transform, transform
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getFeature, getName, getViewPort, setViewPort, supports, transform, transform
getID
public static final double defaultScaleFactor
public FlatProjection(double s)
public FlatProjection()
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 Projection copy()
Projection
copy
in interface Projection
copy
in class AbstractProjection
public String toString()
AbstractProjection
toString
in class AbstractProjection
public void rotate(double theta)
rotate
in interface Rotateable2D
public double[] getModelTranslation(double[] uvw, ViewPort viewPort)
getModelTranslation
in interface Translateable
public double[] getScreenTranslation(double[] xyz, ViewPort viewPort)
getScreenTranslation
in interface Translateable
public void scale(double sx, double sy)
scale
in interface Scaleable2D
public void setScale(double sx, double sy)
setScale
in interface Scaleable2D
public double[] getScale()
getScale
in interface Scaleable2D
public void shear(double shx, double shy)
shear
in interface Shearable2D
public void translate(double tx, double ty)
translate
in interface Translateable2D
public void setTranslate(double tx, double ty)
setTranslate
in interface Translateable2D
public double[] getTranslate()
getTranslate
in interface Translateable2D
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.