Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3509 Members - Latest Member: lioneltenel

26. May 2012, 09:40:39 pm
Xith3D CommunityGeneral CategorySupport (Moderator: Marvin Fröhlich)javax.vecmath.Matrix4f.setTranslation issue
Pages: [1]
Print
Author Topic: javax.vecmath.Matrix4f.setTranslation issue  (Read 1560 times)
argenisleon
Just dropped in

Offline Offline

Posts: 4


View Profile Email
« on: 19. April 2007, 06:37:40 pm »

Greetings,
I am having this problem (Netbeans, Windows XP)

init:
deps-jar:
Compiling 1 source file to C:\Documents and Settings\Administrador.DESKTOP\xithTarget\build\classes
compile:
run:
Exception in thread "main" java.lang.NoSuchMethodError: javax.vecmath.Matrix4f.setTranslation(Ljavax/vecmath/Tuple3f;)V
        at org.xith3d.scenegraph.Transform3D.lookAt(Transform3D.java:706)
        at org.xith3d.scenegraph.View.lookAt(View.java:536)
        at org.xith3d.scenegraph.View.<init>(View.java:912)
        at org.xith3d.render.base.Xith3DEnvironment.<init>(Xith3DEnvironment.java:704)
        at org.xith3d.render.base.Xith3DEnvironment.<init>(Xith3DEnvironment.java:729)
        at org.xith3d.render.base.Xith3DEnvironment.<init>(Xith3DEnvironment.java:761)
        at xithtarget.EmptyScene.<init>(EmptyScene.java:25)
        at xithtarget.EmptyScene.main(EmptyScene.java:46)
Java Result: 1
BUILD SUCCESSFUL (total time: 1 second)

I read some post which said that I must delete the vecmath.jar from the java folder but I have this file only in the xith3d folder. I read another post about import the vecmath-kh.jar file. Where can i find this file?

Thanks in advance
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #1 on: 19. April 2007, 07:14:19 pm »

hi, argenisleon. Welcome to Xith3D Smiley.

Please checkout the current SVN trunk. And follow the API changes thread in the news forum to update your project to the current Xith API. The vecmath problem has finally been solved through using org.openmali.vecmath package names for our own vecmath implementation. It doesn't make a big difference, where this vecmath.jar is. But you must have either vecmath.jar or (better) vecmath-kh.jar in your classpath. Everything is included in the trunk.

Hope, this helps.

Marvin
Logged
argenisleon
Just dropped in

Offline Offline

Posts: 4


View Profile Email
« Reply #2 on: 20. April 2007, 08:16:22 pm »

Thanks for the welcome  Smiley

I download the svn code following http://xith.org/tutes/Installing/Xith3D%20Installation%20from%20SVN.pdf.
I create the test program and the library listed below could not be found

import org.xith3d.geometry.Cube;
import org.xith3d.render.base.Xith3DEnvironment;
import org.xith3d.render.canvas.Canvas3DWrapper;
import org.xith3d.render.canvas.Canvas3DWrapper.Resolution;
import org.xith3d.render.loop.RenderLoop;

Any help?
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #3 on: 20. April 2007, 08:36:17 pm »

import org.xith3d.geometry.Cube;
import org.xith3d.render.base.Xith3DEnvironment;
import org.xith3d.render.canvas.Canvas3DWrapper;
import org.xith3d.render.canvas.Canvas3DWrapper.Resolution;
import org.xith3d.render.loop.RenderLoop;

Any help?

Yes. The package names have changed.

org.xith3d.geometry.Cube -> org.xith3d.shapes.Cube
org.xith3d.render.base.Xith3DEnvironment -> org.xith3d.base.Xith3DEnvironment
org.xith3d.render.loop.RenderLoop -> org.xith3d.loop.RenderLoop

Canvas3DWrapper does not exist anymore (as well as Resolution). A Canvas3D is now created like this:
Code:
Canvas3D canvas = Canvas3DFactory.create*( ... );
where the * is either nothing, or Windowed or Fullscreen. Just choose one of the create methods, that you like best.

Please read "Xith3D in a Nutshell" (XIN). It will tell you all the basics about Xith3D including Canvas3D creation, Xith3DEnvironment and RenderLoop. You can get it at xith.org in the Docs section.

Marvin
Logged
argenisleon
Just dropped in

Offline Offline

Posts: 4


View Profile Email
« Reply #4 on: 20. April 2007, 10:02:43 pm »

I am running this test

package org.xith3d.test;

import java.io.File;
import javax.vecmath.Vector3f;
import net.jtank.input.KeyCode;
import org.xith3d.shapes.Cube;
import org.xith3d.loaders.texture.TextureLoader;
import org.xith3d.loaders.texture.TextureStreamLocatorFile;
import org.xith3d.base.Xith3DEnvironment;
import org.xith3d.loop.RenderLoop;
import org.xith3d.scenegraph.BranchGroup;
import org.xith3d.render.Canvas3D;
import org.xith3d.render.Canvas3DFactory;

and i get this

public class XithTest {

   public XithTest() {
      Xith3DEnvironment env = new Xith3DEnvironment();
      Canvas3D canvas = Canvas3DFactory.createWindowed( 800, 600,
      "My empty scene" );
      env.addCanvas( canvas );
      RenderLoop rl = new RenderLoop();
      rl.setMaxFPS( 128f );
      rl.addRenderEngine( env );
//       never forget to start the RenderLoop!
      rl.begin();   
   }

   public static void main(String[] args) {
      new XithTest();
   }
}

