public class TextComponent3d extends TextComponentBase implements TransformableGeometry
TextComponentBase.FontStyle, TextComponentBase.HorizontalAlignment, TextComponentBase.VerticalAlignment
ModelComponent.NavpanelVisibility
Modifier and Type | Field and Description |
---|---|
static boolean |
defaultByReference |
static int |
defaultFontSize |
static double |
defaultTextSize |
static PropertyList |
myProps |
defaultFontName, defaultHAlignment, defaultVAlignment
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
ARTICULATED, SIMULATING
TRANSLUCENT, TWO_DIMENSIONAL
Constructor and Description |
---|
TextComponent3d(java.lang.String name)
Sets both name and text to the provided string
|
TextComponent3d(java.lang.String text,
Point3d pos)
Sets both name (if valid) and text to provided string
|
TextComponent3d(java.lang.String name,
java.lang.String text,
Point3d pos)
Main constructor
|
Modifier and Type | Method and Description |
---|---|
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
AxisAngle |
getOrientation() |
Point3d |
getPosition()
Returns position by reference
|
int |
getRenderHints()
Returns a bit code giving rendering hints about this renderable.
|
java.lang.String |
getText() |
boolean |
isFollowingEye()
Checks whether the text is following the viewer's eye
|
boolean |
isSelectable()
Returns true if this object is in fact selectable.
|
int |
numSelectionQueriesNeeded()
If this selectable manages its own selection (by issuing selection
queries within its
render method), then this method should
return the maximum number of selection queries that will be
required. |
void |
render(GLRenderer renderer,
int flags)
Render this object using Open GL via the JOGL.
|
void |
setFollowEye(boolean set)
Sets whether to have the text follow the user's eye
|
void |
setFontSize(int size)
Sets the base font size.
|
void |
setOrientation(AxisAngle orient)
Orientation w.r.t.
|
void |
setPosition(Point3d pos)
Sets the position to display text
|
void |
setPosition(Point3d pos,
boolean byRef)
Sets world position to display text.
|
void |
setText(java.lang.String text)
Sets the text to display
|
void |
transformGeometry(AffineTransform3dBase X)
Applies an affine transformation to the geometry of this object.
|
void |
transformGeometry(AffineTransform3dBase X,
TransformableGeometry topObject,
int flags)
Applies an affine transformation to the geometry of this object.
|
void |
updateBounds(Point3d pmin,
Point3d pmax)
Update the minimum and maximum points for this object.
|
createDefaultRenderProps, createRenderProps, dispose, getFontFamily, getFontSize, getFontStyle, getHorizontalAlignment, getTextSize, getVerticalAlignment, setFont, setFontFamily, setFontStyle, setHorizontalAlignment, setTextColor, setTextRenderer, setTextSize, setVerticalAlignment
copy, getRenderProps, getSelection, prerender, setRenderProps, updateRenderProps
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, connectToHierarchy, createTempFlag, disconnectFromHierarchy, getChildren, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, hasState, isFixed, isMarked, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, scan, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setSelected, updateReferences, write
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, postscan, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferences
getProperty
getChildren, hasChildren
isWritable, write
public static int defaultFontSize
public static double defaultTextSize
public static boolean defaultByReference
public static PropertyList myProps
public TextComponent3d(java.lang.String name)
name
- public TextComponent3d(java.lang.String text, Point3d pos)
public TextComponent3d(java.lang.String name, java.lang.String text, Point3d pos)
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class TextComponentBase
public void setText(java.lang.String text)
public java.lang.String getText()
public void setPosition(Point3d pos)
public void setPosition(Point3d pos, boolean byRef)
public Point3d getPosition()
public void setOrientation(AxisAngle orient)
public AxisAngle getOrientation()
public void render(GLRenderer renderer, int flags)
GLRenderable
render
in interface GLRenderable
render
in class RenderableComponentBase
renderer
- renderer object which is used to perform the rendering. Provides pointers
to GL and GLU, along with helper functions.flags
- supplies flags that may be used to control different
aspects of the rendering. Flags are defined in GLRenderer
and currently include
GLRenderer.SELECTED
,
GLRenderer.VERTEX_COLORING
,
GLRenderer.HSV_COLOR_INTERPOLATION
,
GLRenderer.SORT_FACES
, and
GLRenderer.CLEAR_MESH_DISPLAY_LISTS
.public int getRenderHints()
GLRenderable
TRANSLUCENT
.getRenderHints
in interface GLRenderable
getRenderHints
in class RenderableComponentBase
public boolean isFollowingEye()
public void setFollowEye(boolean set)
public void updateBounds(Point3d pmin, Point3d pmax)
GLRenderable
updateBounds
in interface GLRenderable
updateBounds
in class RenderableComponentBase
pmin
- minimum pointpmax
- maximum pointpublic void transformGeometry(AffineTransform3dBase X)
TransformableGeometry
transformGeometry (X, this, 0);
transformGeometry
in interface TransformableGeometry
X
- affine transformationpublic void transformGeometry(AffineTransform3dBase X, TransformableGeometry topObject, int flags)
TransformableGeometry
topComponent
should be the component for which the method
was initially invoked. The variable flags
provides
information about the context in which the transformation is
being applied. At present, the available flags are
TransformableGeometry.SIMULATING
and TransformableGeometry.ARTICULATED
.transformGeometry
in interface TransformableGeometry
X
- affine transformationtopObject
- component on which the method was initially invokedflags
- provides information about the context in which the
transformation is being applied.public boolean isSelectable()
RenderableComponentBase
isSelectable
in interface GLSelectable
isSelectable
in class TextComponentBase
public int numSelectionQueriesNeeded()
GLSelectable
render
method), then this method should
return the maximum number of selection queries that will be
required. Otherwise, this method should return -1.numSelectionQueriesNeeded
in interface GLSelectable
numSelectionQueriesNeeded
in class TextComponentBase
public void setFontSize(int size)
TextComponentBase.setTextSize(double)
.setFontSize
in class TextComponentBase
size
- TextComponentBase.setTextSize(double)