Transform SequenceΒΆ

Demonstrates how to easily compute the result of applying multiple transforms in a sequence

ExampleTransformSequence.java

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
   public static void main(String[] args) {
       InvertibleTransformSequence<Se2_F64> sequence = new InvertibleTransformSequence<Se2_F64>();

       // add a few easy to understand transforms
       sequence.addTransform(true,new Se2_F64(2,0,0));
       sequence.addTransform(true,new Se2_F64(3,0,0));
       sequence.addTransform(false,new Se2_F64(0,4,0));

       Se2_F64 result = new Se2_F64();
       sequence.computeTransform(result);

       // should be (x=5,y=-4,yaw=0)
       result.print();
   }