![]() |
#7
|
|||
|
|||
Unfortunately, the project is many large files, so I can't post the whole thing. I can try posting relevant sections, but it would be difficult to get it working isolated.
#loads all environmental objects class Environment: def __init__(self, config, link): self.link = link #clear the scene ### THIS IS NOT WORKING #for child in viz.MainScene.getChildren(): # child.remove() backgroundcolor = config.GetVector('vDisplayBackgroundColor') viz.clearcolor(backgroundcolor) self.court = viz.addTexQuad(viz.WORLD, viz.MainScene, 100) self.court.setEuler(0,90,0) #grass field if config.GetBool('bEnvGroundTexture'): grass = viz.addTexture('res/grass.jpg') grass.wrap(viz.WRAP_T, viz.REPEAT) grass.wrap(viz.WRAP_S, viz.REPEAT) scale = viz.Transform() scale.setScale(10,10,1) self.court.texmat(scale) self.court.texture(grass) #green plane else: self.court.color(0,.3,0) self.court.disable(viz.LIGHTING) |
|
|