Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - reddragon

#1
Support / cool
March 18, 2006, 12:54:35 AM
yes it works.I use the following :arrow:


InputStream inputstream = getFile("3ds/weapon.3ds");
       Object3D[] miss = Loader.load3DS(inputstream, 2.0F);



private InputStream getFile(String File)
   {
       return getClass().getClassLoader().getResourceAsStream(File);
   }


Thanks for the help :D
#2
Support / error loading 3ds file in a jar
March 16, 2006, 06:31:30 PM
when i try to load a 3ds file in a jar i see this error


Adding Lightsource: 0
Adding Lightsource: 1
Adding Lightsource: 2
Adding Lightsource: 3
Adding Lightsource: 4
Adding Lightsource: 5
Adding Lightsource: 6
Adding Lightsource: 7
Adding Lightsource: 8
Adding Lightsource: 9
Adding Lightsource: 10
Adding Lightsource: 11
Loading Texture...from InputStream
Loading Texture...from InputStream
Loading file from InputStream
[ Thu Mar 16 13:22:32 VET 2006 ] - ERROR: Couldn't read file from InputStream
[ Thu Mar 16 13:22:32 VET 2006 ] - ERROR: Not a valid 3DS file!
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
       at JPCTDemo.<init>(JPCTDemo.java:271)
       at JPCTDemo.main(JPCTDemo.java:151)




i use this code


Object3D[] miss=Loader.load3DS(getFile("3ds"+c+"weapon.3ds"), 2);

   public java.io.InputStream getFile(String File)
   {
       return (RMain.class.getClassLoader().getResourceAsStream(File));
   }