Search in sources :

Example 1 with AbstractSpace

use of spacegraph.space3d.AbstractSpace in project narchy by automenta.

the class DynamicListSpace method show.

/**
 * displays in a window with default force-directed options
 */
@Deprecated
public SpaceGraphPhys3D show(int w, int h, boolean flat) {
    // new SpaceTransform<Term>() {
    // @Override
    // public void update(SpaceGraph<Term> g, AbstractSpace<Term, ?> src, float dt) {
    // float cDepth = -9f;
    // src.forEach(s -> {
    // ((SimpleSpatial)s).moveZ(
    // s.key.volume() * cDepth, 0.05f );
    // });
    // }
    // }
    // new Spiral()
    // //new FastOrganicLayout()
    AbstractSpace ss = flat ? with(new Flatten(0.25f, 0.25f)) : this;
    SpaceGraphPhys3D<X> s = new SpaceGraphPhys3D<>(ss);
    EdgeDirected fd = new EdgeDirected();
    s.dyn.addBroadConstraint(fd);
    fd.attraction.set(fd.attraction.get() * 8);
    // s.ortho(Vis.logConsole(nar, 90, 40, new FloatParam(0f)).opacity(0.25f));
    // Vis.conceptsWindow2D
    // .ortho(logConsole( n, 90, 40, new FloatParam(0f)).opacity(0.25f))
    s.camPos(0, 0, 90).show(w, h);
    return s;
}
Also used : AbstractSpace(spacegraph.space3d.AbstractSpace) Flatten(spacegraph.space2d.container.Flatten) SpaceGraphPhys3D(spacegraph.space3d.SpaceGraphPhys3D) EdgeDirected(spacegraph.space2d.container.EdgeDirected)

Aggregations

EdgeDirected (spacegraph.space2d.container.EdgeDirected)1 Flatten (spacegraph.space2d.container.Flatten)1 AbstractSpace (spacegraph.space3d.AbstractSpace)1 SpaceGraphPhys3D (spacegraph.space3d.SpaceGraphPhys3D)1