예제 #1
0
    def __init__(self):
        """
        Initialisation of Renderer() class
        """
        debugMsg("Called Renderer.__init__()")
        BaseRenderer.__init__(self)

        # initialise some attributes
        self.renderWindowWidth = 640
        self.renderWindowHeight = 480

        # what is the name of my renderer?
        self.name = _rendererName

        # initialise the evalstack
        self._evalStack = ""

        # the namespace to run the exec code
        self.renderDict = {}

        # keep the initial setup of the module for later reuse
        self._initStack = ""

        # initialise the renderer module
        self.addToInitStack("# Renderer.__init__()")
        self.addToInitStack("import Gnuplot")
        # Gnuplot package needs Numeric package
        self.addToInitStack("from Numeric import *")

        # need to add a check here to see if the Numeric module has been
        # imported, and if not, throw an error. 

        self.addToInitStack("_gnuplot = Gnuplot.Gnuplot()")
예제 #2
0
    def __init__(self):
        """
        Initialisation of Renderer() class
        """
        debugMsg("Called Renderer.__init__()")
        BaseRenderer.__init__(self)

        # initialise some attributes
        self.renderWindowWidth = 640
        self.renderWindowHeight = 480

        # what is the name of my renderer?
        self.name = _rendererName

        # the namespace to run the exec code
        self.renderDict = {}

        # initialise the evalstack
        self._evalStack = ""

        # keep the initial setup of the module for later reuse
        self._initStack = ""

        # initialise the renderer module
        self.runString("# Renderer._initRendererModule")
        self.addToInitStack("import vtk")
        self.addToInitStack("from numpy import *")
예제 #3
0
    def __init__(self):
        """
        Initialisation
        """
        debugMsg("Called Renderer.__init__()")
        BaseRenderer.__init__(self)  # initialisation of base class
    
        # initialise some attributes
        self.renderWindowWidth = 640
        self.renderWindowHeight = 480

        self.name = _rendererName

        # the namespace to run the exec code
        self.renderDict = {}

        # initialise the evalstack
        self._evalStack = ""

        # keep the initial setup of the module for later reuse
        self._initStack = ""

        # initialise the renderer module
        self.addToInitStack("# Renderer.__init__()")
        self.addToInitStack("import plplot")

        # we now need the Numeric package so can handle arrays better
        self.addToInitStack("from Numeric import *")
예제 #4
0
    def __init__(self):
        """
        Initialisation of Renderer() class
        """
        debugMsg("Called Renderer.__init__()")
        BaseRenderer.__init__(self)

        # initialise some attributes
        self.renderWindowWidth = 640
        self.renderWindowHeight = 480

        # initialise the evalstack
        self._evalStack = ""

        # initialise the initstack
        ### note that in povray, this is the ini file for the pov scene
        self._initStack = ""

        # initialise the renderer module

        self.runString("// Renderer.__init__\n")