// rotate_transform : // 'rotate' 'your' body_part angle angular_direction 'on' 'the' ? reference_plane; public override Wrapper VisitRotate_plane_transform(PreposeGesturesParser.Rotate_plane_transformContext context) { BodyTransform transform = new BodyTransform(); var direction = (RotationDirection)this.Visit(context.angular_direction()); var plane = (BodyPlaneType)this.Visit(context.reference_plane()); var angleText = context.NUMBER().GetText(); var angle = Convert.ToInt32(angleText); foreach (var b in context.body_part()) { var converted = (JointGroup)this.Visit(b); transform = transform.Compose( converted.Aggregate(j => BodyTransformBuilder.RotateTransform(j, angle, plane, direction))); } return(new Wrapper(transform)); }
/// <summary> /// Exit a parse tree produced by <see cref="PreposeGesturesParser.rotate_plane_transform"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitRotate_plane_transform([NotNull] PreposeGesturesParser.Rotate_plane_transformContext context) { }
/// <summary> /// Visit a parse tree produced by <see cref="PreposeGesturesParser.rotate_plane_transform"/>. /// <para> /// The default implementation returns the result of calling <see cref="AbstractParseTreeVisitor{Result}.VisitChildren(IRuleNode)"/> /// on <paramref name="context"/>. /// </para> /// </summary> /// <param name="context">The parse tree.</param> /// <return>The visitor result.</return> public virtual Result VisitRotate_plane_transform([NotNull] PreposeGesturesParser.Rotate_plane_transformContext context) { return(VisitChildren(context)); }