|
JavaView® v2.12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--jv.object.PsObject
|
+--jv.project.PgGeometry
|
+--jv.project.PgJvxSrc
|
+--jv.thirdParty.ruler.PgRuler
A Ruler has an origin in 3-space, a direction in 3-space, and min and max exents along this so-defined line - thus we allow for the origin, direction, and extents of the ruler to be externally controlled. Based on this data, the ruler itself will configure its' appearance according to specifications given in its configuration panel.
PgRuler, Serialized Form| Field Summary | |
static int |
NORMAL_DIRECTION
|
static int |
TITLE_ALIGN_CENTER
|
static int |
TITLE_ALIGN_LEFT
|
static int |
TITLE_ALIGN_RIGHT
|
static int |
UP_VECTOR_DIRECTION
|
| Fields inherited from class jv.object.PsObject |
HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_MATERIAL_PANEL, HAS_TEXTURE_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_SELECTED, IS_USED, NUM_TAGS |
| Constructor Summary | |
PgRuler()
|
|
PgRuler(int dim)
|
|
PgRuler(PdVector rulerDir,
PdVector rulerNormal)
Create a new ruler with given direction and normal direction for hashings. |
|
| Method Summary | |
double |
getMajorUnit()
|
double |
getMaxParameter()
|
double |
getMinorUnit()
|
double |
getMinParameter()
|
int |
getNumMajorPartitions()
|
int |
getNumMinorPartitions()
|
void |
init()
Initializes and resets geometry. |
boolean |
isShowingFixedMode()
|
boolean |
isShowingHashingsInNormalDir()
|
boolean |
isShowingHashingsInUpDir()
|
boolean |
isShowingLabels()
|
boolean |
isShowingMajorHashings()
Determines whether the ruler should be partitioned as fixed or dynamic and then sets m_tiMajor accordingly. |
boolean |
isShowingMinorHashings()
|
boolean |
isShowingRulerName()
|
void |
setDefaultHashSizes(int orthogonalType)
|
void |
setDirection(PdVector dir)
Set direction of the baseline of the ruler. |
void |
setEndPoint(PdVector endPnt,
PdVector viewDir)
Measure, is a way of using the ruler as a Tape measure. |
void |
setFixedHashing(double major,
double minor)
|
void |
setHashLabel(int xoff,
int yoff,
int labelhSide,
int labelvSide)
Customizes the positioning of the label at hashings. |
void |
setHashOffsetInNormalDir(double xoff,
double yoff,
double zoff)
|
void |
setHashOffsetInUpDir(double xoff,
double yoff,
double zoff)
|
void |
setMajorColor(java.awt.Color C)
|
void |
setMajorHashSize(double pt1,
double pt2,
int orthoType)
Set the endpoints of the hashings along the up or normal vectors |
void |
setMinMax(double min,
double max)
|
void |
setMinorColor(java.awt.Color C)
|
void |
setMinorHashSize(double pt1,
double pt2,
int orthogonalType)
Set the endpoints of the hashings along the up or normal vectors |
void |
setNameAlignment(int align,
int labelhSide,
int xoff,
int yoff)
Customizes the positioning of the title of the ruler. |
void |
setNormal(PdVector N)
Set direction of the normal vector along which the hashings will be drawn - Normalization will be done within this method |
void |
setOrigin(PdVector orig)
Set the origin of the ruler to the specific point in space. |
void |
setPartitionedHashing(int major,
int minor)
|
void |
setRulerName(java.lang.String s)
|
void |
setRulerName(java.lang.String s,
boolean show)
see setRulerName(s,pos,show) |
void |
setRulerName(java.lang.String s,
int pos)
|
void |
setRulerName(java.lang.String s,
int pos,
boolean show)
|
void |
setUpVector(PdVector U)
Set direction of the up vector along which a secondary set of hashings will be drawn - Normalization will be done within this method |
void |
showFixedMode(boolean flag)
|
void |
showHashingsInNormalDir(boolean flag)
|
void |
showHashingsInUpDir(boolean flag)
|
void |
showLabels(boolean flag)
|
void |
showMajorHashings(boolean flag)
|
void |
showMinorHashings(boolean flag)
|
void |
showRulerName(boolean flag)
|
boolean |
update(java.lang.Object event)
Update method of geometry updates registered panels, update listeners, and invokes a repaint in the registered displays. |
| Methods inherited from class jv.object.PsObject |
addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, removeInspector, removeUpdateListener, setName, setParent, setTag, updatePanels |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface jv.project.PgGeometryIf |
assureInspector, getInfoPanel, getName, setName |
| Methods inherited from interface jv.object.PsUpdateIf |
getFather, setParent |
| Field Detail |
public static final int NORMAL_DIRECTION
public static final int UP_VECTOR_DIRECTION
public static final int TITLE_ALIGN_LEFT
public static final int TITLE_ALIGN_RIGHT
public static final int TITLE_ALIGN_CENTER
| Constructor Detail |
public PgRuler()
public PgRuler(int dim)
public PgRuler(PdVector rulerDir,
PdVector rulerNormal)
rulerDir - direction of baseline of rulerrulerMormal - vector orthogonal to direction of baseline| Method Detail |
public void init()
PgJvxSrcinit in class PgJvxSrcpublic boolean update(java.lang.Object event)
PgGeometryupdate in class PgGeometryjv.object.PsUpdateIfevent - carries a lot of informationPsObject,
PsUpdateIf.getFather(),
PsUpdateIf.setParent(PsUpdateIf)public boolean isShowingMajorHashings()
public boolean isShowingMinorHashings()
public boolean isShowingHashingsInNormalDir()
public boolean isShowingHashingsInUpDir()
public boolean isShowingLabels()
public boolean isShowingRulerName()
public boolean isShowingFixedMode()
public double getMaxParameter()
public double getMinParameter()
public int getNumMajorPartitions()
public int getNumMinorPartitions()
public double getMajorUnit()
public double getMinorUnit()
public void showRulerName(boolean flag)
public void showLabels(boolean flag)
public void showFixedMode(boolean flag)
public void showMajorHashings(boolean flag)
public void showMinorHashings(boolean flag)
public void showHashingsInNormalDir(boolean flag)
public void showHashingsInUpDir(boolean flag)
public void setEndPoint(PdVector endPnt,
PdVector viewDir)
public void setOrigin(PdVector orig)
orig - new origin of rulerpublic void setDirection(PdVector dir)
dir - direction vector of the baseline of the rulerpublic void setNormal(PdVector N)
N - a 3d vector (based at the origin) specifying the direction in which to draw the hashingspublic void setUpVector(PdVector U)
U - a 3d vector (based at the origin) specifying the direction in which to draw the hashings
public void setMajorHashSize(double pt1,
double pt2,
int orthoType)
orthoType - specify which of 2 perpendicular directions that hashing occurs.pt1 - a scalar multiple of the hash vector representing one endpoint of the hash linept2 - a scalar multiple of the hash vector representing the other endpoint of the hash linepublic void setDefaultHashSizes(int orthogonalType)
public void setMinorHashSize(double pt1,
double pt2,
int orthogonalType)
orthogonalType: - specify which of 2 perpendicular directions that hashing occurs.pt1 - a scalar multiple of the hash vector representing one endpoint of the hash linept2 - a scalar multiple of the hash vector representing the other endpoint of the hash line
public void setFixedHashing(double major,
double minor)
public void setPartitionedHashing(int major,
int minor)
public void setMinMax(double min,
double max)
public void setMajorColor(java.awt.Color C)
public void setMinorColor(java.awt.Color C)
public void setRulerName(java.lang.String s)
setRulerName(s,pos,show)
public void setRulerName(java.lang.String s,
int pos)
setRulerName(s,pos,show)
public void setRulerName(java.lang.String s,
boolean show)
public void setRulerName(java.lang.String s,
int pos,
boolean show)
s - the title to be shown for the rulerpos - the positioning of the label with respect to the ruler baseline :={TITLE_ALIGN_LEFT,TITLE_ALIGN_RIGHT,TITLE_ALIGN_CENTER}show - whether or not to show the ruler name/title
public void setHashLabel(int xoff,
int yoff,
int labelhSide,
int labelvSide)
xoff - how much to offset the label from the label origin in the x directionyoff - how much to offset the label from the label origin in the y directionlabelhSide - horizontal position at label to align with, {PgGeometryIf.LABEL_HEAD, PgGeometryIf.LABEL_CENTER, PgGeometryIf.LABEL_TAIL}labelvSide - vertical position at label to align with, {PgGeometryIf.LABEL_BASE, PgGeometryIf.LABEL_MIDDLE, PgGeometryIf.LABEL_TOP}
public void setNameAlignment(int align,
int labelhSide,
int xoff,
int yoff)
align - {ALIGNLEFT,TITLE_ALIGN_RIGHT,TITLE_ALIGN_CENTER} with base, center or tip of ruler's baseline.labelhSide - the side of the label to bound to given point, {PgGeometryIf.LABEL_HEAD, PgGeometryIf.LABEL_CENTER, PgGeometryIf.LABEL_TAIL}xoff - how much to offset the label from the label origin in the x direction.yoff - how much to offset the label from the label origin in the y direction.
public void setHashOffsetInNormalDir(double xoff,
double yoff,
double zoff)
public void setHashOffsetInUpDir(double xoff,
double yoff,
double zoff)
|
JavaView® v2.12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||