Package toxi.processing
Class ArrowModifier
java.lang.Object
toxi.processing.ArrowModifier
- All Implemented Interfaces:
Line2DRenderModifier
Line2DRenderModifier
implementation to draw a line with arrow heads
(or alternatively ONLY draw the heads). The size of the arrow heads can be
customized as well as which ends they should be drawn at.-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionboolean
float
float
-
Constructor Summary
ConstructorDescriptionArrowModifier
(float length, float theta, ArrowModifier.Type type) Constructs a new modifier instance.ArrowModifier
(float length, float theta, ArrowModifier.Type type, boolean drawLine) Constructs a new modifier instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(ToxiclibsSupport gfx, ReadonlyVec2D a, ReadonlyVec2D b)
-
Field Details
-
length
public float length -
theta
public float theta -
type
-
doDrawLine
public boolean doDrawLine
-
-
Constructor Details
-
ArrowModifier
Constructs a new modifier instance. The line itself is drawn as well.- Parameters:
length
- length of arrow headtheta
- spread (in radians)type
- type of arrow head(s)
-
ArrowModifier
Constructs a new modifier instance. If drawLine is set to true, the line itself is drawn as well. If false, only the arrow heads are drawn.- Parameters:
length
- length of arrow headtheta
- spread (in radians)type
- type of arrow head(s)drawLine
- If false, only heads are drawn.
-
-
Method Details
-
apply
- Specified by:
apply
in interfaceLine2DRenderModifier
-