Exemplo n.º 1
0
 def ApplyAttributes(self, attributes):
     Base.ApplyAttributes(self, attributes)
     self.viewport = trinity.TriViewport()
     self.viewport.x = 0
     self.viewport.y = 0
     self.viewport.width = 1
     self.viewport.height = 1
     self.viewport.minZ = 0.0
     self.viewport.maxZ = 1.0
     self.projection = trinity.TriProjection()
     self.frontClip = 1.0
     self.backClip = 350000.0
     self.fieldOfView = 1.0
     self.minPitch = -3.0
     self.maxPitch = 3.4
     self.minZoom = 0.0
     self.maxZoom = 1.0
     self._zoom = 0.5
     self.scene = trinity.EveSpaceScene()
     self.transform = trinity.EveRootTransform()
     self.scene.objects.append(self.transform)
     self.PrepareCamera()
     self.DisplayScene()
     self.CreateBracketCurveSet()
     self.UpdateViewPort()
Exemplo n.º 2
0
 def ApplyAttributes(self, attributes):
     Base.ApplyAttributes(self, attributes)
     self.viewport = trinity.TriViewport()
     self.linegraph = trinity.Tr2LineGraph()
     self.linegraphSize = 0
     self.linegraph.name = 'FPS'
     self.linegraph.color = (0.9, 0.9, 0.9, 1)
     blue.statistics.SetAccumulator(self.linegraph.name, self.linegraph)
     self.renderJob = trinity.CreateRenderJob('Graphs')
     self.renderObject.renderJob = self.renderJob
     self.renderJob.PythonCB(self.AdjustViewport)
     self.renderJob.SetViewport(self.viewport)
     self.renderJob.SetStdRndStates(trinity.RM_SPRITE2D)
     self.renderer = self.renderJob.RenderLineGraph()
     self.renderer.showLegend = False
     self.renderer.lineGraphs.append(self.linegraph)
Exemplo n.º 3
0
 def ApplyAttributes(self, attributes):
     self.viewport = trinity.TriViewport()
     self.viewport.x = 0
     self.viewport.y = 0
     self.viewport.width = 1
     self.viewport.height = 1
     self.viewport.minZ = 0.0
     self.viewport.maxZ = 1.0
     self.projection = trinity.TriProjection()
     self.renderJob = None
     self.frontClip = 1.0
     self.backClip = 350000.0
     self.fieldOfView = 1.0
     self.minPitch = -1.4
     self.maxPitch = 1.4
     self.offscreen = False
     Base.ApplyAttributes(self, attributes)
     self.minZoom = attributes.Get('minZoom', self.default_minZoom)
     self.maxZoom = attributes.Get('maxZoom', self.default_maxZoom)
     self._zoom = 0.5
Exemplo n.º 4
0
 def ApplyAttributes(self, attributes):
     self.viewport = trinity.TriViewport()
     self.viewport.x = 0
     self.viewport.y = 0
     self.viewport.width = 1
     self.viewport.height = 1
     self.viewport.minZ = 0.0
     self.viewport.maxZ = 1.0
     self.projection = trinity.TriProjection()
     self.renderJob = None
     self.frontClip = 1.0
     self.backClip = 350000.0
     self.fov = 1.0
     self.minPitch = -1.4
     self.maxPitch = 1.4
     self.scene = None
     self.offscreen = False
     self.PrepareCamera()
     self._reloadLock = locks.Lock()
     Base.ApplyAttributes(self, attributes)
     self.minZoom = attributes.Get('minZoom', self.default_minZoom)
     self.maxZoom = attributes.Get('maxZoom', self.default_maxZoom)
Exemplo n.º 5
0
 def Close(self):
     Base.Close(self)
     self.renderer.scaleChangeCallback = None
Exemplo n.º 6
0
 def __init__(self, *args, **kwargs):
     self.viewport = trinity.TriViewport()
     Base.__init__(self, *args, **kwargs)
     self.isReady = True
Exemplo n.º 7
0
 def SetParent(self, parent, idx=None):
     Base.SetParent(self, parent, idx)
     wnd = GetWindowAbove(self)
     if wnd:
         wnd.RegisterSceneContainer(self)
Exemplo n.º 8
0
 def UpdateAlignment(self, *args):
     ret = Base.UpdateAlignment(self, *args)
     self.UpdateViewPort()
     return ret
Exemplo n.º 9
0
 def GetAbsolutePosition(self):
     stack = self.GetStack()
     if stack:
         return stack.sr.content.GetAbsolutePosition()
     return Base.GetAbsolutePosition(self)
Exemplo n.º 10
0
 def Enable(self):
     Base.Enable(self)
     self.opacity = 1.0
Exemplo n.º 11
0
 def Disable(self):
     Base.Disable(self)
     self.opacity = 0.3