public class FlatProjection extends AbstractProjection implements InverseProjection, Rotateable2D, Transformable2D, Resetable
| Modifier and Type | Field and Description |
|---|---|
static double |
defaultScaleFactor |
defaultProjectionsX, Y, ZU, 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)
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 |
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 |
setScale(double s)
Set scale to factor s.
|
void |
setScale(double sx,
double sy)
Set scales to factors sx,sy.
|
void |
setTranslate(double tx,
double ty)
Set translate to tx and ty.
|
void |
shear(double shx,
double shy)
Shear using shx and 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)
Translate over tx and ty.
|
getFeature, getID, getName, getViewPort, setViewPort, supports, transform, transformclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFeature, getName, getViewPort, setViewPort, supports, transform, transformgetIDpublic static final double defaultScaleFactor
public FlatProjection(double s)
public FlatProjection()
public String getFormula()
ProjectiongetFormula in interface ProjectiongetFormula in class AbstractProjectionpublic double[] transform(double[] xyz)
Projectiontransform in interface Projectiontransform in class AbstractProjectionpublic double[][] transform(double[][] xyz,
int n)
AbstractProjectiontransform in interface Projectiontransform in class AbstractProjectionpublic double[] deltaTransform(double[] xyz)
ProjectiondeltaTransform in interface ProjectiondeltaTransform in class AbstractProjectionpublic double[] inverseTransform(double[] uvw)
throws UnsupportedOperationException
InverseProjectioninverseTransform in interface InverseProjectionUnsupportedOperationExceptionpublic double[] inverseDeltaTransform(double[] uvw)
throws UnsupportedOperationException
InverseProjectioninverseDeltaTransform in interface InverseProjectionUnsupportedOperationExceptionpublic Projection copy()
Projectioncopy in interface Projectioncopy in class AbstractProjectionpublic String toString()
AbstractProjectiontoString in class AbstractProjectionpublic void rotate(double theta)
Rotateable2Drotate in interface Rotateable2Dpublic double[] getModelTranslation(double[] uvw,
ViewPort viewPort)
TranslateablegetModelTranslation in interface Translateablepublic double[] getScreenTranslation(double[] xyz,
ViewPort viewPort)
TranslateablegetScreenTranslation in interface Translateablepublic void scale(double s)
Scaleablepublic void setScale(double s)
Scaleablepublic void scale(double sx,
double sy)
Scaleable2Dscale in interface Scaleable2Dpublic void setScale(double sx,
double sy)
Scaleable2DsetScale in interface Scaleable2Dpublic double[] getScale()
Scaleable2DgetScale in interface Scaleable2Dpublic void shear(double shx,
double shy)
Shearable2Dshear in interface Shearable2Dpublic void translate(double tx,
double ty)
Translateable2Dtranslate in interface Translateable2Dpublic void setTranslate(double tx,
double ty)
Translateable2DsetTranslate in interface Translateable2Dpublic double[] getTranslate()
Translateable2DgetTranslate in interface Translateable2Dpublic Object reset(Object newState)
Resetablepublic void save(org.freehep.xml.io.XMLIOManager xmlioManager,
org.jdom.Element nodeEl)
save in interface org.freehep.xml.io.XMLIOsave in class AbstractProjectionpublic void restore(org.freehep.xml.io.XMLIOManager xmlioManager,
org.jdom.Element nodeEl)
restore in interface org.freehep.xml.io.XMLIOrestore in class AbstractProjectionCopyright © 1996-2014 FreeHEP. All Rights Reserved.