示例#1
0
    def __init__(self, scene):
        """
        Initialisation of the Camera object

        @param scene: The Scene object to add the Camera object to
        @type scene: Scene object
        """
        Item.__init__(self)
        debugMsg("Called Camera.__init__()")

        # default x,y,z positions of Camera (specific to vtk)
        self.xPos = 0.0
        self.yPos = 0.0
        self.zPos = 3.0

        # default x,y,z positions of the Camers's focal point (specific to vtk)
        self.xFocalPoint = 0.0
        self.yFocalPoint = 0.0
        self.zFocalPoint = 0.0

        # default elevation and azimuth
        self.elevation = 30  ####### we should try for matlab defaults
        self.azimuth = 30

        # keep a reference to the renderer so we can send stuff to it
        self.renderer = scene.renderer

        # some vtk initialisation commands
        self.renderer.runString("# Camera.__init__()\n")

        # initialise the position of the Camera
        self.setPosition(self.xPos, self.yPos, self.zPos)
        self.setFocalPoint(self.xFocalPoint, self.yFocalPoint, self.zFocalPoint)
示例#2
0
    def __init__(self, scene):
        """
        Initialisation of the Plane object

        @param scene: the scene object within which the plane is
        @type scene: Scene object
        """
        Item.__init__(self)
        debugMsg("Called Plane.__init__()")

        self.renderer = scene.renderer
示例#3
0
    def __init__(self, scene=None):
        """
        Initialises the Image class object
        
        @param scene: The Scene object to add to
        @type scene: Scene object
        """
        Item.__init__(self)
        debugMsg("Called Image.__init__()")

        if scene is not None:
            self.renderer = scene.renderer
示例#4
0
    def __init__(self, scene):
        """
        Initialisation of the Text object

        @param scene: The scene with which to associate the text
        @type scene: Scene object
        """
        Item.__init__(self)
        debugMsg("Called Text.__init__()")

        self.font = "Times"

        if scene is None:
            raise ValueError, "You must specify a scene object"
示例#5
0
    def __init__(self, scene):
        """
        Initialisation of abstract Plot class

        @param scene: the scene with which to associate the Plot
        @type scene: Scene object
        """
        Item.__init__(self)
        debugMsg("Called Plot.__init__()")

        if scene is None:
            raise ValueError, "You must specify a scene object"

        self.title = None
        self.xlabel = None
        self.ylabel = None
        self.zlabel = None
示例#6
0
 def __init__(self):
     """
     Initialisation
     """
     debugMsg("Called Item.__init__()")
     BaseItem.__init__(self)