prev index next |
Subroutines
and Include Files
|
POV-Ray Tips,
Tricks, and Techniques |
Parameter
Passing?
|
Lee asks: | Do others have this problem with POV-Ray? After
defining an object, I want to change some aspect of it, without going back
into the object itself or changing #declares.
|
|
Steve Demlow responds:
|
You can do this in a crude way using variables and #includes.
Put your object that you want to create multiple instances of into a file
by itself, with the aspects that you want to change represented by variables.
Then, in your main scene file, set the variables to the appropriate values and #include the object file. Repeat as needed. For your example, put the following in "legoman.inc": object {
Then in your main scene file: #declare left_arm_angle = <45,0,0>
#declare right_arm_angle = <60,0,0>
etc. See the sphereflake and Menger sponge sample files in the POV-Ray distribution for examples of this. |