![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
is there a way to make an object and call it when u need it. like if you
are making a room full of chairs. instead of making 100 chairs, you could
make one chair and just call it 100 times(about 100 times easier). this is
called a pre-fab (prefabricated design)
please reply via email thanks
joe conklin
--
http://www.geocities.com/siliconvalley/horizon/7128
visit and sign the book
remove "spam" to reply
Joe
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Joe Conklin wrote in message <34d4be8e.0@news.povray.org>...
>is there a way to make an object and call it when u need it. like if you
>are making a room full of chairs. instead of making 100 chairs, you could
>make one chair and just call it 100 times(about 100 times easier). this is
>called a pre-fab (prefabricated design)
>please reply via email thanks
>
> joe conklin
>
>
>--
>http://www.geocities.com/siliconvalley/horizon/7128
>visit and sign the book
>remove "spam" to reply
> Joe
>
>
I'm new myself, but I believe I can help a little.
I'm pretty darn sure there is a way to create an object and then use it as a
pre-fab. I think it has something to do with the
define statement. . .
Good luck,
Ian
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
>
>I think it has something to do with the #define statement. . .
>
> Good luck,
> Ian
>
Uh, did I say #define? I meant #declare! Sheesh! C++ is rubbing off on me!!!
I feel stupid,
Ian
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Hello Ian
As you have guessed, the solution uses #declare. You can define an abject as
follows :
#declare Object_Foo = object {
... a lot of statements to create you object here ...
}
then use it by writing :
// a yellow foo object located at <0, 100, 0>
object {
Object_Foo
pigment {
color Yellow
}
translate <0, 100, 0>
}
// now a red one located at <100, 0, 0> and rotated a bit
object {
Object_Foo
pigment {
color Red
}
rotate z*30
translate <100, 0, 0>
}
To replicate a lot of objects on a regular basis, you can use the loop
statements, so that creating a theater with all its seats will not require
10,000 lines of POV source code but just a small amount of looping code :-)
I have not validated this snippet but I have written stuff similar to it,
and it works.
Hope this will help
Eric
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Ian (JBu### [at] sceinet com) wrote:
: Uh, did I say #define? I meant #declare! Sheesh! C++ is rubbing off on me!!!
Every time I code in C and I want to type a #define -line, I instead
type a #declare line... I think I have used too much povray... ;)
--
- Warp. -
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |