|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectartisynth.core.modelbase.ModelComponentBase
artisynth.core.modelbase.RenderableComponentBase
artisynth.core.renderables.TextComponentBase
artisynth.core.renderables.HudPrintStream
public class HudPrintStream
Simple component to print info on the main viewer
Nested Class Summary |
---|
Nested classes/interfaces inherited from class artisynth.core.renderables.TextComponentBase |
---|
TextComponentBase.FontStyle, TextComponentBase.HorizontalAlignment, TextComponentBase.VerticalAlignment |
Nested classes/interfaces inherited from interface artisynth.core.modelbase.ModelComponent |
---|
ModelComponent.NavpanelVisibility |
Field Summary | |
---|---|
static int |
defaultBufferSize
|
static java.lang.String |
defaultFontName
|
static double |
defaultLineSpacing
|
static int |
defaultNumDisplayLines
|
static PropertyList |
myProps
|
Fields inherited from class artisynth.core.renderables.TextComponentBase |
---|
defaultFontSize, defaultHAlignment, defaultTextSize, defaultVAlignment |
Fields inherited from class artisynth.core.modelbase.ModelComponentBase |
---|
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames |
Fields inherited from interface maspack.render.GLRenderable |
---|
TRANSLUCENT, TWO_DIMENSIONAL |
Constructor Summary | |
---|---|
HudPrintStream()
Basic component, defaulting to 5 lines of 12pt monospaced font in bottom left corner |
Method Summary | |
---|---|
void |
clear()
Clears the buffer |
void |
cls()
Appends blank lines to clear the screen |
void |
fullscreen()
Makes the HUD full-screen according to the viewer's current height |
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by this object. |
int |
getBufferSize()
Returns maximum size of line buffer |
double |
getLineSpacing()
Gets the line spacing |
int |
getNumDisplayLines()
Maximum number of lines to display |
Point2d |
getPosition()
Gets current 2D normalized coordinates, [0 1]x[0 1] |
int |
getRenderHints()
Returns a bit code giving rendering hints about this renderable. |
int |
getScrollOffset()
Gets the current scroll offset |
boolean |
isFullscreen()
|
void |
locateBottomCentre()
Moves the HUD to the bottom-centre |
void |
locateBottomLeft()
Moves the HUD to the bottom-left corner |
void |
locateBottomRight()
Moves the HUD to the bottom-right |
void |
locateTopCentre()
Moves the HUD to the top-centre |
void |
locateTopLeft()
Moves the HUD to the top-left corner |
void |
locateTopRight()
Moves the HUD to the top-right |
void |
print(java.lang.String str)
Standard print functionality |
void |
printf(java.lang.String fmt,
java.lang.Object... args)
Standard printf functionality |
void |
println(java.lang.String str)
Standard println functionality |
void |
render(GLRenderer renderer,
int flags)
Render this object using Open GL via the JOGL. |
void |
scrollDown()
Scroll down by one line |
void |
scrollUp()
Scroll up by one line |
void |
setBufferSize(int buffSize)
Sets maximum number of lines to store |
void |
setFullscreen(boolean enable)
|
void |
setLineSpacing(double sp)
Sets the line spacing, 1 for single-space |
void |
setNumDisplayLines(int max)
Sets maximum number of lines to display |
void |
setPosition(Point2d pos)
Sets the 2D normalized coordinates, [0 1]x[0 1] |
void |
setScrollOffset(int offset)
Set number of lines to scroll up 0 <= offset <= # buffered lines - lines on screen |
void |
setVerticalAlignment(TextComponentBase.VerticalAlignment vAlignment)
Sets the vertical alignment, one of TOP, CENTRE, BOTTOM |
void |
toggleFullscreen()
|
Methods inherited from class artisynth.core.renderables.TextComponentBase |
---|
createDefaultRenderProps, createRenderProps, dispose, getFontFamily, getFontSize, getFontStyle, getHorizontalAlignment, getTextSize, getVerticalAlignment, isSelectable, numSelectionQueriesNeeded, setFont, setFontFamily, setFontSize, setFontStyle, setHorizontalAlignment, setTextColor, setTextRenderer, setTextSize |
Methods inherited from class artisynth.core.modelbase.RenderableComponentBase |
---|
copy, getRenderProps, getSelection, prerender, setRenderProps, updateBounds, updateRenderProps |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface artisynth.core.modelbase.ModelComponent |
---|
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, postscan, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferences |
Methods inherited from interface maspack.properties.HasProperties |
---|
getProperty |
Methods inherited from interface maspack.properties.HierarchyNode |
---|
getChildren, hasChildren |
Methods inherited from interface maspack.util.Scannable |
---|
isWritable, write |
Field Detail |
---|
public static java.lang.String defaultFontName
public static int defaultNumDisplayLines
public static double defaultLineSpacing
public static int defaultBufferSize
public static PropertyList myProps
Constructor Detail |
---|
public HudPrintStream()
Method Detail |
---|
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class TextComponentBase
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 void cls()
public void clear()
public void printf(java.lang.String fmt, java.lang.Object... args)
public void print(java.lang.String str)
public void println(java.lang.String str)
public int getNumDisplayLines()
public void setNumDisplayLines(int max)
public void setBufferSize(int buffSize)
public int getBufferSize()
public void setLineSpacing(double sp)
public double getLineSpacing()
public Point2d getPosition()
public void setPosition(Point2d pos)
public int getRenderHints()
GLRenderable
TRANSLUCENT
.
getRenderHints
in interface GLRenderable
getRenderHints
in class RenderableComponentBase
public void locateTopLeft()
public void locateTopCentre()
public void locateTopRight()
public void locateBottomLeft()
public void locateBottomCentre()
public void locateBottomRight()
public void fullscreen()
public void toggleFullscreen()
public boolean isFullscreen()
public void setFullscreen(boolean enable)
public void setVerticalAlignment(TextComponentBase.VerticalAlignment vAlignment)
TextComponentBase
TOP, CENTRE, BOTTOM
setVerticalAlignment
in class TextComponentBase
public void setScrollOffset(int offset)
public int getScrollOffset()
public void scrollUp()
public void scrollDown()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |