Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 077f6df306
Fetching contributors…

Cannot retrieve contributors at this time

file 32 lines (28 sloc) 0.709 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
class GaitPhase {
  int startingFrame;
  int endingFrame;
  int type;
  
  static final int SINGLE_SUPPORT_LEFT = 0;
  static final int SINGLE_SUPPORT_RIGHT = 1;
  static final int DOUBLE_SUPPORT = 2;
  
  GaitPhase(int startingFrame, int endingFrame, int type){
    this.startingFrame = startingFrame;
    this.endingFrame = endingFrame;
    this.type = type;
  }
  
  color phaseColor(){
    color result = color(255);
    switch(type) {
    case SINGLE_SUPPORT_RIGHT:
      result = color(255,100,100);
      break;
      case SINGLE_SUPPORT_LEFT:
      result = color(100,255,100);
      break;
      case DOUBLE_SUPPORT:
      result = color(100,100,255);
      break;
    }

  return result;
  }
}
Something went wrong with that request. Please try again.