Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (498)
Games in Android Showcase (115)
games submitted by our members
Games in WIP (562)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  GeometryInfo getCoordinates() vs. setCoordinates() ?  (Read 2506 times)
0 Members and 1 Guest are viewing this topic.
Offline jiapei100

Junior Member





« Posted 2010-11-21 13:39:04 »


Hi, all:

Sorry for my stupid question but I've got to ask all of you a question...
I debugged into ObjectFile.class and try to understand how to use setCoordinates() and getCoordinates()...

After loading a 3D object from the file "a.obj", the debug information at the following line in file ObjectFile.class tells that
coordArray is of length 75,972
1  
gi.setCoordinates(coordArray);


However, after "a.obj" has been loaded into a Scene "s" and I just use the following lines of code
1  
2  
3  
4  
5  
BranchGroup bg = s.getSceneGroup();
Shape3D obj3d = (Shape3D)bg.getChild(0);
GeometryArray ga = (GeometryArray)obj3d.getGeometry();
GeometryInfo gi = new GeometryInfo( ga );
Point3f[] myCoordArray = gi.getCoordinates();

The length of myCoordArray is 183,947 .

It's strange that getCoordinates() and setCoordinates() of GeometryInfo are not a pair ?? Am I right?
Furthermore, how to update the coordinates  (in .obj file, the "v" lines) in a Shape3D ?
I mean, if I loaded a .obj file, setCoordinates() will load 75,972 "v"s.
But, I would like to update these loaded coordinates with another 75,972 coordinates.
I thought I could make it just by another setCoordinates() of GeometryInfo, however, the loaded object displays wrongly.
Then, I tested why it's wrong by getCoordinates().
I found, although the original setCoordinates() only affords 75,972 coordinates,
after loading the object, getCoordinates() informs 183,947 coordinates.

Where am I wrong? And How to update those coordinates?

Thanks very much.

Best Regards
JIA






Welcome to Vision Open
http://www.visionopen.com
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 799
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #1 - Posted 2010-11-21 13:42:20 »

I'm not trying to sound harsh, but you've been told time and time again that Java3D is dead technology. Nobody uses it, nobody supports it, nobody patches it. If you still decide to use Java3D, you're pretty much on your own.

Sorry.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline jiapei100

Junior Member





« Reply #2 - Posted 2010-11-21 14:32:31 »


Hi, Riven:

Thanks for your reply!! Java3D is dead. What is alive?
I was told that JOGL is dead as well.
The only thing alive is JME ?

Any other suggestions? Many thanks.

Best Regards
JIA


I'm not trying to sound harsh, but you've been told time and time again that Java3D is dead technology. Nobody uses it, nobody supports it, nobody patches it. If you still decide to use Java3D, you're pretty much on your own.

Sorry.

Welcome to Vision Open
http://www.visionopen.com
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline kappa
« League of Dukes »

JGO Kernel


Medals: 77
Projects: 15


★★★★★


« Reply #3 - Posted 2010-11-21 14:37:36 »

Any other suggestions? Many thanks.

JMonkeyEngine 2 & 3
Ardor3D
Xith3D Pretty similar to Java3D API wise
jPCT
JOGL2
LWJGL
Offline tom
« Reply #4 - Posted 2010-11-21 19:34:27 »

I'm not trying to sound harsh, but you've been told time and time again that Java3D is dead technology. Nobody uses it, nobody supports it, nobody patches it. If you still decide to use Java3D, you're pretty much on your own.

Sorry.
Some people in the scientific community uses it.
There is no active development but bugfixes reported by the community can be checked in.

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

radar3301 (10 views)
2014-09-21 23:33:17

BurntPizza (28 views)
2014-09-21 02:42:18

BurntPizza (18 views)
2014-09-21 01:30:30

moogie (20 views)
2014-09-21 00:26:15

UprightPath (27 views)
2014-09-20 20:14:06

BurntPizza (29 views)
2014-09-19 03:14:18

Dwinin (46 views)
2014-09-12 09:08:26

Norakomi (74 views)
2014-09-10 13:57:51

TehJavaDev (102 views)
2014-09-10 06:39:09

Tekkerue (50 views)
2014-09-09 02:24:56
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!