示例#1
0
def getParam():

    nDis = pmw.intField("nDist", query=True, value=True)
    aDis = pmw.intField("aDist", query=True, value=True)
    vDis = pmw.intField("vDist", query=True, value=True)

    aFact = pmw.intField("aFact", query=True, value=True)
    cFact = pmw.intField("cFact", query=True, value=True)
    sFact = pmw.intField("sFact", query=True, value=True)

    params = (nDis, aDis, vDis, aFact, cFact, sFact)
    return params
示例#2
0
def getBoundry():

    x1 = pmw.intField("xRange1", query=True, value=True)
    x2 = pmw.intField("xRange2", query=True, value=True)
    y1 = pmw.intField("yRange1", query=True, value=True)
    y2 = pmw.intField("yRange2", query=True, value=True)
    z1 = pmw.intField("zRange1", query=True, value=True)
    z2 = pmw.intField("zRange2", query=True, value=True)

    min_x = min(x1, x2)
    max_x = max(x1, x2)

    min_y = min(y1, y2)
    max_y = max(y1, y2)

    min_z = min(z1, z2)
    max_z = max(z1, z2)

    return min_x, max_x, min_y, max_y, min_z, max_z
示例#3
0
def getVelocity():

    vMin = pmw.intField("vMin", query=True, value=True)
    vMax = pmw.intField("vMax", query=True, value=True)

    return vMin, vMax
示例#4
0
def getNumOfBoids():

    return pmw.intField("numOfBoids", query=True, value=True)
示例#5
0
def getSimLen():

    return pmw.intField("length", query=True, value=True)
示例#6
0
        name_lst.append(str(pnt))
        path_node_models.append(pnt)

    pmw.textScrollList("pathnodes", e=True, removeAll=True, append=name_lst)


with pmw.window(title="Boid Simulation"):

    with pmw.columnLayout(height=1000, width=305, rowSpacing=5) as layout_1:

        with pmw.rowLayout(height=30, backgroundColor=BACKGROUND_COLOR):
            pmw.text(label="Simulation Space", align="center", width=305)

        with pmw.rowLayout(numberOfColumns=3, height=20):
            pmw.text(label="X", align="center", width=100)
            pmw.intField("xRange1", width=100, value=-150)
            pmw.intField("xRange2", width=100, value=150)

        with pmw.rowLayout(numberOfColumns=3, height=20):
            pmw.text(label="Y", align="center", width=100)
            pmw.intField("yRange1", width=100, value=-150)
            pmw.intField("yRange2", width=100, value=150)

        with pmw.rowLayout(numberOfColumns=3, height=20):
            pmw.text(label="Z", align="center", width=100)
            pmw.intField("zRange1", width=100, value=-150)
            pmw.intField("zRange2", width=100, value=150)

        with pmw.rowLayout(numberOfColumns=1,
                           height=30,
                           backgroundColor=BACKGROUND_COLOR):