Created
March 28, 2013 21:45
-
-
Save netopyr/5267083 to your computer and use it in GitHub Desktop.
Creating the structure of the dummy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Definition of head | |
final Bone head = new Bone(30, 90); | |
// Definition of torso | |
final Bone torso = new Bone(80, 0); | |
head.getChildren().add(torso); | |
final Bone[] upperArm = new Bone[2]; | |
final Bone[] upperLeg = new Bone[2]; | |
for (int i=0; i<2; i++) { | |
// Definition upper arms | |
upperArm[i] = new Bone(60, 60 - 90 * i); | |
// Definition of lower arms | |
final Bone lowerArm = new Bone(60, -90); | |
upperArm[i].getChildren().add(lowerArm); | |
// Definition of upper legs | |
upperLeg[i] = new Bone(60, 30 - 90*i); | |
// Definition of lower legs | |
final Bone lowerLeg = new Bone(75, 90); | |
upperLeg[i].getChildren().add(lowerLeg); | |
} | |
// Connect arms and legs to head and torso | |
head.getChildren().addAll(upperArm); | |
torso.getChildren().addAll(upperLeg); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment