Package geomss.geom
Class GenModelNote
- java.lang.Object
-
- geomss.geom.AbstractGeomElement<T>
-
- geomss.geom.AbstractNote<GenModelNote>
-
- geomss.geom.GenModelNote
-
- All Implemented Interfaces:
GeomElement<GenModelNote>
,Transformable<GenModelNote>
,java.io.Serializable
,java.lang.Cloneable
,java.lang.Comparable
,javolution.lang.Reusable
,javolution.xml.XMLSerializable
- Direct Known Subclasses:
ModelNote
,ModelNoteTrans
public abstract class GenModelNote extends AbstractNote<GenModelNote> implements Transformable<GenModelNote>
Partial implementation of a textual note located at a point in nD space, and represented at a fixed size and orientation in model space.Modified by: Joseph A. Huwaldt
- Version:
- November 24, 2015
- Author:
- Joseph A. Huwaldt, Date: February 10, 2014
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class geomss.geom.AbstractNote
DEFAULT_FONT
-
Fields inherited from class geomss.geom.AbstractGeomElement
RESOURCES
-
-
Constructor Summary
Constructors Constructor Description GenModelNote()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract GenModelNote
changeHeight(Parameter<javax.measure.quantity.Length> height)
Return a new note object identical to this one, but with the specified height in model space.Point
getBoundsMax()
Return the coordinate point representing the maximum bounding box corner (e.g.: max X, max Y, max Z).Point
getBoundsMin()
Return the coordinate point representing the minimum bounding box corner (e.g.: min X, min Y, min Z).abstract Parameter<javax.measure.quantity.Length>
getHeight()
Return the height of the text box in model units.Point
getLimitPoint(int dim, boolean max, double tol)
Returns the most extreme point, either minimum or maximum, in the specified coordinate direction on this geometry element.Vector<javax.measure.quantity.Dimensionless>
getNormal()
Return the (at least 3D) vector indicating the normal axis direction for the text.DCMatrix
getOrientation()
Return a direction cosine matrix containing the orientation of the note string.ModelNoteTrans
getTransformed(GTransform transform)
Returns transformed version of this element.Parameter<javax.measure.quantity.Length>
getWidth()
Return the width of the text box in model units.abstract GeomVector<javax.measure.quantity.Dimensionless>
getXHat()
Return the vector indicating the horizontal axis direction for the text.abstract GeomVector<javax.measure.quantity.Dimensionless>
getYHat()
Return the vector indicating the vertical axis direction (or ascent direction) for the text.abstract ModelNote
immutable()
Return an immutable version of this note.int
size()
Returns the number of child-elements that make up this geometry element.javolution.text.Text
toText()
Returns the text representation of this geometry element that consists of the text string, the orienting plane and location, and the text box height.-
Methods inherited from class geomss.geom.AbstractNote
changeFont, changeLocation, getFont, getLocation, getNote, getParDimension, length
-
Methods inherited from class geomss.geom.AbstractGeomElement
addChangeListener, clone, compareTo, equals, getAllUserData, getID, getName, getUserData, hashCode, putAllUserData, putUserData, removeChangeListener, removeUserData, reset, setName, toString
-
Methods inherited from interface geomss.geom.GeomElement
addChangeListener, copy, copyToReal, getAllUserData, getID, getName, getParDimension, getPhyDimension, getUnit, getUserData, isValid, putAllUserData, putUserData, removeChangeListener, removeUserData, setName, to, toDimension
-
-
-
-
Constructor Detail
-
GenModelNote
public GenModelNote()
-
-
Method Detail
-
immutable
public abstract ModelNote immutable()
Return an immutable version of this note.- Returns:
- An immutable version of this note.
-
getXHat
public abstract GeomVector<javax.measure.quantity.Dimensionless> getXHat()
Return the vector indicating the horizontal axis direction for the text.- Returns:
- The vector indicating the horizontal axis direction for the text.
-
getYHat
public abstract GeomVector<javax.measure.quantity.Dimensionless> getYHat()
Return the vector indicating the vertical axis direction (or ascent direction) for the text.- Returns:
- The vector indicating the vertical axis direction (or ascent direction) for the text.
-
getNormal
public Vector<javax.measure.quantity.Dimensionless> getNormal()
Return the (at least 3D) vector indicating the normal axis direction for the text. When looking down the normal axis, you are looking at the text face-on.- Returns:
- The (at least 3D) vector indicating the normal axis direction for the text.
-
getHeight
public abstract Parameter<javax.measure.quantity.Length> getHeight()
Return the height of the text box in model units.- Returns:
- The height of the text box in model units.
-
getWidth
public Parameter<javax.measure.quantity.Length> getWidth()
Return the width of the text box in model units.- Returns:
- The width of the text box in model units.
-
changeHeight
public abstract GenModelNote changeHeight(Parameter<javax.measure.quantity.Length> height)
Return a new note object identical to this one, but with the specified height in model space.- Parameters:
height
- The new height for the note in model space coordinates. May not be null.- Returns:
- A new note object identical to this one, but with the specified height in model space.
-
size
public int size()
Returns the number of child-elements that make up this geometry element. This implementation always returns 1 as a GenModelNote is located at a single point in model space.- Specified by:
size
in interfaceGeomElement<GenModelNote>
- Returns:
- The number of child-elements that make up this geometry element.
-
getBoundsMin
public Point getBoundsMin()
Return the coordinate point representing the minimum bounding box corner (e.g.: min X, min Y, min Z).- Specified by:
getBoundsMin
in interfaceGeomElement<GenModelNote>
- Returns:
- The minimum bounding box coordinate for this geometry element.
-
getBoundsMax
public Point getBoundsMax()
Return the coordinate point representing the maximum bounding box corner (e.g.: max X, max Y, max Z).- Specified by:
getBoundsMax
in interfaceGeomElement<GenModelNote>
- Returns:
- The maximum bounding box coordinate for this geometry element.
-
getLimitPoint
public Point getLimitPoint(int dim, boolean max, double tol)
Returns the most extreme point, either minimum or maximum, in the specified coordinate direction on this geometry element.- Specified by:
getLimitPoint
in interfaceGeomElement<GenModelNote>
- Parameters:
dim
- An index indicating the dimension to find the min/max point for (0=X,1=Y, 2=Z, etc).max
- Set totrue
to return the maximum value,false
to return the minimum.tol
- Fractional tolerance to refine the min/max point position to if necessary.- Returns:
- The point found on this element that is the min or max in the specified coordinate direction.
- See Also:
getBoundsMin()
,getBoundsMax()
-
getOrientation
public DCMatrix getOrientation()
Return a direction cosine matrix containing the orientation of the note string.- Returns:
- A direction cosine matrix containing the orientation of the note string.
-
getTransformed
public ModelNoteTrans getTransformed(GTransform transform)
Returns transformed version of this element. The returned object implementsGeomTransform
and contains this element as a child.- Specified by:
getTransformed
in interfaceTransformable<GenModelNote>
- Parameters:
transform
- The transformation to apply to this geometry. May not be null.- Returns:
- A new triangle that is identical to this one with the specified transformation applied.
- Throws:
DimensionException
- if this point is not 3D.
-
toText
public javolution.text.Text toText()
Returns the text representation of this geometry element that consists of the text string, the orienting plane and location, and the text box height. For example:{aNote = {"A text string.",{1,0,0},{0,1,0},{10 ft, -3 ft, 4.56 ft},0.2 ft}}
If there is no name, then the output looks like this:{"A text string.",{0,0,1},{0,1,0},{10 ft, -3 ft, 4.56 ft},0.2 ft}
- Specified by:
toText
in interfaceGeomElement<GenModelNote>
- Overrides:
toText
in classAbstractNote<GenModelNote>
- Returns:
- the text representation of this geometry element.
-
-