When using VRML to write scripts one can use javascript to create a new
object that comprises the 3 values for a description of a vector
ie: vec = new SFVec3f(3,4,5); //3,4,5 are the x, y, z components
Access to the components can be referenced in two ways
vec.x or vec[0]
vec.y or vec[1]
vec.z or vec[2]
My question is can this form of accessing the values be reproduced in
Java?
How do I create a class SFVec3f that can hold the three values which be
accessed both ways (above).
Thanks,
Alex
Remove h for email.
========================================
2001: A Space Odyssey in Virtual Reality
http://home.earthlink.net/~alprojects/2001/index.html
Tribute to the World Trade Center in 3D
http://home.earthlink.net/~alprojects/wtc/index.html
Andre Bialojahn - 13 Apr 2004 21:08 GMT
> [SFVec3f(); in Java?]
Why not just have a look at javax.vecmath.Vector3f()?
Accessable as required.
> Remove h for email.
Does "eartlink.net" really work? ;-)
André
hal - 17 Apr 2004 19:02 GMT
Thank you, this helps alot so I don't have to reinvent the wheel.
Alex
> x-no-archive: yes
>
[quoted text clipped - 8 lines]
>
> André
--
Remove first h for email.
========================================
2001: A Space Odyssey in Virtual Reality
http://home.earthlink.net/~alprojects/2001/index.html
Tribute to the World Trade Center in 3D
http://home.earthlink.net/~alprojects/wtc/index.html