Hi Jørn...

Yes, that's right, I meant it should not matter...I'm sorry for typing so
bad, didn't re-read to check.

So let me see if I got this right...when you create a new vector with the
values (x,y,z), it's basically an arrow pointing from the origin to those
coordinates? Or from where is that vector/arrow pointing?

thanx

From: Jørn Cornelius Olsen <[EMAIL PROTECTED]>
Reply-To: Discussion list for Java 3D API <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] class vector3f equals() question
Date: Sat, 27 Dec 2003 21:55:59 +0100

Hi Flavius,

A Vector3f contains three values (x, y and z). Therefore a vector denotes a
direction (not a position) in 3-space. The equals() method will compare the
x-, y- and z-value. You say that it should matter where the vector is in
space, but I suspect that you mean that it should _not_ matter where it is.
As a vector has no concept of a position (consider it relative) you'll do
fine with equals().

To better understand what a vector is consider its counterpart i
one-dimensional space: A distance. That too, has no position - only a
length.

Of course this is only syntax. If you like, you're free to regard a vector
as an absolute position relative to the origin, but in that case I would
use Point3f instead.

Regards
/Jørn

From: Flavius <[EMAIL PROTECTED]>
I was just wondering..the method equals() that compares two vectors...does
it says it compare all the values of the vector..but what values are
those??

Does it compare the length, direction and?

I kinda need to compare two vectors and see if the lenght and direction are
the same, but it should matter where the vector is in space, as long as the
lenght and direction are the same, i.e. two parallell lines (vectors)...

Thank you


=========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".

_________________________________________________________________ Hitta rätt på nätet med MSN Sök http://search.msn.se/

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to