class Segment{ Node start; Node end; float length; color c; Segment(){ start = new Node(); end = new Node(); length = 0.0f; c=color(0,20); } Segment(Vec3D pStart, Vec3D pEnd){ this.start = new Node(pStart); this.end = new Node(pEnd); start.add(end); end.add(start); this.length = pStart.distanceTo(pEnd); this.c=color(0,20); } void draw(){ stroke(c); line(start.position.x,start.position.y,start.position.z,end.position.x,end.position.y,end.position.z); } }