net.nexttext.renderer
Class VelocityRenderer
java.lang.Object
net.nexttext.renderer.TextPageRenderer
net.nexttext.renderer.VelocityRenderer
public class VelocityRenderer
- extends TextPageRenderer
Traverses the TextObject hierarchy and draws every object's velocity as a
line starting from the object's position. This callback is useful to debug
behaviours that make use of the Velocity property.
|
Constructor Summary |
VelocityRenderer(processing.core.PApplet p,
int color,
int scale)
Builds a VelocityRenderer. |
VelocityRenderer(processing.core.PApplet p,
int r,
int g,
int b,
int scale)
Builds a VelocityRenderer. |
|
Method Summary |
void |
renderPage(TextPage textPage)
Traverses the TextObject hierarchy and renders a velocity vector for any
TextObject having a Velocity property. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VelocityRenderer
public VelocityRenderer(processing.core.PApplet p,
int color,
int scale)
- Builds a VelocityRenderer.
- Parameters:
p - the parent PAppletcolor - the color that will be used to render the vectorscale - a scalar that will be used to make the vector proportionally
larger. This is useful since (x,y) values for velocity are often in the
range 0~5.
VelocityRenderer
public VelocityRenderer(processing.core.PApplet p,
int r,
int g,
int b,
int scale)
- Builds a VelocityRenderer.
- Parameters:
p - the parent PAppletr - the red value of the color that will be used to render the vectorg - the green value of the color that will be used to render the vectorb - the blue value of the color that will be used to render the vectorscale - a scalar that will be used to make the vector proportionally
larger. This is useful since (x,y) values for velocity are often in the
range 0~5.
renderPage
public void renderPage(TextPage textPage)
- Traverses the TextObject hierarchy and renders a velocity vector for any
TextObject having a Velocity property.
- Specified by:
renderPage in class TextPageRenderer
- Parameters:
textPage - the TextPage to render