summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
79d5150)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
our $project_cylinder_radius;
our $project_cylinder_max_d_theta;
our $project_cylinder_radius;
our $project_cylinder_max_d_theta;
-sub project_cylinder_need_subdivide () {
- foreach my $t (@$triangles) {
- my @thetas = map { $_->[0] / $project_cylinder_radius } @$t;
+sub project_cylinder_triangle_need_subdivide ($) {
+ my ($t) = @_;
+ my @thetas = map { $_->[0] / $project_cylinder_radius } @$t;
- foreach my $ix (0..2) {
- if (abs($thetas[$ix] - $thetas[($ix+1)%3])
- > $project_cylinder_max_d_theta) {
- return 1;
- }
+ foreach my $ix (0..2) {
+ if (abs($thetas[$ix] - $thetas[($ix+1)%3])
+ > $project_cylinder_max_d_theta) {
+ return 1;
+sub project_cylinder_need_subdivide () {
+ foreach my $t (@$triangles) {
+ next unless project_cylinder_triangle_need_subdivide $t;
+ return 1;
+ }
+ return 0;
+}
+
sub project_cylinder_tri {
my ($t) = @_;
sub project_cylinder_tri {
my ($t) = @_;