Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (603)
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  
  IDE doesn't found package  (Read 1045 times)
0 Members and 1 Guest are viewing this topic.
Offline ruprecht

Senior Newbie




Do you Linux?


« Posted 2003-01-09 17:03:29 »

Hi,

I'm trying out the Positionexample of the java3d-tutorial. By the compiling of the code I get some errors. One of it is that the package  com.sun.j3d.utils.universe.* can not included into the source.

I'm using netbeans in the linuxversion with jsdk 1.4.0_02. Files that can be related to the packages there are under
/usr/java/j2sdk1.4.0_02/jre/ext/...  Is this the right directory for the sun-j3d-components or have I to install these files to another directory. Normaly netbeans suggest parameters to complete the commands. The java3d related stuff are not suggested.

Regards,
Ruprecht
Offline Breakfast

Senior Devvie




for great justice!


« Reply #1 - Posted 2003-01-09 19:19:44 »

My experience with forte is that the most reliable thing to do is to use the file explorer to mount the jar files in your project.
Offline ruprecht

Senior Newbie




Do you Linux?


« Reply #2 - Posted 2003-01-10 06:38:53 »

Hi,

to ensure that we aren't talking about different. The problem is that netbeans can't import com.sun.j3d.utils.universe.*. Related classes there are installed in the the path posted last and the under directories.

I also try if there is a possibility with the jarfile(s).

Regards,
Ruprecht
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ruprecht

Senior Newbie




Do you Linux?


« Reply #3 - Posted 2003-01-10 10:43:41 »

Hi,

In the meentime I've checked the including with some other examples and found no differences in the line com.sun.j3d.utils.universe.

I still get errors within the code - One error with wrong startingpoint
in the for-loorp and different error relating with the above mentioned including and an error within the startingprocedure.
A class is wanted that was the content of the message.

Here my code:

import com.sun.j3d.utils.geometry.*;
import com.sun.j3d.utils.universe.*;
import javax.media.j3d.*;
import javax.vecmath.*;

public class Position extends applet{
   SimpleUniverse universe = new SimpleUniverse();
   BranchGroup group = new BranchGroup();

   //x-axis made of sphere

   for (float x =-1.0f;x <= 1.0f;x=x+ 0.1f)
   {
       Sphere sphere = new Sphere(0.5f);
       TransformGroup tg = new TransformGroup();
       Transform3D transform = new Transform3d();
       Vector3f vector = new Vector3f(x,-0.f,0.f);
       transform.setTranslation(vector);
       tg.addChild(sphere);
       group.addChild(tg);
   }

   //y-axis made of cones
   //y-axis made of cones

   for (float y=-1.0f;y<=1.0f;y=y+0.1f)
   {
       Cone cone = new Cone(0.5f,0.1f);
       TransformGroup tg = new TransformGroup();
       Transform3D transform = new Transform3d();
       Vector3f vector = new Vector3f(-0.f,y,0.f);
       transform.setTranslation(vector);
       tg.addChild(cone);
       group.addChild(tg);
   }

   //z-axis made of zylinders

   for (float z=1.0f; z<=1.0f; z = z+0.1f)
   {
       Cylinder cylinder = new Cylinder(0.5f,0.1f);
       TransformGroup tg = new TransformGroup();
       Transform3D transform = new Transform3d();
       Vector3f vector = new Vector3f(-0.f,y,0.f);
       transform.setTranslation(vector);
         tg.addChild(sphere);
       group.addChild(tg);
   }

   //y-axis made of cones

   for (float y=-1.0f;y<=1.0f;y=y+0.1f)
   {
       Cone cone = new Cone(0.5f,0.1f);
       TransformGroup tg = new TransformGroup();
       Transform3D transform = new Transform3d();
       Vector3f vector = new Vector3f(-0.f,y,0.f);
       transform.setTranslation(vector);
       tg.addChild(cone);
       group.addChild(tg);
   }

   //z-axis made of zylinders

   for (float z=1.0f; z<=1.0f; z = z+0.1f)
   {
       Cylinder cylinder = new Cylinder(0.5f,0.1f);
       TransformGroup tg = new TransformGroup();
       Transform3D transform = new Transform3d();
       Vector3f vector = new Vector3f(-0.f,y,0.f);
       transform.setTranslation(vector);
       tg.addChild(cone);
       group.addChild(tg);
   }


   Color3f light1Color = new Color3f(.1f,1.4f,.1f); // green light
   BoundingSphere bounds =
   new BoundingSphere(new Point3D(0.0,0.0,0.0),100);
   Vector3f light1Direction = new Vector3f(4.0f,-7.0f,-12.0f);
   DirectionalLight light1 =
   new DirectionalLight(light1Color,lightDirection);
   light1.setInfluencingBounds(bounds);
   group.addChild(light1);
   universe.getViewingPlatform().setNominalViewingTransform();
   //add the group of objects to the Universe

   universe.addBranchGraph(group);
}

public Position();

}
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.

rwatson462 (36 views)
2014-12-15 09:26:44

Mr.CodeIt (29 views)
2014-12-14 19:50:38

BurntPizza (61 views)
2014-12-09 22:41:13

BurntPizza (98 views)
2014-12-08 04:46:31

JscottyBieshaar (58 views)
2014-12-05 12:39:02

SHC (74 views)
2014-12-03 16:27:13

CopyableCougar4 (76 views)
2014-11-29 21:32:03

toopeicgaming1999 (137 views)
2014-11-26 15:22:04

toopeicgaming1999 (127 views)
2014-11-26 15:20:36

toopeicgaming1999 (37 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

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
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!