POV-Ray : Newsgroups : povray.programming : this : Re: this Server Time
28 Jul 2024 18:12:14 EDT (-0400)
  Re: this  
From: Rafal 'Raf256' Maj
Date: 25 Jun 2002 15:48:01
Message: <Xns9238DD41336F7raf256com@204.213.191.226>
"Thorsten Froehlich" <tho### [at] trfde> wrote in 
news:3d18c6c4@news.povray.org:

>> because this is needed to pass current object (this) to other function.
>> same as in C++ you would write draw(this);  and not :
>> temporary_object = { ... };
>> draw(temporary_object);
> Not really.  As you cannot reference other objects than the current one
> anyway you would not need to pass that information, it would already be
> known.

hmm ? this is simple - example :


#declare tempObj = union { 
  ........
 }
#declare tempObj = object { tempObj translate max_extent(tempObj).x*3 }
object { tempObj rotate y*3 }
#declare tempObj = object { tempObj translate max_extent(tempObj)*9 }

wouldn't it be nicer to write above just as :

union {
 ........
 translate max_extent( this ).x*3
 rotate y*3
 translate max_extent( this )*9
}

?

it IS easy to implement - as I shown few posts before, even I can myself 
write it, but as pre-procesor function (because I dont have now time/skill 
to modify POV sources itself)

-- 


Post a reply to this message

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