WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-07-2013, 10:10 AM
hzhao hzhao is offline
Member
 
Join Date: Sep 2012
Posts: 18
object on the fly--how to change color of particular vertex

With the following code, I created an object on-the-fly, a green polygon. Then I want to create a vertical transparent stripe, that is, set vertex 2 and 5 to be transparent. But the code doesn't work this way. Why? Thanks!

viz.startLayer(viz.POLYGON)
viz.vertexColor(viz.GREEN)

viz.vertex(0.0,0.0,0.0)
viz.vertex(0.5,0.0,0.0)
viz.vertex(0.6,0.0,0.0)
viz.vertex(1.0,0.0,0.0)
viz.vertex(1.0,1.0,0.0)
viz.vertex(0.6,1.0,0.0)
viz.vertex(0.5,1.0,0.0)
viz.vertex(0.0,1.0,0.0)
target=viz.endLayer()

target.dynamic()

target.setVertexColor(2,[0,0,1,0.2])
target.setVertexColor(5,[0,0,1,0.2])
Reply With Quote
 

Tags
object on-the-fly, transparent, vertex

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I change the text size of slider object? jincheker Vizard 1 08-26-2011 12:20 PM
Possible to change size of a vizshape.addBox object? Renato Lima Vizard 1 10-18-2010 10:51 AM
retrieve Object names Geoffrey Vizard 11 12-11-2009 05:26 AM
Randomly and Continuously Change Avatar's Face Texture Karla Vizard 4 08-22-2008 01:14 PM
get vertex with on the fly object enkeli Vizard 9 05-25-2006 09:27 PM


All times are GMT -7. The time now is 02:47 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC