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.


Messages - yxbnnl

Pages: [1] 2
1
Support / object3D pick up
« on: April 20, 2009, 03:50:27 am »
How use mouse pick up objcet3D?

2
Support / Re: Object align(Camera) view Object
« on: April 02, 2009, 10:44:51 am »
When I load 3DS file , how can i get name of material ~?

3
Support / Object align(Camera) view Object
« on: April 02, 2009, 09:18:12 am »
I use to  the align(Camera) of object3D ,How can't saw object3D!

4
Support / Consider adjusting Config.maxPolysVisible!
« on: March 31, 2009, 09:15:33 am »
How to amend this warning?

[ Tue Mar 31 15:22:46 CST 2009 ] - WARNING: You've exceeded the configured triangle limit for the visibility list. Consider adjusting Config.maxPolysVisible!

Thanks!

5
Support / Re: object merged can't control
« on: March 27, 2009, 09:01:47 am »
thanks , i already resolve the questions!
thanks!

6
Support / Re: object merged can't control
« on: March 27, 2009, 06:50:08 am »
Code: [Select]
Object3D[] beetle = Loader.load3DS("impreza" + c + "impreza.3ds", 6f);
car= new Object3D(0);
for (int i = 0; i < beetle.length; i++) {
Object3D part = beetle[i];
part.setCenter(SimpleVector.ORIGIN);
part.rotateX((float) -Math.PI / 2);
part.rotateMesh();
part.setRotationMatrix(new Matrix());
car= Object3D.mergeObjects(car, part);
}
I want use JButton control "car" rotate. but i can't

7
Support / object merged can't control
« on: March 27, 2009, 04:45:08 am »
I try to use mergeObjects() merge an object ,but  the object can't  rotateX , rotateY , rotateZ .

8
Support / Re: can you give me some .3ds file
« on: March 26, 2009, 10:47:05 am »
My email's yxbnnl@163.com

9
Support / can you give me some .3ds file
« on: March 26, 2009, 10:28:24 am »
can you give me some .3ds file of man! :)
or same simple example about controlling the model of persion walking ;

thanks !

10
Support / Re: Mouse to pick up objects
« on: March 24, 2009, 10:10:30 am »
How to use MuseEvent add to  the JFramebuffer ?

11
Support / Re: Mouse to pick up objects
« on: March 24, 2009, 01:57:13 am »
Can you give me some simple example for the interact2D ~
thanks   :)

12
Support / Mouse to pick up objects
« on: March 23, 2009, 09:18:23 am »
 How to use the mouse to pick up objects in the jpct!

13
Bugs / loaderobj error
« on: March 11, 2009, 07:30:03 am »
Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
   at java.lang.Runtime.loadLibrary0(Runtime.java:822)
   at java.lang.System.loadLibrary(System.java:993)
   at org.lwjgl.Sys$1.run(Sys.java:75)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.lwjgl.Sys.doLoadLibrary(Sys.java:68)
   at org.lwjgl.Sys.loadLibrary(Sys.java:84)
   at org.lwjgl.Sys.<clinit>(Sys.java:101)
   at org.lwjgl.opengl.Display.<clinit>(Display.java:111)
   at com.threed.jpct.GLHelper.findMode(Unknown Source)
   at com.threed.jpct.GLHelper.init(Unknown Source)
   at com.threed.jpct.GLRenderer.init(Unknown Source)
   at com.threed.jpct.FrameBuffer.enableRenderer(Unknown Source)
   at com.threed.jpct.FrameBuffer.enableRenderer(Unknown Source)
   at com.threed.jpct.FrameBuffer.enableRenderer(Unknown Source)
   at com.yue.jpct.VW.main(VW.java:24)

14
Support / Object misplace
« on: March 06, 2009, 03:20:20 am »
Hi:It confused me a long time that the objects are misplaced when i load them with JPCT loader or jave 3dsloader. Most objects are not in the right place in the following figure. can you give me an advice how to solve this problem.
thanks a lot.

15
Support / loader3ds object3D setTexture
« on: March 04, 2009, 11:10:48 am »
Hi:
   I have read all  Texture defined in 3ds file and add all Texture in TextureManager.Now I want to add Texture to Object3D.But I dont know
how to select the correct Texture to Object3D.

      code:
import java.awt.Color;
import java.io.File;

import com.threed.jpct.*;

import javax.swing.*;


public class HelloWorldSoftware {

   private World world;
   private FrameBuffer buffer;
   private Object3D car3ds;
   private Object3D[] car;
   private JFrame frame;
   TextureManager  texMan  = null;
   public static void main(String[] args) throws Exception {
      new HelloWorldSoftware().loop();
   }

   public HelloWorldSoftware() throws Exception {
      //Config.saveMemory = true;
      frame=new JFrame("Hello world");
      frame.setSize(800, 600);
      frame.setVisible(true);
      frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
      
      world = new World();
      world.setAmbientLight(0, 255, 0);
      texMan=TextureManager.getInstance();
      char c=File.separatorChar;
      File dir=new File("brick_3ds");
      String[] files=dir.list();
         for (int i=0; i<files.length; i++) {
            String name=files;
            if (name.toLowerCase().endsWith(".jpg")) {
               texMan.addTexture(name, new Texture("brick_3ds/"+name));
            }
         }
      
      car=Loader.load3DS("brick_3ds/brick.3DS",0.2f);
      if(car.length != 0){
         car3ds = car[0];
         //car3ds.setTexture("plant");
         car3ds.setTransparency(2);
         car3ds.setCulling(Object3D.CULLING_DISABLED);
         car3ds.rotateX(-(float)Math.PI/2f);
         car3ds.rotateMesh();
         car3ds.setRotationMatrix(new Matrix());
         //car3ds.setAdditionalColor(new Color(100,100,100));
         car3ds.build();
      }
      world.addObject(car3ds);
      world.getCamera().setPosition(50, -50, -5);
      world.getCamera().lookAt(car3ds.getTransformedCenter());
   }

   private void loop() throws Exception {
      buffer = new FrameBuffer(800, 600, FrameBuffer.SAMPLINGMODE_NORMAL);

      while (frame.isShowing()) {
         car3ds.rotateY(0.01f);
         buffer.clear(java.awt.Color.white);
         world.renderScene(buffer);
         world.draw(buffer);
         buffer.update();
         buffer.display(frame.getGraphics());
         Thread.sleep(10);
      }
      buffer.disableRenderer(IRenderer.RENDERER_OPENGL);
      buffer.dispose();
      frame.dispose();
      System.exit(0);
   }
}


Thank you

Pages: [1] 2