[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gets vertical skylines from grob stencils (issue 5626052)

From: joeneeman
Subject: Re: Gets vertical skylines from grob stencils (issue 5626052)
Date: Sat, 14 Jul 2012 14:01:08 +0000

Just looked at skyline-related stuff for now...
File lily/ (right):
lily/ Real p1 = left->end_ * left->slope_ +
use left->height (left_end_) instead of calculating it by hand
lily/ Real p2 = i->start_ * i->slope_ + i->y_intercept_;
i->height (i->start_)
lily/ center->y_intercept_ = p2 - (center->end_ *
I think that *center = Building (center->start_, p1, p2, center->end_)
is clearer
lily/ while (dirty);
I don't understand this do while (dirty) part. It seems to me that
unless you have two empty segments in a row, you only need one pass. On
the other hand, if you have two empty segments in a row then this
function will fail anyway because you will end up setting center->slope_
and center->y_intercept_ both to -infinity, which is bound to start
creating NaN sooner or later.
File lily/include/skyline.hh (right):
lily/include/skyline.hh:58: NOT_ENOUGH_INFO
I wish I could convince you to think of a skyline as a region instead of
just the boundary of that region. Once you think of it that way, it
becomes clear that this information can be easily obtained from the
Skyline_pair, using the existing distance function.

Suppose s and t are Skyline_pairs.
max(s[UP].distance(t[DOWN]), s[DOWN].distance(t[UP])) = -infinity
means the objects don't overlap horizontally at all, so it's meaningless
to talk about which one is higher (I think this is what you're calling

min(s[UP].distance(t[DOWN]), s[DOWN].distance(t[UP])) > 0
means that the objects intersect.

s[UP].distance(t[DOWN]) <= 0 and s[DOWN].distance(t[UP]) > 0
means that s is below t

t[UP].distance(s[DOWN]) <= 0 and t[DOWN].distance(s[UP]) > 0
means that t is below s
File lily/ (right):
lily/ */
Since padding doesn't seem to be involved in this function, you should
delete this comment.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]