Package geomss.geom
Class GenScreenNote
- java.lang.Object
-
- geomss.geom.AbstractGeomElement<T>
-
- geomss.geom.AbstractNote<GenScreenNote>
-
- geomss.geom.GenScreenNote
-
- All Implemented Interfaces:
GeomElement<GenScreenNote>
,Transformable<GenScreenNote>
,java.io.Serializable
,java.lang.Cloneable
,java.lang.Comparable
,javolution.lang.Reusable
,javolution.xml.XMLSerializable
public abstract class GenScreenNote extends AbstractNote<GenScreenNote> implements Transformable<GenScreenNote>
Partial implementation of a textual note located at a point in nD space, but is displayed at a fixed size on the screen and oriented such that it is always face-on to the user.Modified by: Joseph A. Huwaldt
- Version:
- November 24, 2015
- Author:
- Joseph A. Huwaldt, Date: February 5, 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 GenScreenNote()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description 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).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.NoteTrans
getTransformed(GTransform transform)
Returns transformed version of this element.abstract Note
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 followed by the coordinate position.-
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
-
GenScreenNote
public GenScreenNote()
-
-
Method Detail
-
immutable
public abstract Note immutable()
Return an immutable version of this note.- Returns:
- An immutable version of this note.
-
size
public int size()
Returns the number of child-elements that make up this geometry element. This implementation always returns 1 as a GenScreenNote is located at a single point in model space.- Specified by:
size
in interfaceGeomElement<GenScreenNote>
- 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<GenScreenNote>
- 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<GenScreenNote>
- 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. This implementation always returns this note location coordinate.- Specified by:
getLimitPoint
in interfaceGeomElement<GenScreenNote>
- 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()
-
getTransformed
public NoteTrans 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<GenScreenNote>
- 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 followed by the coordinate position. For example:{aNote = {"A text string.",{10 ft, -3 ft, 4.56 ft}}}
If there is no name, then the output looks like this:{"A text string.",{10 ft, -3 ft, 4.56 ft}}
- Specified by:
toText
in interfaceGeomElement<GenScreenNote>
- Overrides:
toText
in classAbstractNote<GenScreenNote>
- Returns:
- the text representation of this geometry element.
-
-