Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Java 3D / April 2004

Tip: Looking for answers? Try searching our database.

Creating a math vector Class

Thread view: 
hal - 13 Apr 2004 05:58 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.