POV-Ray : Newsgroups : povray.general : Q: dot operators : Re: dot operators Server Time
13 Aug 2024 03:11:57 EDT (-0400)
  Re: dot operators  
From: Dan Connelly
Date: 18 Nov 1998 21:53:20
Message: <36538816.64DE2D5B@flash.net>
You could do a macro solution :

#macro SetComponent3D(V1, C, V2)
  C * V2 + (<1, 1, 1> - C) * V1
#end

#declare MyArray[Dim1][Dim2][Dim3][Dim4] =
  SetComponent3D (
    MyArray[Dim1][Dim2][Dim3][Dim4],
    y,
    stuff * MyArray[Dim1][Dim2][Dim3][Dim4]
  )

Okay, so it's not terribly elegent, but perhaps
it's better than nothing....

Margus Ramst wrote:
> This would be much more elegant:
> 
> #declare MyArray[Dim1][Dim2][Dim3][Dim4].y=
>          MyArray[Dim1][Dim2][Dim3][Dim4].y*Stuff;
> 
> I'm just lazy, I guess...



-- 
http://www.flash.net/~djconnel/


Post a reply to this message

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