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


Python DebugObject.DebugObject类代码示例

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


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

示例1: __init__

 def __init__(self, showbase):
     """ Creates a new pipeline """
     DebugObject.__init__(self, "RenderingPipeline")
     self.showbase = showbase
     self.settings = None
     self.ready = False
     self.mountManager = MountManager()
开发者ID:derkreature,项目名称:RenderPipeline,代码行数:7,代码来源:RenderingPipeline.py

示例2: loadSettings

    def loadSettings(self, filename):
        """ Loads the pipeline settings from an ini file """
        self.settings = PipelineSettingsManager()
        self.settings.loadFromFile(filename)

        # This has to be here, before anything is printed
        DebugObject.setOutputLevel(self.settings.pipelineOutputLevel)
开发者ID:derkreature,项目名称:RenderPipeline,代码行数:7,代码来源:RenderingPipeline.py

示例3: __init__

    def __init__(self):
        """ Creates a new ShadowSource. After the creation, a lens can be added
        with setupPerspectiveLens or setupOrtographicLens. """
        self.index = self._generateUID()
        DebugObject.__init__(self, "ShadowSource-" + str(self.index))
        ShaderStructElement.__init__(self)

        self.valid = False
        self.camera = Camera("ShadowSource-" + str(self.index))
        self.camera.setActive(False)
        self.cameraNode = NodePath(self.camera)
        self.cameraNode.reparentTo(Globals.render.find("RPCameraDummys"))
        self.cameraNode.hide()
        self.resolution = 512
        self.atlasPos = Vec2(0)
        self.doesHaveAtlasPos = False
        self.sourceIndex = 0
        self.mvp = UnalignedLMatrix4f()
        self.sourceIndex = -1
        self.nearPlane = 0.0
        self.farPlane = 1000.0
        self.converterYUR = None
        self.transforMat = TransformState.makeMat(
            Mat4.convertMat(Globals.base.win.getGsg().getInternalCoordinateSystem(),
                            CSZupRight))
开发者ID:cesarmarinhorj,项目名称:RenderPipeline,代码行数:25,代码来源:ShadowSource.py

示例4: __init__

    def __init__(self, timeOfDay):
        QtGui.QMainWindow.__init__(self)
        DebugObject.__init__(self, "TimeOfDayEditor")
        self.setupUi(self)

        self.sliders = [
            self.slider00,
            self.slider03,
            self.slider06,
            self.slider09,
            self.slider12,
            self.slider15,
            self.slider18,
            self.slider21,
        ]

        for slider in self.sliders:
            slider.valueChanged.connect(self.sliderChanged)

        self.btnReset.clicked.connect(self.resetProperty)
        self.btnSmooth.clicked.connect(self.smoothProperty)
        self.btnSave.clicked.connect(self.save)
        self.btnGenerateClasses.clicked.connect(self.generateClasses)
        self.currentProperty = None
        self.widget = CurveWidget(self.curveBG)
        self.propertyList.selectionModel().selectionChanged.connect(
            self.selectedProperty)
        self.timeOfDay = timeOfDay
        self.fillList()
        self.savePath = None
        self.autoClassPath = None
        self.shaderIncludePath = None

        self.haveUnsavedChanges = False
        self.applicationMovedSlider = False
开发者ID:aurodev,项目名称:RenderPipeline,代码行数:35,代码来源:TimeOfDayWindow.py

示例5: __init__

    def __init__(self, pipeline):
        """ Creates a new Scattering object with default settings """
        DebugObject.__init__(self, "AtmosphericScattering")

        self.pipeline = pipeline
        self.settings = {
            "radiusGround": 6360.0,
            "radiusAtmosphere": 6420.0,
            "averageGroundReflectance": 0.1, 
            "rayleighFactor": 8.0,
            "betaRayleigh": Vec3(5.8e-3, 1.35e-2, 3.31e-2),
            "mieFactor": 1.2,
            "betaMieScattering": Vec3(4e-3),
            "betaMieScatteringAdjusted": (Vec3(2e-3) * (1.0 / 0.9)),
            "mieG": 0.8,
            "transmittanceNonLinear": True,
            "inscatterNonLinear": True,
            "atmosphereOffset": Vec3(0),
            "atmosphereScale": Vec3(1),
            "sunVector": Vec3(0,1,0)
        }

        # Store all parameters in a pta, that is faster than using setShaderInput
        self.settingsPTA = {}
        self.targets = {}
        self.textures = {}
        self.precomputed = False
        self.sunLight = None

        self.inscatterResult = None
        self.transmittanceResult = None
开发者ID:cesarmarinhorj,项目名称:RenderPipeline,代码行数:31,代码来源:Scattering.py

示例6: __init__

    def __init__(self, pipeline):
        DebugObject.__init__(self, "GlobalIllumnination")
        self.pipeline = pipeline

        # Fetch the scene data
        self.targetCamera = Globals.base.cam
        self.targetSpace = Globals.base.render

        # Store grid size in world space units
        # This is the half voxel grid size
        self.voxelGridSizeWS = Vec3(60)

        # When you change this resolution, you have to change it in Shader/GI/ConvertGrid.fragment aswell
        self.voxelGridResolution = LVecBase3i(256)

        self.targetLight = None
        self.helperLight = None
        self.ptaGridPos = PTALVecBase3f.emptyArray(1)
        self.gridPos = Vec3(0)

        # Create ptas 

        self.ptaLightUVStart = PTALVecBase2f.emptyArray(1)
        self.ptaLightMVP = PTAMat4.emptyArray(1)
        self.ptaVoxelGridStart = PTALVecBase3f.emptyArray(1)
        self.ptaVoxelGridEnd = PTALVecBase3f.emptyArray(1)
        self.ptaLightDirection = PTALVecBase3f.emptyArray(1)

        self.targetSpace.setShaderInput("giLightUVStart", self.ptaLightUVStart)
        self.targetSpace.setShaderInput("giLightMVP", self.ptaLightMVP)
        self.targetSpace.setShaderInput("giVoxelGridStart", self.ptaVoxelGridStart)
        self.targetSpace.setShaderInput("giVoxelGridEnd", self.ptaVoxelGridEnd)
        self.targetSpace.setShaderInput("giLightDirection", self.ptaLightDirection)
开发者ID:croxis,项目名称:RenderPipeline,代码行数:33,代码来源:GlobalIllumination.py

示例7: __init__

 def __init__(self, techniqueName):
     """ Subclasses have to call this. techniqueName should be
     something like "SMAA" """
     DebugObject.__init__(self, "Antialiasing-" + techniqueName)
     self._colorTexture = None
     self._depthTexture = None
     self._velocityTexture = None
开发者ID:aurodev,项目名称:RenderPipeline,代码行数:7,代码来源:Antialiasing.py

示例8: __init__

    def __init__(self, name="DefaultRT"):
        """ Creates a new RenderTarget with the given name. Use a
        descriptive name as it will show with this name in pstats """
        DebugObject.__init__(self, "RenderTarget")
        self._targetFlags = {}
        self._bindMode = GraphicsOutput.RTMBindOrCopy
        self._depthbits = 8
        self._buffer = None
        self._quad = None
        self._sourceCam = Globals.base.cam
        self._sourceWindow = Globals.base.win
        self._width = -1
        self._height = -1
        self._name = name
        self._colorBits = 8
        self._auxBits = 8
        self._region = self._findRegionForCamera()
        self._enableTransparency = False
        self._layers = 0
        self._writeColor = True
        self._multisamples = 0
        self._engine = Globals.base.graphicsEngine
        self._rename(name)

        self.mute()
开发者ID:Happy-Ferret,项目名称:RenderPipeline,代码行数:25,代码来源:RenderTarget.py

示例9: __init__

    def __init__(self, parent=None, x=0, y=0, callback=None, extraArgs=None, radio=False, expandW=100, checked=False):
        DebugObject.__init__(self, "BCheckbox")

        prefix = "Checkbox" if not radio else "Radiobox"

        checkedImg = Globals.loader.loadTexture("Data/GUI/" + prefix + "Active.png")
        uncheckedImg = Globals.loader.loadTexture("Data/GUI/" + prefix + "Empty.png")

        for tex in [checkedImg, uncheckedImg]:
            tex.setMinfilter(Texture.FTNearest)
            tex.setMagfilter(Texture.FTNearest)
            tex.setAnisotropicDegree(0)
            tex.setWrapU(Texture.WMClamp)
            tex.setWrapV(Texture.WMClamp)

        self._node = DirectCheckBox(parent=parent, pos=(
            x + 7.5, 1, -y - 7.5), scale=(15 / 2.0, 1, 15 / 2.0), checkedImage=checkedImg, uncheckedImage=uncheckedImg,
            image=uncheckedImg, extraArgs = extraArgs, state=DGG.NORMAL,
            relief=DGG.FLAT, command=self._updateStatus)

        self._node["frameColor"] = (0, 0, 0, 0.0)
        self._node["frameSize"] = (-2, 2 + expandW / 7.5, -1.6, 1.6)

        self._node.setTransparency(TransparencyAttrib.MAlpha)

        self.callback = callback
        self.extraArgs = extraArgs
        self.collection = None

        if checked:
            self._setChecked(True)
