POV-Ray : Newsgroups : povray.advanced-users : explicit vector type-casting in pov : explicit vector type-casting in pov Server Time
6 Oct 2024 14:00:47 EDT (-0400)
  explicit vector type-casting in pov  
From: Tek
Date: 17 Oct 2006 20:10:59
Message: <45357113@news.povray.org>
I have a vector with 4 components and I want to use the first 3 (xyz) as a 
position, in a sphere sweep. But pov gives me "vector expected but color 
expression found". As far as I can see the only way round this is the very 
ugly <V.x,V.y,V.z>, because expresions like <1,1,1>*V start by promoting 
<1,1,1> to a 4-component vector!

So, am I missing something? Is there some easy short hand to tell pov that 
it's allowed to demote the vector to the appropriate type? really I want 
something as simple as V.xyz, or even just V with it being implicit. Why 
doesn't pov like 4D vectors for a 3D property, when x, y, and z are well 
defined?

Anyway, I'll do it the long winded way until someone educates me on this 
subject! ;-)

-- 
Tek
http://evilsuperbrain.com


Post a reply to this message

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