Пример #1
0
    def __init__(self, scene):
        """
        Initialisation of the Camera object

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

        # 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
        # these need to be set to the matlab defaults
        self.elevation = 30
        self.azimuth = 30

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

        # 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):
     """
     Initialisation of the Text object
     """
     debugMsg("Called Text.__init__()")
     Item.__init__(self)
     self.font = "Times"
Пример #3
0
    def __init__(self, scene):
        """
        Initialisation of the Plane object
        """
        debugMsg("Called Plane.__init__()")
        Item.__init__(self)

        self.renderer = scene.renderer

        if scene is None:
            raise ValueError, "You must specify a scene object"
Пример #4
0
    def __init__(self, scene=None):
        """
        Initialises the Image class object
        
        @param scene: The Scene object to add to
        @type scene: Scene object
        """
        debugMsg("Called Image.__init__()")
        Item.__init__(self)

        if scene is not None:
            self.renderer = scene.renderer
Пример #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
        """
        debugMsg("Called Plot.__init__()")
        Item.__init__(self)

        self.renderer = scene.renderer

        self.title = None
        self.xlabel = None
        self.ylabel = None
        self.zlabel = None

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