开发者ID:Happy-Ferret,项目名称:RenderPipeline,代码行数:31,代码来源:PipelineGuiManager.py

示例10: __init__

    def __init__(self):
        """ Constructs a new Light, subclasses have to call this """
        DebugObject.__init__(self, "AbstractLight")
        ShaderStructElement.__init__(self)
        self.debugNode = NodePath("LightDebug")
        self.visualizationNumSteps = 32
        self.dataNeedsUpdate = False
        self.castShadows = False
        self.debugEnabled = False
        self.bounds = OmniBoundingVolume()
        self.shadowSources = []
        self.lightType = self.getLightType()
        self.position = Vec3(0)
        self.color = Vec3(1)
        self.posterIndex = -1
        self.direction = Vec3(0)
        self.radius = 10.0
        self.typeName = ""
        self.sourceIndexes = PTAInt.emptyArray(6)
        self.attached = False
        self.shadowResolution = 512
        self.index = -1
        self.iesProfile = -1
        self.iesProfileName = None
        self.mvp = Mat4()

        # A light can have up to 6 sources
        for i in range(6):
            self.sourceIndexes[i] = -1
开发者ID:croxis,项目名称:RenderPipeline,代码行数:29,代码来源:Light.py

示例11: __init__

 def __init__(self):
     """ Creates a new point light. Remember to set a position
     and a radius """
     Light.__init__(self)
     DebugObject.__init__(self, "PointLight")
     self.spacing = 0.5
     self.bufferRadius = 0.0
     self.typeName = "PointLight"
开发者ID:aurodev,项目名称:RenderPipeline,代码行数:8,代码来源:PointLight.py

示例12: __init__

 def __init__(self):
     """ Creates a new render pass manager. There should only be 1 instance
     at a time """
     DebugObject.__init__(self, "RenderPassManager")
     self.renderPasses = {}
     self.staticVariables = {}
     self.dynamicVariables = {}
     self.defines = {}
开发者ID:croxis,项目名称:RenderPipeline,代码行数:8,代码来源:RenderPassManager.py

示例13: __init__

 def __init__(self, pipeline):
     """ Creates the manager and creates the vertex buffer"""
     DebugObject.__init__(self, "DynamicObjectsManager")
     self.pipeline = pipeline
     self.currentIndex = 0
     self.maxVertexCount = 5000000
     self.split = 500
     self.init()
开发者ID:rimij405,项目名称:RenderPipeline,代码行数:8,代码来源:DynamicObjectsManager.py

示例14: __init__

    def __init__(self):
        """ Constructs a new directional light. You have to set a
        direction for this light to work properly"""
        Light.__init__(self)
        DebugObject.__init__(self, "DirectionalLight")
        self.typeName = "DirectionalLight"

        # A directional light is always visible
        self.bounds = OmniBoundingVolume()
开发者ID:aurodev,项目名称:RenderPipeline,代码行数:9,代码来源:DirectionalLight.py

示例15: __init__

    def __init__(self, classType, arraySize):
        """ Constructs a new array, containing elements of classType and
        with the size of numElements. classType and arraySize can't be
        changed after initialization """

        DebugObject.__init__(self, "ShaderStructArray")

        self.arrayIndex = len(self.AllArrays)
        self.AllArrays.append(self)


        self.classType = classType
        self.attributes = classType.getExposedAttributes()

        self.size = arraySize
        self.parents = {}
        self.ptaWrappers = {}
        self.assignedObjects = [None for i in range(arraySize)]

        componentSize = 0

        for name, attrType in self.attributes.iteritems():
            arrayType = PTAFloat
            numElements = 1
            numFloats = 1

            if attrType == "mat4":
                arrayType = PTAMat4
                numFloats = 16

            elif attrType == "int":
                arrayType = PTAInt
                numFloats = 1

            # hacky, but works, will get replaced later by a parser
            elif attrType == "array<int>(6)":
                arrayType = PTAInt
                numElements = 6
                numFloats = 6

            elif attrType == "float":
                arrayType = PTAFloat
                numFloats = 1

            elif attrType == "vec2":
                arrayType = PTALVecBase2f
                numFloats = 2

            elif attrType == "vec3":
                arrayType = PTALVecBase3f
                numFloats = 3

            componentSize += numFloats
            self.ptaWrappers[name] = [
                arrayType.emptyArray(numElements) for i in range(self.size)]

        self.debug("Init array, size =", self.size,"floats=",componentSize,"total =",self.size * componentSize)
开发者ID:croxis,项目名称:RenderPipeline,代码行数:57,代码来源:ShaderStructArray.py


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