Is there no easy way to do that?
Something like:
#declare P1 = <1, 2, 3>
print(P1.y)
=> 2
Or do i have to maintain an extra array to achieve something like that?
From: Warp
Subject: Re: Get only x or y or z coordinate of a vector
Date: 3 Dec 2012 12:14:12
Message: <50bcdde4@news.povray.org>
huiakso <huiakso> wrote:
> Is there no easy way to do that?> Something like:> #declare P1 = <1, 2, 3>> print(P1.y)> => 2
Have you actually *tried* to use "P1.y"? Because it should work exactly
like that.
--
- Warp
From: Stephen
Subject: Re: Get only x or y or z coordinate of a vector
Date: 3 Dec 2012 13:19:32
Message: <50bced34$1@news.povray.org>
On 03/12/2012 5:14 PM, Warp wrote:
> huiakso <huiakso> wrote:>> Is there no easy way to do that?>>> Something like:>> #declare P1 = <1, 2, 3>>> print(P1.y)>> => 2>> Have you actually *tried* to use "P1.y"? Because it should work exactly> like that.>
It does work like that. I am using it in my current project.
e.g.
#declare BoxMax = max_extent (Trace_patch_aa_);
...
#while (Num_z <= BoxMax.z)
...
--
Regards
Stephen