POV-Ray : Newsgroups : povray.newusers : Object names Server Time
4 Nov 2024 23:16:48 EST (-0500)
  Object names (Message 1 to 2 of 2)  
From: David Harmon
Subject: Object names
Date: 18 Aug 2004 16:36:58
Message: <4123bb08.502334515@news.povray.org>
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?


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Object names
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.