Exemplo n.º 1
0
 def __init__(self):
     ObjectDepth.__init__(self, None)
     
     self.entity = render_engine.SceneManager.createEntity("ChemistryAtom_" + str(self), chem_env.mesh_sphere)
     self.sceneNode.attachObject(self.entity)
     #self.setScale(ogre.Vector3(0.35, 0.35, 0.35))
     
     self._name = None
     
     self.needNameUpdate = True
Exemplo n.º 2
0
    def __init__(self):
        ObjectDepth.__init__(self, None)

        self.entity = render_engine.SceneManager.createEntity(
            "ChemistryAtom_" + str(self), chem_env.mesh_sphere)
        self.sceneNode.attachObject(self.entity)
        #self.setScale(ogre.Vector3(0.35, 0.35, 0.35))

        self._name = None

        self.needNameUpdate = True
Exemplo n.º 3
0
    def _updateView(self):
        """View update function
        
        Updates state for object
        """
        if self.needNameUpdate:
            self.needNameUpdate = False
            self.entity.setMaterialName(self._getMaterialName())
            self.setText(self._name)

        if self.needStateUpdate:
            self.needStateUpdate = False
            self.entity.setMaterialName(self._getMaterialName())

        ObjectDepth._updateView(self)
Exemplo n.º 4
0
 def _updateView(self):
     """View update function
     
     Updates state for object
     """        
     if self.needNameUpdate:
         self.needNameUpdate = False
         self.entity.setMaterialName(self._getMaterialName())
         self.setText(self._name)
     
     if self.needStateUpdate:
         self.needStateUpdate = False
         self.entity.setMaterialName(self._getMaterialName())
     
     ObjectDepth._updateView(self)
Exemplo n.º 5
0
 def __del__(self):
     ObjectDepth.__del__(self)
     render_engine.SceneManager.destroyEntity(self.entity)
Exemplo n.º 6
0
 def __del__(self):
     ObjectDepth.__del__(self)
     render_engine.SceneManager.destroyEntity(self.entity)