POV-Ray : Newsgroups : povray.general : Parse Warning: Camera vectors are not perpendicular. : Re: Parse Warning: Camera vectors are not perpendicular. Server Time
2 Aug 2024 06:18:54 EDT (-0400)
  Re: Parse Warning: Camera vectors are not perpendicular.  
From: Sascha Ledinsky
Date: 10 Mar 2005 12:04:01
Message: <42307e01@news.povray.org>
> Ok, so it was the Java3D package that used single precision floats ?

Sort of... I don't know if it can be considered as a bug: The double 
precision 4x4 matrix class (Matrix4d) has a setRotationScale() method 
that takes a Quaternion as argument - either float (Quat4f) or double 
(Quat4d). The thing is, if you use a float quaternion on the double 
matrix, it seems that it does not re-normalize the quaternion after 
conversion to doubles.
Now I do

public void setOrientation(Quat4f orient_float) {
	Quat4d orient_double = new Quat4d(orient_float);
	orient_double.normalize();
	matrix.setRotation(orient_double);
}

which fixes the problem...

I'm not sure if Sun's official J3D package has the same problems - I'm 
using it in an open source project and so I'm forced to use an 
"inofficial" javax.vecmath package :-(

POV-Ray is happy with the new truly double-precision matrix, so I'm 
happy too :-)

Thanks again,
-Sascha


Post a reply to this message

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