POV-Ray : Newsgroups : povray.programming : Porting away from VECTOR : Re: Porting away from VECTOR Server Time
19 Apr 2024 15:23:14 EDT (-0400)
  Re: Porting away from VECTOR  
From: clipka
Date: 24 May 2014 13:53:45
Message: <5380dca9@news.povray.org>
Am 08.03.2014 09:23, schrieb Le_Forgeron:
> Le 08/03/2014 03:29, Nicolas Alvarez nous fit lire :
>> (By the way, why does Vector3d have an array instead of just three members?)
>>
> Just my guess: you cannot loop over members.

More to the point, you can't index into members. Some internal code is 
optimized in such a way that it needs to give one of the axes special 
treatment (e.g. the axis closest to the direction in which a vector is 
facing); in such cases, index variables are used for the axes rather 
than hard-coded X=0, Y=1 and Z=2.


Post a reply to this message

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