POV-Ray : Newsgroups : povray.newusers : How to create scene component library? : Re: How to create scene component library? Server Time
28 Jul 2024 20:28:54 EDT (-0400)
  Re: How to create scene component library?  
From: Charles C
Date: 17 Aug 2007 19:30:01
Message: <web.46c62bf9732e5eeee33c01c00@news.povray.org>
Marty Schrader <mar### [at] parsecsystemsinccom> wrote:
> Okay, this is the kind of thing I am trying to sort out. If, for instance, I
> want to make a nose cone component, how do I specify the creation of that shape
> without any reference to whatever other parts may be there in the scene already?

The way to not affect other components is to keep your namespace
clean/consisitent and as Alain said, choose some standards like always
orienting things a certain way.  So if you have multiple nosecone types, if
it were me I'd do something like #macro NoseCone_Type_1() rather than
NoseCone()  Still, objects that have already been placed in a scene won't
be deleted even if their names get overwritten.

> How do I go about creating macros or whatever so that individual parts can be
> included or not without affecting other components?

You can always put one macro per include file as some people (not myself)
advocate.  #ifndef() is very handy for checking to see if something's been
included already or not.

#charles


Post a reply to this message

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