JavaView® v2.00.008

jv.thirdParty.ruler
Class PgRuler

java.lang.Object
  |
  +--jv.object.PsObject
        |
        +--jv.project.PgGeometry
              |
              +--jv.geom.PgPointSet
                    |
                    +--jv.geom.PgPolygonSet
                          |
                          +--jv.thirdParty.ruler.PgRuler
All Implemented Interfaces:
java.lang.Cloneable, PgGeometryIf, PsUpdateIf, java.io.Serializable

public class PgRuler
extends PgPolygonSet

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.

Version:
27.09.00, 1.01 revised (spd) measure was added to make the ruler act as a measuring tape. Set the origin for the anchor point with setInitPoint then pass this the endpoint.
07.07.00, 1.00 created (spd)
Author:
Steve Dugaro
See Also:
PgRuler, Serialized Form

Field Summary
static int ALIGNCENTER
           
static int ALIGNLEFT
           
static int ALIGNRIGHT
           
protected  boolean m_bFixedMode
          state of ruler ruler style
protected  boolean m_bHashInNormalDir
          Flag for showing hashings in direction of normal vector
protected  boolean m_bHashInUpDir
          Flag for showing hashings in direction of up vector
protected  boolean m_bMajorMode
          Flag for showing major hashings
protected  boolean m_bMinorMode
          Flag for showing minor hashings
protected  boolean m_bShowLabels
          Flag for showing the labels on each hash
protected  boolean m_bShowRulerName
          Flag for showing the title of the ruler
protected  double[] m_hMajor
           
protected  java.awt.Color m_hMajorColor
           
protected  double[] m_hMinor
           
protected  java.awt.Color m_hMinorColor
           
protected  PuDouble m_majorHashUnits
          Major Units
protected  PdVector m_minMax
          0 holds min param unit, 1 holds max hash unit
protected  PuDouble m_minorHashUnits
          Minor Units
protected  PdVector m_n
          Normal hash vector direction
protected  PdVector m_normalOffset
          Up hash vector origin
protected  PuInteger m_numMajorHashings
          Number of Major grid lines in interval.
protected  PuInteger m_numMinorHashings
          Number of Minor grid lines in interval.
protected  PdVector m_origin
          Intial endpoint of the ruler (A)
protected  java.lang.String m_rulerName
          Title of axis
protected  int m_rulerNamePos
          Align title 0=left, 1=center, 2= right
protected  double[] m_tiMajor
          An array of t parameters representing the hashings on the line
protected  double[] m_tiMinor
           
protected  PdVector m_u
          Up hash vector direction
protected  PdVector m_upOffset
          Normal hash vector origin for normal Vector direction
protected  PdVector m_v
          ruler direction
static int NORMAL_DIRECTION
           
static int UP_VECTOR_DIRECTION
           
 
Fields inherited from class jv.geom.PgPolygonSet
m_bShowEdgeLabels, m_bShowPolygonColors, m_bShowPolygonEndArrow, m_bShowPolygonLabels, m_bShowPolygonNormalArrow, m_bShowPolygonNormals, m_bShowPolygons, m_bShowPolygonStartArrow, m_bShowTaggedPolygons, m_dimOfPolygons, m_globalPolygonColor, m_globalPolygonNormalColor, m_globalPolygonNormalLength, m_globalPolygonNormalSize, m_globalPolygonSize, m_globalPolygonTagColor, m_maxNumPolygons, m_numPolygons, m_polygon, m_polygonColor, m_polygonNormal, m_useGlobalPolygonSize
 
Fields inherited from class jv.geom.PgPointSet
m_bDefaultLabelEnabled, m_bShowIndices, m_bShowTaggedVertices, m_bShowTransparency, m_bShowVectorArrow, m_bShowVectorColors, m_bShowVectorFields, m_bShowVertexColors, m_bShowVertexLabels, m_bShowVertexNormalArrow, m_bShowVertexNormals, m_bShowVertexTexture, m_bShowVertices, m_dimOfColors, m_dimOfTextures, m_dimOfVectors, m_globalVectorColor, m_globalVectorLength, m_globalVectorSize, m_globalVertexColor, m_globalVertexNormalColor, m_globalVertexNormalLength, m_globalVertexNormalSize, m_globalVertexSize, m_globalVertexTagColor, m_maxNumVertices, m_numVectorFields, m_numVertices, m_texture, m_transparency, m_vectorField, m_vertex, m_vertexColor, m_vertexNormal, m_vertexTexture
 
Fields inherited from class jv.project.PgGeometry
m_ambientProj, m_ambientSpace, m_authorInfo, m_bShowBndBox, m_bShowCenter, m_bShowing, m_bShowTitle, m_center, m_dim, m_dimOfSimplex, m_displayList, m_geometryInfo, m_labelAttribute, m_methodMenu, m_modelMatrix, m_title, m_version, m_versionType
 
Fields inherited from class jv.object.PsObject
HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_MATERIAL_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_SELECTED, IS_USED, m_infoPanel, m_name, m_panelList, m_parent, m_tag, m_updateList, NUM_TAGS
 
Fields inherited from interface jv.project.PgGeometryIf
AMBIENT_H3_HYPERBOLIC, AMBIENT_PROJECTIONS, AMBIENT_R3_EUCLIDEAN, AMBIENT_R4_EUCLIDEAN, AMBIENT_S3_SPHERE, AMBIENT_SPACES, INSPECTOR_CONTROL, INSPECTOR_CONTROL_EXT, INSPECTOR_MATERIAL, INSPECTOR_MATERIAL_EXT, LABEL_BASE, LABEL_CENTER, LABEL_HEAD, LABEL_MIDDLE, LABEL_TAIL, LABEL_TOP, METHOD_EXT, PROJ_KLEIN_BALL, PROJ_PARALLEL, PROJ_POINCARE_BALL, PROJ_STEREOGRAPHIC, PROJ_UPPER_HALFSPACE
 
Constructor Summary
PgRuler()
           
PgRuler(PdVector rulerDir, PdVector rulerNormal)
           
PgRuler(PdVector rulerDir, PdVector rulerNormal, double tmin, double tmax)
           
PgRuler(PdVector rulerOrigin, PdVector rulerDir, PdVector rulerNormal)
           
PgRuler(PdVector rulerOrigin, PdVector rulerDir, PdVector rulerNormal, double tmin, double tmax)
           
 
Method Summary
protected  int computeBaseLine()
          Determines whether the ruler should be partitioned as fixed or dynamic & then sets m_tiMajor accordingly.
protected  void computeDynamicHashings(int orthogonalType)
           
protected  void computeFixedHashings(int orthogonalType)
           
protected  void computeHashings()
           
protected  void computeUpVector()
           
protected  void constructHashSet(PgPolygonSet P, PdVector p0, PdVector v, PdVector vperp, double[] T, double[] h, boolean isMajor)
           
 void flipNormal()
           
 void flipUpVector()
           
 double getMajorUnit()
           
 PdVector getMaxCoordinate()
           
 double getMaxParameter()
           
 PdVector getMinCoordinate()
           
 double getMinorUnit()
           
 double getMinParameter()
           
 PdVector getNormal()
           
 int getNumMajorPartitions()
           
 int getNumMinorPartitions()
           
 PdVector getUpVector()
           
protected  double[] HashInterval(double incr, double tmin, boolean closedAtMin, double tmax, boolean closedAtMax)
          Given an interval on the Real Line @return all of the hashings of that interval in an array That is, every multiple of incr between min and max
 void init()
          Initialize and reset instance variables after call to super.init().
 boolean isShowingFixedMode()
           
 boolean isShowingHashingsInNormalDir()
           
 boolean isShowingHashingsInUpDir()
           
 boolean isShowingLabels()
           
 boolean isShowingMajorHashings()
           
 boolean isShowingMinorHashings()
           
 boolean isShowingRulerName()
           
 void measure(PdVector P)
          Measure, is a way of using the ruler as a Tape measure.
 void measure(PdVector P, PdVector N)
           
 void moveRulerOrigin(PdVector d)
          move the origin of the ruler to the specific point in space given by d call update externally!
protected  double[] PartitionInterval(int numPartitions, double tmin, boolean closedAtMin, double tmax, boolean closedAtMax)
          Subdivide the interval
 void setDefaultHashSizes(int orthogonalType)
           
 void setDefDynamicHashing()
           
 void setDefFixedHashing()
           
 void setDirection(PdVector InitPt, PdVector FinalPt)
          give the direction of baseline of the ruler Normalization will be done within this method
 void setDynamicHashing(int major, int minor)
           
 void setFixedHashing(double major, double minor)
           
 void setHashLabel(int p1, int p2, int alignment)
           
 void setHashOffsetInNormalDir(double xoff, double yoff, double zoff)
           
 void setHashOffsetInUpDir(double xoff, double yoff, double zoff)
           
 void setInitPoint(PdVector P)
          set the origin of the ruler
 void setMajorColor(java.awt.Color C)
           
 void setMajorHashSize(double pt1, double pt2, int orthogonalType)
          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 labelside, int xoff, int yoff)
          This method customizes the positioning of the label after affixed to the side of the ruler via setRulerName(pos)
 void setNameAlignment(int align, int labelside, int xoff, int yoff)
          This method customizes the positioning of the label and allows you to specify where to affix the label origin to on the ruler
 void setNormal(PdVector N)
          give the direction of the normal vector along which the hashings will be drawn - Normalization will be done within this method
 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)
          give the 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 the class whenever a child has changed.
 
Methods inherited from class jv.geom.PgPolygonSet
addPolygon, assureDimOfPolygons, assurePolygonColors, assurePolygonNormals, blend, clearTagPolygon, clone, copy, copyPolygonSet, getDimOfPolygons, getGlobalPolygonColor, getGlobalPolygonNormalColor, getGlobalPolygonNormalLength, getGlobalPolygonNormalSize, getGlobalPolygonSize, getGlobalPolygonTagColor, getJvx, getLength, getLengthOfPolygon, getMaxNumPolygons, getNumEdges, getNumPolygons, getPolygon, getPolygonColor, getPolygonColors, getPolygonNormal, getPolygonNormals, getPolygons, getPolygonVertices, getPolygonWithVertex, getVertexAngle, hasPolygonColors, hasPolygonNormals, hasTagPolygon, intersectionWithLine, isClosed, isShowingEdgeLabels, isShowingPolygonColors, isShowingPolygonEndArrow, isShowingPolygonLabels, isShowingPolygonNormalArrow, isShowingPolygonNormals, isShowingPolygons, isShowingPolygonStartArrow, makeNormals, makePolygonColorsFromXYZ, makePolygonColorsFromZ, makePolygonColorsFromZHue, merge, paint, removeMarkedPolygons, removeMarkedVertices, removePolygon, removeUnusedVertices, setClosed, setDimOfColors, setDimOfPolygons, setDimOfVectors, setGlobalPolygonColor, setGlobalPolygonNormalColor, setGlobalPolygonNormalLength, setGlobalPolygonNormalSize, setGlobalPolygonSize, setGlobalPolygonTagColor, setJvx, setMaxNumPolygons, setNumPolygons, setPolygon, setPolygonColor, setPolygonColors, setPolygonNormal, setPolygonNormals, setPolygons, setPolygonVertices, setSizeOfPolygon, setTagPolygon, showEdgeLabels, showPolygonColors, showPolygonEndArrow, showPolygonLabels, showPolygonNormalArrow, showPolygonNormals, showPolygons, showPolygonStartArrow, toString, useGlobalPolygonColor, useGlobalPolygonSize
 
Methods inherited from class jv.geom.PgPointSet
addVectorField, addVertex, assureVertexColors, assureVertexNormals, assureVertexTextures, clearTagVertex, computeCylinder, computeDisk, computePlane, computeRotation, computeSnail, computeSphere, computeTorus, flipOrientation, getBounds, getCenterOfBndBox, getCenterOfGravity, getDimOfColors, getDimOfTextures, getDimOfVectors, getGlobalVectorColor, getGlobalVectorLength, getGlobalVectorSize, getGlobalVertexColor, getGlobalVertexNormalColor, getGlobalVertexNormalLength, getGlobalVertexNormalSize, getGlobalVertexSize, getGlobalVertexTagColor, getIndexOfVectorField, getMaxNumVertices, getNumVectorFields, getNumVertices, getTexture, getTextureImage, getTextureImageName, getVectorField, getVectorField, getVectorField, getVertex, getVertexColor, getVertexColors, getVertexNormal, getVertexNormals, getVertexTextures, getVertices, hasTagVertex, hasVertex, hasVertex, hasVertexColors, hasVertexNormals, hasVertexTextures, isDefaultLabelEnabled, isShowingIndices, isShowingTaggedVertices, isShowingVectorArrow, isShowingVectorColors, isShowingVectorField, isShowingVertexColors, isShowingVertexLabels, isShowingVertexNormalArrow, isShowingVertexNormals, isShowingVertexTexture, isShowingVertices, makeColorFromVectorLength, makeVertexColorsFromXYZ, makeVertexColorsFromZ, makeVertexColorsFromZHue, makeVertexNormals, makeVertexTextureFromBndBox, projectToSphere, reflect, removeAllVectorFields, removeVectorField, removeVertex, scale, scale, setCenterOfBndBox, setDefaultLabelEnabled, setDimOfTextures, setGlobalVectorColor, setGlobalVectorLength, setGlobalVectorSize, setGlobalVertexColor, setGlobalVertexNormalColor, setGlobalVertexNormalLength, setGlobalVertexNormalSize, setGlobalVertexSize, setGlobalVertexTagColor, setMaxNumVertices, setNumVertices, setTagVertex, setTexture, setTextureImage, setTextureImageName, setTransparency, setVertex, setVertex, setVertex, setVertex, setVertexColor, setVertexColors, setVertexNormal, setVertexNormals, setVertexTextures, setVertices, showIndices, showTaggedVertices, showVectorArrow, showVectorColors, showVectorField, showVertexColors, showVertexLabels, showVertexNormalArrow, showVertexNormals, showVertexTexture, showVertices, translate
 
Methods inherited from class jv.project.PgGeometry
addDisplay, addElement, clearTagElement, fillMethodMenu, getAmbientProjection, getAmbientSpace, getAuthorInfo, getAuthors, getCenter, getCenterOfElement, getControlPanel, getDiameter, getDimOfSimplex, getDimOfVertices, getDisplays, getElement, getGeometryInfo, getLabelAttribute, getMaterialPanel, getModelMatrix, getTitle, getVersion, getVersionType, hasDisplay, hasModelMatrix, hasTagElement, isConfigurable, isShowingBndBox, isShowingCenter, isShowingTitle, isVisible, removeDisplay, removeElement, setAmbientProjection, setAmbientSpace, setAuthorInfo, setAuthors, setCenter, setDimOfSimplex, setElement, setGeometryInfo, setLabelAttribute, setLabelAttribute, setModelMatrix, setTagElement, setTitle, setVersion, setVersionType, setVisible, showBndBox, showCenter, showTitle
 
Methods inherited from class jv.object.PsObject
addInspector, addUpdateListener, 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jv.project.PgGeometryIf
getInfoPanel, getName, setName
 
Methods inherited from interface jv.object.PsUpdateIf
getFather, setParent
 

Field Detail

NORMAL_DIRECTION

public static final int NORMAL_DIRECTION

UP_VECTOR_DIRECTION

public static final int UP_VECTOR_DIRECTION

ALIGNLEFT

public static final int ALIGNLEFT

