Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Refers to the missing type Point3d" in J3D API (Java)

Tags:

java

3d

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.

like image 642
NewJavaProgrammer Avatar asked Sep 14 '26 01:09

NewJavaProgrammer


1 Answers

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:

  1. Visit the site you recommended
  2. Choose the correct installer for your system architecture
  3. Run the installer
  4. Open your Eclipse project
  5. Add external jars under the Java Build Path properties. Go to the directory where Java3D was installed. Choose all 3 jar files.
  6. 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 :)

like image 73
demongolem Avatar answered Sep 16 '26 14:09

demongolem



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!