POV-Ray : Newsgroups : povray.general : Object oriented Povray? (Modifying existing objects) : Re: Object oriented Povray? (Modifying existing objects) Server Time
2 Aug 2024 00:14:03 EDT (-0400)
  Re: Object oriented Povray? (Modifying existing objects)  
From: Ross
Date: 28 Feb 2005 18:20:42
Message: <4223a74a$1@news.povray.org>
"Ross" <rli### [at] everestkcnet> wrote in message
news:4223a681$1@news.povray.org...
> "ekolis" <kol### [at] fusenet> wrote in message
> news:web.4223902ef4bf0e27820779d30@news.povray.org...
> > I know you can use #declare statements to create reusable objects, but
is
> > there any way to modify individual instance once they've been
> instantiated?
> > Or is that not a feature of the language at this point? I'm thinking of
> > something like this:
> >
> > #declare ball = sphere
> > {
> >  // basic ball attributes go here
> > }
> >
> > ball ball1, ball2, ball3
> > ball1.translate<0,1,0>
> > ball2.pigment = rgb<1,0,0>
> > ball3.scale<10,10,10>
> >
> > Apologies for the poor syntax; I haven't worked much with raw Povray
code
> > lately!
> >
> >
>
> #declare ball = sphere {
>  1, <0, 1, 0>

oops. that should be
sphere {
 <0, 1, 0>, 1
}

...


Post a reply to this message

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