POV-Ray : Newsgroups : povray.newusers : Object names : Re: Object names Server Time
30 Jul 2024 06:28:10 EDT (-0400)
  Re: Object names  
From: Tor Olav Kristensen
Date: 18 Aug 2004 19:01:13
Message: <4123dfb9@news.povray.org>
David Harmon wrote:
> Various things (e.g. trace()) can refer to objects by name, but
> ordinary simple objects don't have names.  I have been creating
> objects with names by basically:
> 
>   #declare obj = object{ "lots of stuff" }
>   obj
> 
> But it feels like having the #declare plus the object itself is
> duplication.  Is there a better way to create the object and
> name it in one step, so as to keep my scene unbloated?

Instead of doing it like (e.g.) this:

#declare YourObject =
   object {
     torus { 4, 1 }
     translate 5*z
     rotate 30*x
   }

- you can just do it like this:

#declare YourObject =
   torus {
     4, 1
     translate 5*z
     rotate 30*x
   }

-- 
Tor Olav
http://subcube.net
http://subcube.com


Post a reply to this message

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