Skip to main content

loading a obj and updating his position

No replies
DiSCLAiMER
Offline
Joined: 2011-11-24
Points: 0

ok, i looked at the objload example from java3d api examples, it works but i need to refresh the position of the obj loaded from the main function, how to access to the obj loaded model and update his position or pov? I can change his initial position if I write code on

 createSceneGraph() and using functions like rotX rotY but how to do the same from the main function?<br />
<font color="#7f0055"><b>public</b></font> <font color="#7f0055"><b>static</b></font> <font color="#7f0055"><b>void</b></font> main(<font color="#7f0055"><b>final</b></font> <a href="http://www.java2s.com/Open-Source/Java-Document/6.0-JDK-Core/lang/java/lang/String.java.htm"><b>String</b></a> args[]) {                 java.awt.EventQueue.invokeLater(<font color="#7f0055"><b>new</b></font> <a href="http://www.java2s.com/Open-Source/Java-Document/6.0-JDK-Core/lang/java/lang/Runnable.java.htm"><b>Runnable</b></a>() {                     <font color="#7f0055"><b>public</b></font> <font color="#7f0055"><b>void</b></font> run() {                         <a href="http://www.java2s.com/Open-Source/Java-Document/6.0-JDK-Modules/java-3d/org/jdesktop/j3d/examples/objload/ObjLoad.java.htm"><b>ObjLoad</b></a> objLoad = <font color="#7f0055"><b>new</b></font> <a href="http://www.java2s.com/Open-Source/Java-Document/6.0-JDK-Modules/java-3d/org/jdesktop/j3d/examples/objload/ObjLoad.java.htm"><b>ObjLoad</b></a>(args);                         objLoad.setVisible(<font color="#990000"><b>true</b></font>);                     }                 });             }