Example #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
Example #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
Example #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)
Example #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)
Example #5
0
 def __del__(self):
     ObjectDepth.__del__(self)
     render_engine.SceneManager.destroyEntity(self.entity)
Example #6
0
 def __del__(self):
     ObjectDepth.__del__(self)
     render_engine.SceneManager.destroyEntity(self.entity)