POV-Ray : Newsgroups : povray.general : Announce: IsoCSG include file 0.2.1 : Re: Announce: IsoCSG include file 0.2.1 Server Time
19 Nov 2024 11:33:59 EST (-0500)
  Re: Announce: IsoCSG include file 0.2.1  
From:
Date: 13 Mar 2002 10:49:42
Message: <1ksu8u87s2if4j2vbp9jhh2tfo12e64i2u@4ax.com>
On Wed, 13 Mar 2002 16:28:04 +0100, Christoph Hormann <chr### [at] gmxde>
wrote:

> Yes, but i'm not sure if i will add this, you won't be able to declare
> things like:
>
> #declare fn_1=IC_BBox(-1, 1) 

when you want function then you call

#declare fn_1=IC_Box(-1, 1); // without B

when you want function with container then you call

#declare fn_1=IC_Extents( IC_BBox(-1, 1), V1, V2 );

All user have to convert statement made in your set of macros is to add letter
B in all names and enclose whole function in IC_Extents call.
IC_Extents gets 4 parameters but 2 of them are returned from IC_BBox

> And this would lead to a lot of confusion i think.

With good documentation you can avoid it

> I might add some
> global variables to manage the relevant extends of each macro call.

Note that my example maintained bounding objects instead extents. In
particular when you apply hundreds of small rotations into object then
bounding stored as Min,Max corners can grow up while bounding stored as object
is still the same size.

> This
> way you could easily design the function as now and just use these global
> variables in the 'contained_by{}' statement afterwards (or i could provide
> a 'Create_Container()' macro doing this automatically).

In this case it could be better to name it Get_Container() then direct create
contained_by{} statement. Coordinates are useful for further modifications.

ABX


Post a reply to this message

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