POV-Ray : Newsgroups : povray.advanced-users : distinguishing types in scene language : Re: distinguishing types in scene language Server Time
3 May 2024 00:26:39 EDT (-0400)
  Re: distinguishing types in scene language  
From: Chris Huff
Date: 7 Oct 2000 22:33:20
Message: <chrishuff-1D6856.21354907102000@news.povray.org>
In article <39d44752@news.povray.org>, "Jan Walzer" 
<j.w### [at] itcampusde> wrote:

> Does it make sense for CODING, to distinguish between COLOR and
> 3/4/5-D -Vector ???
> I often address my Color-Items in the Vector (r,g,b) with x,y and z ...
> Aren't RGB-Color Vectors handled the same way like XYZ-Vectors are ???

The only thing that would really make sense would be 3D vectors and 5D 
colors, I think...it may be that everything is stored internally as 
5-component vectors, but I do not think so.(I know the expression parser 
uses these 5D vectors in some areas, but I really don't understand it 
well enough.)


>     - Integer  (Is there a difference between Float and Integer in POV 
>     ???)

Nope, no difference.


> I think for the correct use of them you have to take care yourself, i.e.
> dont mischange RGBFT and RGBTF ...
> 
> But (maybe for Effects) there is the possibility in POV to assign a 
> RGBFT to a RGBTF or a RGB to a XYZ .... So where should the function 
> know from what it is ??? Maybe it gives you back the type from the 
> time when you last used it, ... or when you declared it, but this 
> would need to give the type when declaring them ...

Colors are RGBFT, no matter what syntax created them. The "xtra" 
components are set to 0.

My revised list:
object
scalar(float)
vector
color
transform
spline
function
macro
texture
normal
finish
material
etc...

A separate function could be useful for differentiating between types of 
objects, but it would probably be better to have it a separate function. 
I'm not sure if it would be better for it to return a string 
representing the type or a number...strings would probably be best.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

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