|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |