WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 01-02-2005, 09:52 PM
vjosh vjosh is offline
Member
 
Join Date: Sep 2004
Posts: 17
Changing the Color of On-the-Fly Objects

Hey,

The vertexcolor function allows you to determine the color of on-the-fly objects when you create them, but is there any way to change the color of already existing on-the-fly objects? The <node3d>.color method doesn't seem to apply.

Thanks!

-Josh
Reply With Quote
  #2  
Old 01-04-2005, 11:48 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

Once you have created an on-the-fly object you can change each vertex color individually using the <node3d>.vertexcolor command. So to change the color of the every vertex you could do something similar to the following:
Code:
object = viz.endlayer()
for v in range(NumberOfVertices):
	object.vertexcolor(v,newcolor)
The next update to Vizard should allow you to use the <node3d>.color command to change the color of the entire on-the-fly object
Reply With Quote
Reply

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


All times are GMT -7. The time now is 01:48 PM.


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