当前位置: 首页>>代码示例>>Python>>正文


Python PartColoredVis.setParams方法代码示例

本文整理汇总了Python中PartColoredVis.PartColoredVis.setParams方法的典型用法代码示例。如果您正苦于以下问题:Python PartColoredVis.setParams方法的具体用法?Python PartColoredVis.setParams怎么用?Python PartColoredVis.setParams使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PartColoredVis.PartColoredVis的用法示例。


在下文中一共展示了PartColoredVis.setParams方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setParams

# 需要导入模块: from PartColoredVis import PartColoredVis [as 别名]
# 或者: from PartColoredVis.PartColoredVis import setParams [as 别名]
    def setParams( self, params, negMsgHandler=None, sendToCover=True):
        """ set parameters from outside
            + init cutting surface module if necessary
            + mainly receive parameter changes from Gui
            + send status messages to COVER if state has changed
        """
        _infoer.function = str(self.setParams)
        _infoer.write("setParams")

        realChange = ParamsDiff( self.params, params )

        PartModuleVis.setParams(self, params, negMsgHandler, sendToCover, realChange)
        PartColoredVis.setParams(self, params, negMsgHandler, sendToCover, realChange)
        PartInteractorVis.setParams(self, params, negMsgHandler, sendToCover, realChange)
        
        if 'isVisible' in realChange:
            if self.params.isVisible:
                self.sendClipPlane()
            else:
                self.sendClipPlaneOFF()

        if (   ('attachedClipPlane_index' in realChange)
            or ('attachedClipPlane_offset' in realChange)
            or ('attachedClipPlane_flip' in realChange)):
            self.sendClipPlane()
开发者ID:nixz,项目名称:covise,代码行数:27,代码来源:PartCuttingSurfaceVis.py

示例2: setParams

# 需要导入模块: from PartColoredVis import PartColoredVis [as 别名]
# 或者: from PartColoredVis.PartColoredVis import setParams [as 别名]
    def setParams( self, params, negMsgHandler=None, sendToCover=True):
        """ set parameters from outside
            + init module if necessary
            + mainly receive parameter changes from Gui
            + send status messages to COVER if state has changed
        """
        realChange = ParamsDiff( self.params, params )  

        PartModuleVis.setParams(self, params, negMsgHandler, sendToCover, realChange)
        PartColoredVis.setParams(self, params, negMsgHandler, sendToCover, realChange)
开发者ID:nixz,项目名称:covise,代码行数:12,代码来源:PartMagmaTraceVis.py

示例3: setParams

# 需要导入模块: from PartColoredVis import PartColoredVis [as 别名]
# 或者: from PartColoredVis.PartColoredVis import setParams [as 别名]
    def setParams( self, params, negMsgHandler=None, sendToCover=True):
        """ set parameters from outside
            + init tracer module if necessary
            + mainly receive parameter changes from Gui
            + send status messages to COVER if state has changed
        """
        _infoer.function = str(self.setParams)
        _infoer.write("setParams")

        realChange = ParamsDiff( self.params, params )

        PartModuleVis.setParams(self, params, negMsgHandler, sendToCover, realChange)
        PartColoredVis.setParams(self, params, negMsgHandler, sendToCover, realChange)
        PartInteractorVis.setParams(self, params, negMsgHandler, sendToCover, realChange)

        if 'use2DPartKey' in realChange: PartInteractorVis.sendInteractorPosibility(self)
开发者ID:nixz,项目名称:covise,代码行数:18,代码来源:PartTracerVis.py

示例4: setParams

# 需要导入模块: from PartColoredVis import PartColoredVis [as 别名]
# 或者: from PartColoredVis.PartColoredVis import setParams [as 别名]
    def setParams( self, params, negMsgHandler=None, sendToCover=True):

        return # TODO: probe is not working at the moment: stuck in saveExecute (data or grid missing)

        """ set parameters from outside
            + init tracer module if necessary
            + mainly receive parameter changes from Gui
            + send status messages to COVER if state has changed
        """
        _infoer.function = str(self.setParams)
        _infoer.write("setParams")

        realChange = ParamsDiff( self.params, params )
        
        PartModuleVis.setParams(self, params, negMsgHandler, sendToCover, realChange)
        PartColoredVis.setParams(self, params, negMsgHandler, sendToCover, realChange)
        PartInteractorVis.setParams(self, params, negMsgHandler, sendToCover, realChange)        
开发者ID:nixz,项目名称:covise,代码行数:19,代码来源:PartPointProbingVis.py

示例5: setParams

# 需要导入模块: from PartColoredVis import PartColoredVis [as 别名]
# 或者: from PartColoredVis.PartColoredVis import setParams [as 别名]
    def setParams( self, params, negMsgHandler=None, sendToCover=True):
        """ set parameters from outside
            + init tracer module if necessary
            + mainly receive parameter changes from Gui
            + send status messages to COVER if state has changed
        """
        _infoer.function = str(self.setParams)
        _infoer.write(" ")
        # save the old variable to delete from colorTable
        oldVariable = self.currentVariable()
        oldTable = None
        if oldVariable!=None and oldVariable!= 'Select a variable':
            if hasattr(self.params.colorTableKey, oldVariable):
                oldTable = globalKeyHandler().getObject(self.params.colorTableKey[oldVariable])

        realChange = ParamsDiff( self.params, params )

        PartModuleVis.setParams(self, params, negMsgHandler, sendToCover, realChange)
        if self.params.color == VARIABLE:
            PartColoredVis.setParams(self, params, negMsgHandler, sendToCover, realChange)
        PartTransform.setParams(self, params, negMsgHandler, sendToCover, realChange)

        needsTransparency = False
        needsShader = False

        if hasattr (params, 'color') and (params.color == NO_COLOR) \
                and ('color' in realChange):
            # disconnect colors module and run the collect module
            # (we dont want to call run since we dont need the children to be executed)
            if not self.__lastColorConnection==None:
                disconnect(self.__lastColorConnection, ConnectionPoint(self._module, 'DataIn0'))
                self.__lastColorConnection=None
            PartModuleVis.run(self, RUN_ALL, negMsgHandler)
            needsTransparency = True
        elif hasattr (params, 'color') and (params.color==RGB_COLOR) \
                and (('color' in realChange) or ('r' in realChange) or ('g' in realChange) or ('b' in realChange)):
            self.__sendColor()
            needsTransparency = True
        elif hasattr (params, 'color') and (params.color==MATERIAL) \
                and (('color' in realChange) or ('r' in realChange) or ('g' in realChange) or ('b' in realChange) \
                  or ('ambient' in realChange) or ('specular' in realChange) or ('shininess' in realChange)):
            self.__sendMaterial()
            needsTransparency = True
        elif hasattr(params, 'transparency') and ('transparency' in realChange):
            needsTransparency = True

        if 'variable' in realChange:
            # if variable changed append key to colorTable dependant keys
            # make sure this part is updated if colormap changes
            if params.variable!=None and params.variable!= 'Select a variable' and params.color == VARIABLE:
                # delete key from old colorTable
                if not  oldTable == None and self.key in oldTable.params.dependantKeys:
                    oldTable.params.dependantKeys.remove(self.key)
                # add key to new colorTable
                cTableObject = globalKeyHandler().getObject(params.colorTableKey[params.variable])
                params.baseObjectName = params.name
                if self.key not in cTableObject.params.dependantKeys:
                    cTableObject.params.dependantKeys.append(self.key)
                    if negMsgHandler:
                        negMsgHandler.internalRecvParams( cTableObject.key, cTableObject.params  )
                        negMsgHandler.sendParams( cTableObject.key, cTableObject.params )

        if ('shaderFilename' in realChange):
            needsTransparency = True
            needsShader = True

        # always send transparency before shader:
        # sendTransparency will ignore any shader transparency but sendShader respects the regular transparency if possible
        if needsTransparency and (params.shaderFilename != ""):
            needsShader = True
        if needsTransparency:
            self.__sendTransparency()
        if needsShader:
            self.__sendShader()
开发者ID:nixz,项目名称:covise,代码行数:76,代码来源:Part2DRawVis.py


注:本文中的PartColoredVis.PartColoredVis.setParams方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。