|
|
I would really like that POV-4 had associative arrays of heterogeneous
elements. For example:
arr["location"] = <1,1,1>;
arr["texture"] = texture { ... }
arr["show"] = true;
etc.
Why?
Well, with this kind of containers it would be possible to fake object
oriented programming. For example
#macro MySmartBox_Create(this)
this = assoc_array();
this["location"] = 0;
this["side"] = 1;
#end
#macro MySmartBox_Display(this)
object {
this["location"] - <Side/2, Side/2, Side2>,
this["location"] + <Side/2, Side/2, Side2>
texture {
this["texture"]
}
}
#end
etc.
Having associative heterogeneous arrays + macros is all that is needed for
OOP in POVRay.
Post a reply to this message
|
|