POV-Ray : Newsgroups : povray.general : Camera in union? : Re: Camera in union? Server Time
10 Aug 2024 20:57:55 EDT (-0400)
  Re: Camera in union?  
From: Chris Huff
Date: 3 Nov 1999 15:49:19
Message: <3820A06C.D0051EB@yahoo.com>
However, the ability to "attach" a point to the object, and have the
point be automatically transformed with the object, would be nice. Of
course, it would require that the object be #declare'd or #local'd.

#declare Head =
OBJECT {
    blahblah
    #attach Center = < 0, 1, 0>;
}

#transform Head, TRANSFORM;

#declare HeadCenter = Head.Center;
or
camera {location Head.Center look_at < 0, 0, 0> angle 35}

Notice the #attach command, which would attach a point to the object,
and the #transform command, which would transform an object without
redefining it. #declare would make a new object, with it's own
#attach'ed variables, and the variables would be initialized to the
original, so #declare could be used to do the same thing without this
addition.
If this is done, perhaps #attach should be #attach_point, which would
attach a transformable point to the object, and #attach would just
attach a variable of any type to the object. This could lead to some
interesting data structures, maybe there should be a void {} object type
which would just be a container for attached variables.

Alternatives for #attach that I can think of:
#link and #link_point
#bind and #bind_point
Any suggestions? Perhaps I will attempt to implement this, it shouldn't
be *that* hard.
Hmm, perhaps this should be in a thread of it's own...


Post a reply to this message

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