Search in sources :

Example 51 with Point2f

use of com.xenoage.utils.math.geom.Point2f in project Zong by Xenoage.

the class MathUtils method normalVectorMean.

/**
 * Returns the normalized normal vector at the second given point.
 * It is the mean value of the normal vector between the first and
 * second and of the normal vector of the second and third point.
 * @deprecated use {@link Point2f#normalVectorMean(Point2f, Point2f, Point2f)} instead
 */
public static Point2f normalVectorMean(Point2f start, Point2f middle, Point2f end) {
    Point2f n1 = normalVector(start, middle);
    Point2f n2 = normalVector(middle, end);
    return n1.add(n2).normalize();
}
Also used : Point2f(com.xenoage.utils.math.geom.Point2f)

Aggregations

Point2f (com.xenoage.utils.math.geom.Point2f)51 BitmapStaff (com.xenoage.zong.musiclayout.stampings.bitmap.BitmapStaff)11 StaffStamping (com.xenoage.zong.musiclayout.stampings.StaffStamping)10 Test (org.junit.Test)10 Color (com.xenoage.utils.color.Color)7 Page (com.xenoage.zong.layout.Page)6 Size2f (com.xenoage.utils.math.geom.Size2f)5 Layout (com.xenoage.zong.layout.Layout)5 ScoreFrame (com.xenoage.zong.layout.frames.ScoreFrame)5 BitmapLine (com.xenoage.zong.musiclayout.stampings.bitmap.BitmapLine)5 Rectangle2f (com.xenoage.utils.math.geom.Rectangle2f)4 FormattedText (com.xenoage.zong.core.text.FormattedText)4 TextMetrics (com.xenoage.utils.font.TextMetrics)3 FormattedTextParagraph (com.xenoage.zong.core.text.FormattedTextParagraph)3 ScoreFrameChain (com.xenoage.zong.layout.frames.ScoreFrameChain)3 ScoreLayout (com.xenoage.zong.musiclayout.ScoreLayout)3 Paint (android.graphics.Paint)2 Point2i (com.xenoage.utils.math.geom.Point2i)2 Size2i (com.xenoage.utils.math.geom.Size2i)2 Score (com.xenoage.zong.core.Score)2