Search in sources :

Example 6 with MegaFacade

use of org.twak.tweed.gen.ProfileGen.MegaFacade in project chordatlas by twak.

the class SkelFootprint method meanDistance.

private Double meanDistance(Prof clean, SuperEdge he) {
    SuperLine sl = (SuperLine) he.profLine;
    if (sl == null)
        return null;
    MegaFacade mf = sl.getMega();
    int s = mf.getIndex(he.start), e = mf.getIndex(he.end);
    if (s > e) {
        int tmp = e;
        e = s;
        s = tmp;
    }
    int delta = e - s;
    if (delta >= 8) {
        delta *= 0.2;
        s += delta;
        e -= delta;
    }
    return meanDistance(mf, s, e, clean);
}
Also used : SuperLine(org.twak.viewTrace.SuperLine) MegaFacade(org.twak.tweed.gen.ProfileGen.MegaFacade) MFPoint(org.twak.tweed.gen.FeatureCache.MFPoint)

Aggregations

MegaFacade (org.twak.tweed.gen.ProfileGen.MegaFacade)6 SuperLine (org.twak.viewTrace.SuperLine)6 ArrayList (java.util.ArrayList)4 HalfEdge (org.twak.utils.geom.HalfMesh2.HalfEdge)4 HalfFace (org.twak.utils.geom.HalfMesh2.HalfFace)4 HashMap (java.util.HashMap)3 LinkedHashMap (java.util.LinkedHashMap)3 MFPoint (org.twak.tweed.gen.FeatureCache.MFPoint)3 Line (org.twak.utils.Line)3 CollisionResult (com.jme3.collision.CollisionResult)2 CollisionResults (com.jme3.collision.CollisionResults)2 MatParam (com.jme3.material.MatParam)2 Material (com.jme3.material.Material)2 ColorRGBA (com.jme3.math.ColorRGBA)2 Ray (com.jme3.math.Ray)2 Vector2f (com.jme3.math.Vector2f)2 Vector3f (com.jme3.math.Vector3f)2 Geometry (com.jme3.scene.Geometry)2 Mesh (com.jme3.scene.Mesh)2 Node (com.jme3.scene.Node)2