showCS, hideCS

This commit is contained in:
David Rose 2001-06-26 18:59:16 +00:00
parent 5163d94ec9
commit 793dfb2fe4
1 changed files with 24 additions and 9 deletions

View File

@ -821,14 +821,29 @@
def setAlphaScale(self, alpha):
self.setColorScale(1, 1, 1, alpha)
def showCS(self, mask = None):
"""showCS(self, mask)
Shows the collision solids at or below this node. If mask is
not None, it is a BitMask32 object (e.g. WallBitmask,
CameraBitmask) that indicates which particular collision
solids should be made visible; otherwise, all of them will be.
"""
npc = self.findAllMatches('**/+CollisionNode')
for p in range(0, npc.getNumPaths()):
np = npc[p]
if (mask == None or (np.node().getIntoCollideMask() & mask).getWord()):
np.show()
def hideCS(self, mask = None):
"""hideCS(self, mask)
Hides the collision solids at or below this node. If mask is
not None, it is a BitMask32 object (e.g. WallBitmask,
CameraBitmask) that indicates which particular collision
solids should be hidden; otherwise, all of them will be.
"""
npc = self.findAllMatches('**/+CollisionNode')
for p in range(0, npc.getNumPaths()):
np = npc[p]
if (mask == None or (np.node().getIntoCollideMask() & mask).getWord()):
np.hide()