|
sdr 0.21 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.cscott.sdr.calls.ast.AstNode
net.cscott.sdr.calls.ast.SeqCall
net.cscott.sdr.calls.ast.Prim
public class Prim
A Prim represents a primitive action: a certain distance travelled forward and to the side, while rotating a certain amount, performed in a certain number of beats. PRIM is a leaf node in a our AST.
Nested Class Summary | |
---|---|
static class |
Prim.Direction
The Prim.Direction enumeration tells whether the movement
is relative to the center of the formation. |
Field Summary | |
---|---|
Prim.Direction |
dirRot
Is the movement direction relative to the center of the formation? |
Prim.Direction |
dirX
Is the movement direction relative to the center of the formation? |
Prim.Direction |
dirY
Is the movement direction relative to the center of the formation? |
boolean |
forceArc
The @{link #forceArc} parameter helps distinguish between (say) "pass thru and quarter in" and "split counter rotate 1/4". |
boolean |
passRight
This parameter indicates whether this motion involves a right shoulder pass (as most motions do, including "cross" calls where the crossers start far apart) or else a left shoulder pass ("cross" calls which start with adjacent crossers). |
ExactRotation |
rot
Amount of rotation. |
static Prim |
STAND_STILL
|
Fraction |
time
The number of beats which this motion should take. |
Fraction |
x
Amount of movement in the 'x' direction (dancer's right/left). |
Fraction |
y
Amount of movement in the 'y' direction (dancer forward and back). |
Fields inherited from class net.cscott.sdr.calls.ast.AstNode |
---|
type |
Constructor Summary | |
---|---|
Prim(Prim.Direction dirX,
Fraction x,
Prim.Direction dirY,
Fraction y,
Prim.Direction dirRot,
ExactRotation rot,
Fraction time,
boolean passRight,
boolean forceArc)
|
Method Summary | ||
---|---|---|
|
accept(TransformVisitor<T> v,
T t)
|
|
|
accept(ValueVisitor<RESULT,CLOSURE> v,
CLOSURE cl)
|
|
String |
argsToString()
|
|
Prim |
build(Prim.Direction dirX,
Fraction x,
Prim.Direction dirY,
Fraction y,
Prim.Direction dirRot,
ExactRotation rot,
Fraction time,
boolean passRight,
boolean forceArc)
Factory: creates new Prim only if it would differ from this. |
|
boolean |
equals(Object o)
|
|
int |
hashCode()
|
|
Prim |
scaleTime(Fraction f)
Create a new Prim, identical to this one except that the time is scaled by the given fraction. |
Methods inherited from class net.cscott.sdr.calls.ast.AstNode |
---|
toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final Fraction x
public final Fraction y
public final ExactRotation rot
public final Prim.Direction dirX
public final Prim.Direction dirY
public final Prim.Direction dirRot
public final Fraction time
public final boolean passRight
public final boolean forceArc
forceArc
would be true) while
the former is a straight line path (hence forceArc
would
be false).
public static final Prim STAND_STILL
Constructor Detail |
---|
public Prim(Prim.Direction dirX, Fraction x, Prim.Direction dirY, Fraction y, Prim.Direction dirRot, ExactRotation rot, Fraction time, boolean passRight, boolean forceArc)
Method Detail |
---|
public <T> SeqCall accept(TransformVisitor<T> v, T t)
accept
in class SeqCall
public <RESULT,CLOSURE> RESULT accept(ValueVisitor<RESULT,CLOSURE> v, CLOSURE cl)
accept
in class AstNode
public String argsToString()
argsToString
in class AstNode
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public Prim scaleTime(Fraction f)
public Prim build(Prim.Direction dirX, Fraction x, Prim.Direction dirY, Fraction y, Prim.Direction dirRot, ExactRotation rot, Fraction time, boolean passRight, boolean forceArc)
|
sdr 0.21 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |