|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component net.lenkaspace.creeper.view.CRRenderer
public class CRRenderer
Uses Java's native rendering techniques to display CRBaseSituatedModel objects in the world.
Nested Class Summary | |
---|---|
static class |
CRRenderer.DIRECTION
|
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.BaselineResizeBehavior |
Field Summary | |
---|---|
static java.lang.String |
CR_BLACK_DOT
|
static java.lang.String |
CR_BLANK_CIRCLE
|
static java.lang.String |
CR_BLUE_CIRCLE
|
static java.lang.String |
CR_BLUE_DOT
|
static java.lang.String |
CR_GRAY_CIRCLE
|
static java.lang.String |
CR_GRAY_DOT
|
static java.lang.String |
CR_GREEN_CIRCLE
|
static java.lang.String |
CR_GREEN_DOT
|
static java.lang.String |
CR_PURPLE_CIRCLE
|
static java.lang.String |
CR_PURPLE_DOT
|
static java.lang.String |
CR_RED_CIRCLE
|
static java.lang.String |
CR_RED_DOT
|
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
CRRenderer(CRController controller_)
|
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Called each time interval. |
void |
centerAtViewPosition(CRVector3d viewPosition_)
|
void |
drawImageAt(java.awt.image.BufferedImage img_,
CRVector3d pos_,
CRVector3d size_,
double rot_,
double alpha_,
java.awt.Graphics g)
Draw an image |
void |
drawTextAt(CRVector3d pos_,
java.lang.String string_,
java.awt.Color color_,
java.awt.Graphics g)
Draw text of a specified color |
CRImageProvider |
getImageProvider()
|
double |
getViewPositionX()
|
double |
getViewPositionY()
|
void |
moveView(CRRenderer.DIRECTION direction_,
int amount_)
|
void |
paint(java.awt.Graphics g)
Main rendering function |
void |
setImageProvider(CRImageProvider imageProvider_)
|
void |
setShouldOverrideNoPaint(boolean value_)
|
void |
setViewPosition(CRVector3d viewPosition_)
|
void |
setWorld(CRWorld world_)
|
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CR_BLACK_DOT
public static java.lang.String CR_BLUE_DOT
public static java.lang.String CR_GRAY_DOT
public static java.lang.String CR_GREEN_DOT
public static java.lang.String CR_PURPLE_DOT
public static java.lang.String CR_RED_DOT
public static java.lang.String CR_BLANK_CIRCLE
public static java.lang.String CR_BLUE_CIRCLE
public static java.lang.String CR_GRAY_CIRCLE
public static java.lang.String CR_GREEN_CIRCLE
public static java.lang.String CR_PURPLE_CIRCLE
public static java.lang.String CR_RED_CIRCLE
Constructor Detail |
---|
public CRRenderer(CRController controller_)
Method Detail |
---|
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void paint(java.awt.Graphics g)
paint
in class java.awt.Component
public void moveView(CRRenderer.DIRECTION direction_, int amount_)
public void drawImageAt(java.awt.image.BufferedImage img_, CRVector3d pos_, CRVector3d size_, double rot_, double alpha_, java.awt.Graphics g)
img_
- BufferedImage to drawpos_
- CRVector3d position [x,y,z]rot_
- double rotation in radiansg
- Graphics objectpublic void drawTextAt(CRVector3d pos_, java.lang.String string_, java.awt.Color color_, java.awt.Graphics g)
pos_
- CRVector3d position [x,y,z]string_
- String text to displaycolor_
- Color color of textg
- Graphics objectpublic void setShouldOverrideNoPaint(boolean value_)
public void setWorld(CRWorld world_)
public CRImageProvider getImageProvider()
public void setImageProvider(CRImageProvider imageProvider_)
public double getViewPositionX()
public double getViewPositionY()
public void setViewPosition(CRVector3d viewPosition_)
public void centerAtViewPosition(CRVector3d viewPosition_)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |