Skip to content

Instantly share code, notes, and snippets.

@netopyr
netopyr / dummy1.java
Created March 28, 2013 21:45
Creating the structure of the dummy
// 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];
@netopyr
netopyr / dummy2.java
Last active December 15, 2015 12:09
Attaching visual elements to the dummy
// Definition of head
final Bone head = new Bone(30, 90);
head.getContent().add(new Ellipse(20, 15));
// Definition of torso
final Bone torso = new Bone(80, 0);
torso.getContent().add(new Ellipse(40, 0, 50, 20));
head.getChildren().add(torso);
final Bone[] upperArm = new Bone[2];
@netopyr
netopyr / visual_bone.java
Last active December 15, 2015 12:09
Attaching visual elements to a bone
// Attaching visual elements to a bone
final Bone bone = new Bone(50, 30);
bone.getContent().addAll(
new Circle(20),
new Ellipse(45, 0, 25, 15),
new Circle(80, 0, 10)
);
@netopyr
netopyr / connecting_bones.java
Created March 27, 2013 21:36
Adding bone b2 to the children of bone b1
// Adding bone b2 to the children of bone b1
b1.getChildren().add(b2);
@netopyr
netopyr / single_bone.java
Last active December 15, 2015 12:09
Creating a single bone
// Creating a single bone
final Bone bone = new Bone(110, 90);