sdr 0.21

net.cscott.sdr.calls
Class Warp

java.lang.Object
  extended by net.cscott.sdr.calls.Warp

public abstract class Warp
extends Object

A Warp denotes a time-dependent transformation of the dancers' positions. Time runs from 0 (at the start of the call) to 1 (at the end); it is the responsibility of the caller to scale the time argument according to the actual length of the warped calls. As an example, the Warp for a stretched box formation starts with boxes overlapping at time t=0, and results in an undistorted setup at time t=1.

Version:
$Id: Warp.java,v 1.6 2006-10-25 20:39:36 cananian Exp $
Author:
C. Scott Ananian

Field Summary
static Warp MIRROR
          A Warp object that mirrors points across the y-axis.
static Warp NONE
          A Warp which returns points unchanged.
 
Method Summary
static Warp compose(Warp second, Warp first)
          Returns a new Warp object which first applies the first warp to the given point, then applies the second warp to the result.
static Warp rotateAndMove(Position from, Position to)
          Returns a Warp which will rotate and translate points such that from is warped to to.
abstract  Position warp(Position p, Fraction time)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NONE

public static final Warp NONE
A Warp which returns points unchanged.


MIRROR

public static final Warp MIRROR
A Warp object that mirrors points across the y-axis.

Method Detail

warp

public abstract Position warp(Position p,
                              Fraction time)

rotateAndMove

public static Warp rotateAndMove(Position from,
                                 Position to)
Returns a Warp which will rotate and translate points such that from is warped to to. Requires that both from.facing and to.facing are ExactRotations.


compose

public static Warp compose(Warp second,
                           Warp first)
Returns a new Warp object which first applies the first warp to the given point, then applies the second warp to the result.


sdr 0.21

Copyright (c) 2006 C. Scott Ananian