ALIGNRIGHT

public static final int ALIGNRIGHT

ALIGNCENTER

public static final int ALIGNCENTER

m_bFixedMode

protected boolean m_bFixedMode
state of ruler ruler style

m_bMajorMode

protected boolean m_bMajorMode
Flag for showing major hashings

m_bMinorMode

protected boolean m_bMinorMode
Flag for showing minor hashings

m_bHashInNormalDir

protected boolean m_bHashInNormalDir
Flag for showing hashings in direction of normal vector

m_bHashInUpDir

protected boolean m_bHashInUpDir
Flag for showing hashings in direction of up vector

m_bShowLabels

protected boolean m_bShowLabels
Flag for showing the labels on each hash

m_bShowRulerName

protected boolean m_bShowRulerName
Flag for showing the title of the ruler

m_rulerName

protected java.lang.String m_rulerName
Title of axis

m_rulerNamePos

protected int m_rulerNamePos
Align title 0=left, 1=center, 2= right

m_minMax

protected PdVector m_minMax
0 holds min param unit, 1 holds max hash unit

m_tiMajor

protected double[] m_tiMajor
An array of t parameters representing the hashings on the line

m_tiMinor

protected double[] m_tiMinor

m_origin

protected PdVector m_origin
Intial endpoint of the ruler (A)

m_normalOffset

protected PdVector m_normalOffset
Up hash vector origin

m_upOffset

protected PdVector m_upOffset
Normal hash vector origin for normal Vector direction

m_v

protected PdVector m_v
ruler direction

m_n

protected PdVector m_n
Normal hash vector direction

m_u

protected PdVector m_u
Up hash vector direction

m_hMinor

protected double[] m_hMinor

m_hMajor

protected double[] m_hMajor

m_hMajorColor

protected java.awt.Color m_hMajorColor

m_hMinorColor

protected java.awt.Color m_hMinorColor

m_numMajorHashings

protected PuInteger m_numMajorHashings
Number of Major grid lines in interval.

m_numMinorHashings

protected PuInteger m_numMinorHashings
Number of Minor grid lines in interval.

m_majorHashUnits

protected PuDouble m_majorHashUnits
Major Units

m_minorHashUnits

protected PuDouble m_minorHashUnits
Minor Units
Constructor Detail

PgRuler

public PgRuler()

PgRuler

public PgRuler(PdVector rulerDir,
               PdVector rulerNormal)

PgRuler

public PgRuler(PdVector rulerDir,
               PdVector rulerNormal,
               double tmin,
               double tmax)

PgRuler

public PgRuler(PdVector rulerOrigin,
               PdVector rulerDir,
               PdVector rulerNormal)

PgRuler

public PgRuler(PdVector rulerOrigin,
               PdVector rulerDir,
               PdVector rulerNormal,
               double tmin,
               double tmax)
Method Detail

init

public void init()
Description copied from class: PgPolygonSet
Initialize and reset instance variables after call to super.init().
Overrides:
init in class PgPolygonSet

update

public boolean update(java.lang.Object event)
Description copied from class: PgPolygonSet
Update the class whenever a child has changed. Method is usually invoked from the children.
Overrides:
update in class PgPolygonSet
Following copied from interface: jv.object.PsUpdateIf
Parameters:
event - carries a lot of information
Returns:
true if event has been handled, otherwise false
See Also:
PsObject, PsUpdateIf.getFather(), PsUpdateIf.setParent(PsUpdateIf)

computeHashings

protected void computeHashings()

computeBaseLine

protected int computeBaseLine()
Determines whether the ruler should be partitioned as fixed or dynamic & then sets m_tiMajor accordingly. Also if the ruler does not have a positive length FAIL is returned meaning m_tiMajor has not been changed thus the hashing computations can be avoided alltogher

computeFixedHashings

protected void computeFixedHashings(int orthogonalType)

computeDynamicHashings

protected void computeDynamicHashings(int orthogonalType)

constructHashSet

protected void constructHashSet(PgPolygonSet P,
                                PdVector p0,
                                PdVector v,
                                PdVector vperp,
                                double[] T,
                                double[] h,
                                boolean isMajor)
Parameters:
P - is the input Polygonset to which to add the hash lines to --passed by refrence it is filled P may be empty or partially filled, this method just appends polys to the existing polyset.
P0 - is the base point of the hash vector direction
v - is a unit vector in the direction of the this rulers base line
vperp - is a unit vector perpendicular to the direction of this ruler's base line
T - is the array of parameters that pick out points on our line (through 0)
h - is an array of size 2 holding the initial and final points of the hash offset from the line
isMajor - true: label & tag; true: dont label & dont tag

HashInterval

protected double[] HashInterval(double incr,
                                double tmin,
                                boolean closedAtMin,
                                double tmax,
                                boolean closedAtMax)
Given an interval on the Real Line @return all of the hashings of that interval in an array That is, every multiple of incr between min and max
Parameters:
incr: - the absolute increment
tmin: - the min of interval
closedAtMin: - specify whether the interval is closed at min (includes min)
tmax: - the max of interval
closedAtMax: - specify whether the interval is closed at max (includes max)

PartitionInterval

protected double[] PartitionInterval(int numPartitions,
                                     double tmin,
                                     boolean closedAtMin,
                                     double tmax,
                                     boolean closedAtMax)
Subdivide the interval
Parameters:
numpartitions: - number of hashes dividing up [min,max]
tmin: - the min of interval
closedAtMin: - specify whether the interval is closed at min
tmax: - the max of interval
closedAtMax: - specify whether the interval is closed at max

computeUpVector

protected void computeUpVector()

isShowingMajorHashings

public boolean isShowingMajorHashings()

isShowingMinorHashings

public boolean isShowingMinorHashings()

isShowingHashingsInNormalDir

public boolean isShowingHashingsInNormalDir()

isShowingHashingsInUpDir

public boolean isShowingHashingsInUpDir()

isShowingLabels

public boolean isShowingLabels()

isShowingRulerName

public boolean isShowingRulerName()

isShowingFixedMode

public boolean isShowingFixedMode()

getMaxCoordinate

public PdVector getMaxCoordinate()

getMinCoordinate

public PdVector getMinCoordinate()

getNormal

public PdVector getNormal()

getUpVector

public PdVector getUpVector()

getMaxParameter

public double getMaxParameter()

getMinParameter

public double getMinParameter()

getNumMajorPartitions

public int getNumMajorPartitions()

getNumMinorPartitions

public int getNumMinorPartitions()

getMajorUnit

public double getMajorUnit()

getMinorUnit

public double getMinorUnit()

showRulerName

public void showRulerName(boolean flag)

showLabels

public void showLabels(boolean flag)

showFixedMode

public void showFixedMode(boolean flag)

showMajorHashings

public void showMajorHashings(boolean flag)

showMinorHashings

public void showMinorHashings(boolean flag)

showHashingsInNormalDir

public void showHashingsInNormalDir(boolean flag)

showHashingsInUpDir

public void showHashingsInUpDir(boolean flag)

setInitPoint

public void setInitPoint(PdVector P)
set the origin of the ruler

measure

public void measure(PdVector P)
Measure, is a way of using the ruler as a Tape measure. To use this method you simply need to pass it an enpoint from which a measurement is made from the currently defined ruler origin set via #setInitPoint(). Hashings will only be automatically visible if measurements are made in the xy,yz, or xz perspectives. For the arbitrary perspective case you must explicity give a direction in which to draw the hash, else results may be unpredictable.

measure

public void measure(PdVector P,
                    PdVector N)

setDirection

public void setDirection(PdVector InitPt,
                         PdVector FinalPt)
give the direction of baseline of the ruler Normalization will be done within this method
Parameters:
InitPt: - the origin of the ruler's baseline
FinalPt: - another point toward which the ruler should direct iteself

setNormal

public void setNormal(PdVector N)
give the direction of the normal vector along which the hashings will be drawn - Normalization will be done within this method
Parameters:
N: - a 3d vector (based at the origin) specifying the direction in which to draw the hashings

setUpVector

public void setUpVector(PdVector U)
give the direction of the up vector along which a secondary set of hashings will be drawn - Normalization will be done within this method
Parameters:
U: - a 3d vector (based at the origin) specifying the direction in which to draw the hashings

setMajorHashSize

public void setMajorHashSize(double pt1,
                             double pt2,
                             int orthogonalType)
Set the endpoints of the hashings along the up or normal vectors
Parameters:
orthogonalType: - specify which of 2 perpendicular directions that hashing occurs.
pt1: - a scalar muliple of the hash vector representing one endpoint of the hash line
pt2: - a scalar multiple of the hash vector representing the other endpoint of the hash line

setDefaultHashSizes

public void setDefaultHashSizes(int orthogonalType)

setMinorHashSize

public void setMinorHashSize(double pt1,
                             double pt2,
                             int orthogonalType)
Set the endpoints of the hashings along the up or normal vectors
Parameters:
orthogonalType: - specify which of 2 perpendicular directions that hashing occurs.
pt1: - a scalar muliple of the hash vector representing one endpoint of the hash line
pt2: - a scalar multiple of the hash vector representing the other endpoint of the hash line

setFixedHashing

public void setFixedHashing(double major,
                            double minor)

setDynamicHashing

public void setDynamicHashing(int major,
                              int minor)

setDefDynamicHashing

public void setDefDynamicHashing()

setDefFixedHashing

public void setDefFixedHashing()

setMinMax

public void setMinMax(double min,
                      double max)

setHashLabel

public void setHashLabel(int p1,
                         int p2,
                         int alignment)

setMajorColor

public void setMajorColor(java.awt.Color C)

setMinorColor

public void setMinorColor(java.awt.Color C)

setRulerName

public void setRulerName(java.lang.String s)
See Also:
setRulerName(s,pos,show)

setRulerName

public void setRulerName(java.lang.String s,
                         int pos)
See Also:
setRulerName(s,pos,show)

setRulerName

public void setRulerName(java.lang.String s,
                         boolean show)
see setRulerName(s,pos,show)

setRulerName

public void setRulerName(java.lang.String s,
                         int pos,
                         boolean show)
Parameters:
s: - the title to be shown for the ruler
pos: - the positioning of the label with respect to the ruler baseline :={ALIGNLEFT,ALIGNRIGHT,ALIGNCENTER}
show: - whether or not to show the ruler name/title

setNameAlignment

public void setNameAlignment(int labelside,
                             int xoff,
                             int yoff)
This method customizes the positioning of the label after affixed to the side of the ruler via setRulerName(pos)
Parameters:
labelside: - which side of the label to attach to the label origin :={ALIGNLEFT(0),ALIGNRIGHT(1)}
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

setNameAlignment

public void setNameAlignment(int align,
                             int labelside,
                             int xoff,
                             int yoff)
This method customizes the positioning of the label and allows you to specify where to affix the label origin to on the ruler
Parameters:
align:=:={ALIGNLEFT,ALIGNRIGHT,ALIGNCENTER} -  
labelside: - which side of the label to attach to the label origin :={ALIGNLEFT(0),ALIGNRIGHT(1)}
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

flipNormal

public void flipNormal()

flipUpVector

public void flipUpVector()

moveRulerOrigin

public void moveRulerOrigin(PdVector d)
move the origin of the ruler to the specific point in space given by d call update externally!

setHashOffsetInNormalDir

public void setHashOffsetInNormalDir(double xoff,
                                     double yoff,
                                     double zoff)

setHashOffsetInUpDir

public void setHashOffsetInUpDir(double xoff,
                                 double yoff,
                                 double zoff)

JavaView® v2.00.008

The software JavaView® is copyright protected. All Rights Reserved.