# Interpretation of Point3f Params

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
2 replies [Last post]
borgie
Offline
Joined: 2006-08-14

Hi All
I am beginner, just started Java3D and am on Chapter2 of Sun's Getting Started tutorial.
I understand that these params represent an x,y,z coord system and are limited to the range -1.0f to 1.0f (quite a large number of values). What I need confirmation or otherwise on is:
If my Canvas3D (the image plate) represents 6 meters by 4 meters, then the x value of the point (0.65f, 0.0f, 0.0f) is 6 x 0.65 = 3.0 meters to right of center of the image plate.
If this is not the case, could someone please refer me to some text, tutorial, etc where these float values are better explained.
Many thanks
Paul

darwinjob
Offline
Joined: 2004-11-16

You got it kinda wrong :) The point3f (as all other point3*) can have any x,y,z values. If this point is used as a GeometryArray (PointArray) in Shape3D - then that represents the point's location in the coordinate space. Look here:

Your canvas3d is connected to the universe via ViewPlatform - it is just yet another object in 3D space with its own location, orientation etc. Let's say you have a Shape3D made of a PointArray with a single point3f (100,100,100) in it. If you attach the Shape3D to BG (see the picture) the point will show up in (100,100,100) of the coordinate system. But to see the point you have to orient the ViewPlatform (think it as a camera) to look at (100,100,100).

PS. There is no relation between the dimension of the canvas3d and point's position in the space.

borgie
Offline
Joined: 2006-08-14

Thanks for the info. Can see things much clearer now. Because I have been using SimpleUniverse so far, didn't know much about ViewPlatform, etc. Thanks for your help.

Paul