71 if(points_.size() < 2)
76 for(
unsigned int i = 0; i + 1 < points_.size(); i++) {
78 const ACG::Vec3d firstPoint = points_[i].position, sndPoint = points_[i + 1].position;
79 double r = (firstPoint - sndPoint).norm() / 4.0;
81 const ACG::Vec3d ort0 = dir % points_[i].normal, ort1 = dir % points_[i + 1].normal;
82 ACG::Vec3d f0 = ort0 % points_[i].normal, f1 = ort1 % points_[i + 1].normal;
85 far = sndPoint + f1.normalize() * r;
87 handles_.push_back(near);
88 handles_.push_back(far);
93 for(
unsigned int i = 1; i + 1 < handles_.size(); i += 2) {
95 const ACG::Vec3d dir = (handles_[i + 1] - handles_[i]) / 2.0;
98 handles_[i + 1] = p.position + dir;
99 handles_[i] = p.position - dir;