POV-Ray : Newsgroups : povray.advanced-users : Count all objects in union object Server Time
29 Apr 2024 04:56:48 EDT (-0400)
  Count all objects in union object (Message 1 to 3 of 3)  
From: bublible
Subject: Count all objects in union object
Date: 21 Mar 2015 10:15:00
Message: <web.550d7cd2c83c880b91df8500@news.povray.org>
How can I count all objects that are in union object and apply some changes to
them? I am coming from FLASH/PHP/JS world and for this I would use "for...in" -
how could be this implemented in Povray please?


Post a reply to this message

From: Le Forgeron
Subject: Re: Count all objects in union object
Date: 21 Mar 2015 12:58:49
Message: <550da349$1@news.povray.org>
Le 21/03/2015 15:14, bublible a écrit :
> How can I count all objects that are in union object and apply some changes to
> them? I am coming from FLASH/PHP/JS world and for this I would use "for...in" -
> how could be this implemented in Povray please?

Once a union's definition is done, it's done.

With the official povray, there is no access to components of CSG.

You need to apply the change while still defining the union.

In some unofficial development, you might a copy of a part of an union
(it would still be a copy, the original would remain as it was when
defined):

>
http://wiki.povray.org/content/User:Le_Forgeron#Getting_a_copy_of_an_object_inside_a_CSG

The number of first-rank components, yet to be documented, is given by
children{...}

Whatever, when defining an object (even a csg), you only have one chance
to make a good first impression.


Post a reply to this message

From: clipka
Subject: Re: Count all objects in union object
Date: 22 Mar 2015 05:39:13
Message: <550e8dc1$1@news.povray.org>
Am 21.03.2015 um 17:58 schrieb Le_Forgeron:

> In some unofficial development, you might a copy of a part of an union
> (it would still be a copy, the original would remain as it was when
> defined):
>
>>
http://wiki.povray.org/content/User:Le_Forgeron#Getting_a_copy_of_an_object_inside_a_CSG

I think that branch doesn't get half as much attention as it deserves.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.