Exemplo n.º 1
0
    def DisplayFunction(self):
        """ Either executes the present display list or creates a display
        list to display the quad strip. """

        OVERALL, PER_VERTEX, PER_PART, PER_FACE = -1, 10, 11, 12, 13
        #NONE, OVERALL, PER_VERTEX, PER_PART, PER_FACE = -1, 10, 11, 12, 13
        propConst = DejaVu.viewerConst.propConst
        noCol = 0

        if self.viewer.currentCamera.renderMode == GL.GL_SELECT:
            save = self.dpyList
            temp = self.primitiveType
            if self.frontPolyMode == GL.GL_FILL:
                self.primitiveType = GL.GL_POLYGON
            elif self.frontPolyMode == GL.GL_LINE:
                self.primitiveType = GL.GL_LINE_LOOP
            elif self.frontPolyMode == GL.GL_POINT:
                self.primitiveType = GL.GL_POINTS
            self.faceSet = self.IndexedFaceSet
            IndexedPolygons.DisplayFunction(self)
            self.faceSet = self.StripFaceSet
            self.primitiveType = temp
            self.dpyList = save
            return

        if self.dpyList:
            IndexedPolygons.DisplayFunction(self)
Exemplo n.º 2
0
    def DisplayFunction(self):
        """ Either executes the present display list or creates a display
        list to display the triangle strip. """

        # if in select mode, switches to IndexedPolygons
        if self.viewer.currentCamera.renderMode == GL.GL_SELECT:
            temp = self.primitiveType
            if self.frontPolyMode == GL.GL_FILL:
                self.primitiveType = GL.GL_POLYGON
            elif self.frontPolyMode == GL.GL_LINE:
                self.primitiveType = GL.GL_LINE_LOOP
            elif self.frontPolyMode == GL.GL_POINT:
                self.primitiveType = GL.GL_POINTS
            self.faceSet = self.IndexedFaceSet
            IndexedPolygons.DisplayFunction(self)
            self.faceSet = self.StripFaceSet
            self.primitiveType = temp
            return

        if self.dpyList:
            Geom.DisplayFunction(self)
Exemplo n.º 3
0
 def DisplayFunction(self):
     if self.frontPolyMode != self.oldFPM:
         self.RedoDisplayList()
     IndexedPolygons.DisplayFunction(self)