本文整理汇总了Python中DebugObject.DebugObject.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python DebugObject.__init__方法的具体用法?Python DebugObject.__init__怎么用?Python DebugObject.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DebugObject.DebugObject
的用法示例。
在下文中一共展示了DebugObject.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from DebugObject import DebugObject [as 别名]
# 或者: from DebugObject.DebugObject import __init__ [as 别名]
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
示例2: __init__
# 需要导入模块: from DebugObject import DebugObject [as 别名]
# 或者: from DebugObject.DebugObject import __init__ [as 别名]
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)
示例3: __init__
# 需要导入模块: from DebugObject import DebugObject [as 别名]
# 或者: from DebugObject.DebugObject import __init__ [as 别名]
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
示例4: __init__
# 需要导入模块: from DebugObject import DebugObject [as 别名]
# 或者: from DebugObject.DebugObject import __init__ [as 别名]
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
示例5: __init__
# 需要导入模块: from DebugObject import DebugObject [as 别名]
# 或者: from DebugObject.DebugObject import __init__ [as 别名]
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))
示例6: __init__
# 需要导入模块: from DebugObject import DebugObject [as 别名]
# 或者: from DebugObject.DebugObject import __init__ [as 别名]
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
示例7: __init__
# 需要导入模块: from DebugObject import DebugObject [as 别名]
# 或者: from DebugObject.DebugObject import __init__ [as 别名]
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()
示例8: __init__
# 需要导入模块: from DebugObject import DebugObject [as 别名]
# 或者: from DebugObject.DebugObject import __init__ [as 别名]
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)
示例9: __init__
# 需要导入模块: from DebugObject import DebugObject [as 别名]
# 或者: from DebugObject.DebugObject import __init__ [as 别名]
def __init__(self, showbase):
""" Creates a new pipeline """
DebugObject.__init__(self, "RenderingPipeline")
self.showbase = showbase
self.settings = None
self.ready = False
self.mountManager = MountManager()
示例10: __init__
# 需要导入模块: from DebugObject import DebugObject [as 别名]
# 或者: from DebugObject.DebugObject import __init__ [as 别名]
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"
示例11: __init__
# 需要导入模块: from DebugObject import DebugObject [as 别名]
# 或者: from DebugObject.DebugObject import __init__ [as 别名]
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 = {}
示例12: __init__
# 需要导入模块: from DebugObject import DebugObject [as 别名]
# 或者: from DebugObject.DebugObject import __init__ [as 别名]
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()
示例13: __init__
# 需要导入模块: from DebugObject import DebugObject [as 别名]
# 或者: from DebugObject.DebugObject import __init__ [as 别名]
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()
示例14: __init__
# 需要导入模块: from DebugObject import DebugObject [as 别名]
# 或者: from DebugObject.DebugObject import __init__ [as 别名]
def __init__(self, pipeline):
""" Creates the manager and directly setups the passes """
DebugObject.__init__(self, "AntialiasingManager")
self.pipeline = pipeline
self.jitter = False
self.jitterOffsets = []
self.jitterIndex = 0
self.jitterPTA = PTAVecBase2f.emptyArray(1)
self.create()
示例15: __init__
# 需要导入模块: from DebugObject import DebugObject [as 别名]
# 或者: from DebugObject.DebugObject import __init__ [as 别名]
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)