PDA

View Full Version : Can I create a box like this in Vizard?


Renato Lima
03-31-2011, 02:29 PM
Can I create a box just like this in vizard ? I can easily make it transparent, but I would love to have this effect on its vertices. However, I could not find a way through add.vizbox.

http://dl.dropbox.com/u/7393/box_with_bold_vertices.PNG


Ideas? Thank you very much.

farshizzo
03-31-2011, 02:41 PM
Yeah, just create another box and set the polyMode to viz.POLY_WIRE. Here is some sample code that shows how to achieve this effect:size = [1,1,1]

box = viz.addGroup()

box.faces = vizshape.addBox(size,splitFaces=True,cullFace=Fals e,parent=box)
box.faces.alpha(0.5)
box.faces.color([0.77, 0.90, 0.13])

box.lines = vizshape.addBox(size,lighting=False,cullFace=False ,parent=box)
box.lines.polyMode(viz.POLY_WIRE)
box.lines.lineWidth(6)
box.lines.color([0.24, 0.42, 0])