Added flipped persp coll plane

This commit is contained in:
Gyedo Jeon 2010-05-15 00:13:40 +00:00
parent b413bdbf5b
commit 07eda4ee55
2 changed files with 10 additions and 0 deletions

View File

@ -230,6 +230,14 @@ class Viewport(wx.Panel, DirectObject):
collPlane.setIntoCollideMask(BitMask32.bit(21)|oldBitmask)
v.collPlane = NodePath(collPlane)
v.collPlane.reparentTo(v.grid)
collPlane2 = CollisionNode('PerspGridCol2')
collPlane2.addSolid(CollisionPlane(Plane(0, 0, -1, 0)))
oldBitmask = collPlane2.getIntoCollideMask()
collPlane2.setIntoCollideMask(BitMask32.bit(21)|oldBitmask)
v.collPlane2 = NodePath(collPlane2)
v.collPlane2.reparentTo(v.grid)
#v.grid.gridBack.findAllMatches("**/+GeomNode")[0].setName("_perspViewGridBack")
LE_showInOneCam(v.grid, 'persp')
return v

View File

@ -178,6 +178,8 @@ class WxPandaShell(WxAppShell):
base.direct.manipulationControl.supportMultiView()
base.direct.cameraControl.useMayaCamControls = 1
base.direct.cameraControl.perspCollPlane = self.perspView.collPlane
base.direct.cameraControl.perspCollPlane2 = self.perspView.collPlane2
for widget in base.direct.manipulationControl.widgetList:
widget.setBin('gui-popup', 0)
widget.setDepthTest(0)