Reputation: 53
Apparently the J3D API is NOT included in my version of JDK. I have downloaded the source code for it from Java 3D Downloads: Release Builds — Java.net
I copied both the "vectormath" and "j3d" folders into my "org" folder and changed all the package javax.media.j3d
to package org.j3d
...
My version (Helios) of Eclipse IDE is giving me the error:
The method transform(Point3d, Point4d) from the type Transform3D refers to the missing type Point3d
at transform(direction, xformDirection);
!
The same problem is popping up at A LOT of different places, except with different methods.
Upvotes: 3
Views: 1985
Reputation: 9708
Point3d
should refer to javax.vecmath.Point3d
. That particular class can be found in vecmath-1.3.1.jar
. Do you have that jar included in your project? One possible place to get that if you need it is http://mirrors.ibiblio.org/pub/mirrors/maven/java3d/jars/vecmath-1.3.1.jar.
EDIT
Ok, I went and did a little playing around and here. Try these steps:
Your code should be fine now. Here is a code sample (which does nothing but proves I get no errors anyway) which works for me. Point3d
is correctly recognized.
package main;
import javax.media.j3d.Transform3D;
import javax.vecmath.Point3d;
public class Sneeze {
public void test() {
Point3d p3 = new Point3d(7, 4, 2);
Transform3D t = new Transform3D();
t.transform(p3);
}
}
The only problem I see is if you do not have privileges to install Java3D or otherwise choose not to install it. But if you do not want to install, try the binary download and follow a similar procedure. Hope we got it this time :)
Upvotes: 5