Beispiel #1
0
#
########################################################################


"""Test simple functions (i.e. no pointers involved)"""
from OpenGL.GL import *
from OpenGL.GLU import *
from OpenGL.GLUT import *

from pyvisus.core import VisusFont, VisusColor, VisusXMLInterface, VisusOpenGLState
from pyvisus.component import * 
from pyvisus.core import banded, bgry, bry, gamma, \
    hot1, hot2, ice, lighthues, lut16, rich, smooth_rich


gColorMaps={"banded":banded(),
            "brgy":bgry(),
            "bry":bry(),
            "gamma":gamma(),
            "hot1":hot1(),
            "hot2":hot2(),
	        "ice":ice(),
            "lighthues":lighthues(),
            "lut16":lut16(),
	        "rich":rich(),
            "smooth_rich":smooth_rich()
	        }    

window = None
gFocus = None
gRoot = None
Beispiel #2
0
    left = VectorDouble(3)
    right = VectorDouble(3)
    data.domainBoundingBox(left, right)

    gBBox = VisusBoundingBox()
    gBBox.set(left, right)

    createData(func2, 1)

    box = constructWorldBox(gBBox)

    # Create the default scene graph
    #gRoot = VisusSceneNode.construct()
    gRoot = VisusGroup.construct()
    if not gRoot.setValue(gBBox):
        print "Error occurred setting bbox"
    gRoot.mapToWorldBox(box)
    gRoot.drawBoundingBox(True)
    gFocus = gRoot

    colorMap = banded()

    hf = addSlice(gRoot, gDataSet[1], gDataSet[0])
    hf.orientation(VISUS_ORIENTATION_XY)
    hf.setValue(colorMap)

    gValues.append(gRoot)

    # Run The Main
    glutMainLoop()
Beispiel #3
0
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING
#
########################################################################
"""Test simple functions (i.e. no pointers involved)"""
from OpenGL.GL import *
from OpenGL.GLU import *
from OpenGL.GLUT import *

from pyvisus.core import VisusFont, VisusColor, VisusXMLInterface, VisusOpenGLState
from pyvisus.component import *
from pyvisus.core import banded, bgry, bry, gamma, \
    hot1, hot2, ice, lighthues, lut16, rich, smooth_rich

gColorMaps = {
    "banded": banded(),
    "brgy": bgry(),
    "bry": bry(),
    "gamma": gamma(),
    "hot1": hot1(),
    "hot2": hot2(),
    "ice": ice(),
    "lighthues": lighthues(),
    "lut16": lut16(),
    "rich": rich(),
    "smooth_rich": smooth_rich()
}

window = None
gFocus = None
gRoot = None
    VisusGroup,
    VisusIsoValue,
    banded,
    VisusOpenGLState,
)
from pyvisus.component import VisusSphereNode, VisusSceneNode, VisusLabelNode, VisusColorBar
from pyvisus.data import VisusDataRequest, VisusDataSource, VisusDataSourceFactory
from pyvisus.display import VisusMeshDisplay
from pyvisus.extract import VisusAxisAlignedExtractor, VisusColoredIsoSurface
from pyvisus.shared import VisusSharedDataRequest

ISO_NDX = 0
COLOR_NDX = 1

gTime = 0
gColorMap = banded()
gCenter = [None, None, None]
gValues = []
gCurrent = 0
window = None
adata = [None, None]
gFocus = None
gDataSet = [None, None]
gSamples = None
gRoot = None
winWidth = 800
winHeight = 600
gMouseX = 0
gMouseY = 0
gPressed = 0
gMouseMotion = False