Exception in thread "main" Exception in thread "main" java.lang.Error: java.lang.reflect.InvocationTargetException
   at org.xith3d.render.Canvas3DFactory.create(Canvas3DFactory.java:153)
   at org.xith3d.render.Canvas3DFactory.create(Canvas3DFactory.java:174)
   at org.xith3d.render.Canvas3DFactory.create(Canvas3DFactory.java:282)
   at org.xith3d.render.Canvas3DFactory.create(Canvas3DFactory.java:470)
   at org.xith3d.render.Canvas3DFactory.createWindowed(Canvas3DFactory.java:766)
   at org.xith3d.render.Canvas3DFactory.createWindowed(Canvas3DFactory.java:878)
   at org.xith3d.render.Canvas3DFactory.createWindowed(Canvas3DFactory.java:930)java.lang.Error: java.lang.reflect.InvocationTargetException
   at org.xith3d.render.Canvas3DFactory.create(Canvas3DFactory.java:153)
   at org.xith3d.render.Canvas3DFactory.create(Canvas3DFactory.java:174)
   at org.xith3d.render.Canvas3DFactory.create(Canvas3DFactory.java:282)
   at org.xith3d.render.Canvas3DFactory.create(Canvas3DFactory.java:470)
   at org.xith3d.render.Canvas3DFactory.createWindowed(Canvas3DFactory.java:766)
   at org.xith3d.render.Canvas3DFactory.createWindowed(Canvas3DFactory.java:878)
   at org.xith3d.render.Canvas3DFactory.createWindowed(Canvas3DFactory.java:930)
   at org.xith3d.render.Canvas3DFactory.createWindowed(Canvas3DFactory.java:955)
   at org.xith3d.test.XithTest.<init>(XithTest.java:19)
   at org.xith3d.test.XithTest.main(XithTest.java:30)
Caused by: java.lang.reflect.InvocationTargetException
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
   at org.xith3d.render.Canvas3DFactory.createWindowed(Canvas3DFactory.java:955)
   at org.xith3d.test.XithTest.<init>(XithTest.java:19)
   at org.xith3d.test.XithTest.main(XithTest.java:30)
Caused by: java.lang.reflect.InvocationTargetException
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
   at java.lang.reflect.Constructor.newInstance(Unknown Source)
   at org.xith3d.render.Canvas3DFactory.create(Canvas3DFactory.java:149)
   ... 9 more
Caused by: java.lang.UnsatisfiedLinkError: no jogl in java.library.path
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
   at java.lang.reflect.Constructor.newInstance(Unknown Source)
   at org.xith3d.render.Canvas3DFactory.create(Canvas3DFactory.java:149)
   ... 9 more
Caused by: java.lang.UnsatisfiedLinkError: no jogl in java.library.path
   at java.lang.ClassLoader.loadLibrary(Unknown Source)
   at java.lang.ClassLoader.loadLibrary(Unknown Source)
   at java.lang.Runtime.loadLibrary0(Unknown Source)
   at java.lang.Runtime.loadLibrary0(Unknown Source)
   at java.lang.System.loadLibrary(Unknown Source)   at java.lang.System.loadLibrary(Unknown Source)
   at com.sun.opengl.impl.NativeLibLoader$DefaultAction.loadLibrary(NativeLibLoader.java:78)
   at com.sun.opengl.impl.NativeLibLoader.loadLibrary(NativeLibLoader.java:101)
   at com.sun.opengl.impl.NativeLibLoader.access$100(NativeLibLoader.java:47)
   at com.sun.opengl.impl.NativeLibLoader$1.run(NativeLibLoader.java:109)
   at java.security.AccessController.doPrivileged(Native Method)
   at com.sun.opengl.impl.NativeLibLoader.loadCore(NativeLibLoader.java:107)
   at com.sun.opengl.impl.windows.WindowsGLDrawableFactory.<clinit>(WindowsGLDrawableFactory.java:60)
   at com.sun.opengl.impl.NativeLibLoader$DefaultAction.loadLibrary(NativeLibLoader.java:78)
   at com.sun.opengl.impl.NativeLibLoader.loadLibrary(NativeLibLoader.java:101)
   at com.sun.opengl.impl.NativeLibLoader.access$100(NativeLibLoader.java:47)
   at com.sun.opengl.impl.NativeLibLoader$1.run(NativeLibLoader.java:109)
   at java.security.AccessController.doPrivileged(Native Method)
   at com.sun.opengl.impl.NativeLibLoader.loadCore(NativeLibLoader.java:107)
   at com.sun.opengl.impl.windows.WindowsGLDrawableFactory.<clinit>(WindowsGLDrawableFactory.java:60)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Unknown Source)
   at javax.media.opengl.GLDrawableFactory.getFactory(GLDrawableFactory.java:106)
   at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:113)
   at org.xith3d.render.jsr231.CanvasPeerAWTImpl.<init>(CanvasPeerAWTImpl.java:125)
   ... 14 more

   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Unknown Source)
   at javax.media.opengl.GLDrawableFactory.getFactory(GLDrawableFactory.java:106)
   at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:113)
   at org.xith3d.render.jsr231.CanvasPeerAWTImpl.<init>(CanvasPeerAWTImpl.java:125)
   ... 14 more

:S
Any help?
Logged
argenisleon
Just dropped in

Offline Offline

Posts: 4


View Profile Email
« Reply #5 on: 20. April 2007, 10:42:24 pm »

Hi,
The problem was with the jogl.dll file. I copy this to the java/bin path and problem fixed
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #6 on: 20. April 2007, 10:45:48 pm »

Hi,
The problem was with the jogl.dll file. I copy this to the java/bin path and problem fixed

You only need to change the native library location of the jogl.jar in your eclipse. Go to the xith-tk project properties -> Java Build path, select jogl.jar, expand and select native library location. Change this location from Linux to Windows and you're done.

Placing dlls in the java/bin folder is evil.

Marvin
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic