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.


Topics - eye1

Pages: [1]
1
Support / Anyone has experience with working with blender?
« on: May 22, 2013, 05:40:41 pm »
I have a 3ds file. If I load it to jpct engine it is loaded fine. I import/export the file in blender (without any change). Exported file is than imported by the engine normally, but it is not visible in the world. I must be missing something here?

Code: [Select]
Loading file 3ds/forklift.3ds
File 3ds/forklift.3ds loaded...6964 bytes
Processing new material BLACK_PLASTI!
Processing new material CROMED!
Processing new material Material #1!
Processing object from 3DS-file: ELT_COVE
Object 'ELT_COVE_jPCT154' created using 394 polygons and 221 vertices.
Created 83 triangle-strips for object158 in 5 pass(es)

Before:


After:


regards

[attachment deleted by admin]

2
Support / Fenggui with jpct in OpenGL mode
« on: May 21, 2008, 10:11:40 pm »
Hello. It's been a long time since I last wrote here.

I'm trying to integrate fenggui in my warehouse application created some time ago, but I'm having some difficulties.

initialization part
Code: [Select]
         setDefaultEnvironement();
         new Vis3DConfig(this);
         ModelLoader.loadTextures();
         ModelLoader.cacheModels();
         warehouses = WarehouseXMLLoader.load(doc);
         //set first warehouse as default
         warehouse = (WareHouse)warehouses.get(0);
         warehouse.startControllers();
         doc = null;
         warehouse.setDefaultThread(Thread.currentThread());
         buffer = new FrameBuffer(resWidth, resHeight, FrameBuffer.SAMPLINGMODE_HARDWARE_ONLY);
         buffer.enableRenderer(IRenderer.RENDERER_OPENGL, IRenderer.MODE_OPENGL);
         buffer.disableRenderer(IRenderer.RENDERER_SOFTWARE);
for some reason if i dont put sleep here i get an exception
java.lang.IllegalStateException: Mouse must be created.
   at org.lwjgl.input.Cursor.getMaxCursorSize(Cursor.java:136)
        ...

Code: [Select]
         --------ADDED FROM HERE-------
         try
         {
            Thread.sleep(2000);
         }
         catch (InterruptedException ie)
         {}
         LWJGLBinding binding = new LWJGLBinding();
         desk = new org.fenggui.Display(binding);
         buildGUI();
         --------ADDED UNTIL HERE-------
         render();


adding test gui widget
Code: [Select]
      Window mw = new Window();
      desk.addWidget(mw);
      mw.setTitle("TEST EMPTY WINDOW");
      mw.setSize(300, 100);
      mw.setX(100);
      mw.setY(100);
      desk.layout();


rendering part
Code: [Select]
      while (running)
      {
         poll();
         synchronized(warehouse)
         {
             warehouse.doMovement();
             buffer.clear();
             warehouse.renderScene(buffer);
             warehouse.draw(buffer);
         }
         buffer.update();
here i get an exception

java.lang.NullPointerException
   at org.lwjgl.opengl.GL11.glPushAttrib(GL11.java:2495)
   at org.fenggui.render.lwjgl.LWJGLOpenGL.pushAllAttribs(Unknown Source)
   at org.fenggui.Display.display(Unknown Source)
        ...

Code: [Select]
         --------ADDED FROM HERE-------
         desk.display();
         --------ADDED UNTIL HERE-------
         addBliting(buffer);
         buffer.displayGLOnly();
         second = System.nanoTime();
         actualSleepTime = sleepTime - (second - first);
         if (actualSleepTime < 0)
         {
            actualSleepTime = 0;
         }
         long actualMilsec = (long)((float)actualSleepTime/1000000f);
         int actualnanoSec = (int)(actualSleepTime%1000000);
         try
         {
            Thread.sleep(actualMilsec, actualnanoSec);
         }
         catch (InterruptedException ie)
         {}
         first = second;
      }



I checked in fenggui source and it is thrown here

Code: [Select]
    public void pushAllAttribs() {
    GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
    }

Anyone know what I'm doing wrong?

3
Support / saving and seting camera position
« on: March 22, 2007, 02:19:36 pm »
I would like to do this:

At some point I would like to save current camera position and direction. Which i do with getPosition() and getDirection().
I save those numbers to file
Than at some point I would like to retrieve those number and set camera to saved position and direction.
I use setPosition().. but can't find the method setDirection()??

Is there a way i can save the direction and then retrieve it again?
 

4
Support / Texture resizing
« on: February 09, 2007, 02:36:19 pm »
Hello!

I would like to do next thing.

Currently i blit some textures on screen. The textures are designed for highest resolution application will support. I would like to have/program method which will, when i start application, resize the Texture to a size, which will fit configured resolution. Since the Textures must be n^2 in size. The actuall size of image shouldn't be resized. Only content of image. I'll blit then only the part of texture.

Any hints?

5
Support / Object3D.getTransformedCenter().x returns NaN
« on: December 07, 2006, 05:45:31 pm »
Hy!

I'm transacting, adding, removing.. objects in the World and sometimes I get value NaN from getTransformedCenter().x method... Why does this happen? Does anyone know what am I doing wrong?

Kind Regards, Ivan

6
Support / SimpleVector in collection!!!
« on: September 26, 2006, 01:08:22 am »
Hello

I store few SimpleVectors in collection class Hashtable like that

Code: [Select]
protected Hashtable places = new Hashtable();

   public void updateKoordinates()
   {
         SimpleVector place = part.getOrigin();
         place.add(new SimpleVector(-50, -55, 80));
         places.put("0001", place);
         place = part.getOrigin();
         place.add(new SimpleVector(-50, -55, -420));
         places.put("0002", place);
         place = part.getOrigin();
         place.add(new SimpleVector( 50, -55, -420));
         places.put("0003", place);
         place = part.getOrigin();
         place.add(new SimpleVector( 50, -55, 80));
         places.put("0004", place);
    }

   public SimpleVector placePos(String placeNr)
   {
      System.out.println(places.get(placeNr));
      return (SimpleVector)places.get(placeNr);
   }    



The method updateKoordinates() is called only once.
After some time of runing my application and calling method placePos(placeNr)... SimpleVector cordinates are changed. Anyone has idea what could cause that??

Thanks

7
Projects / Warehouse Visualisation
« on: August 01, 2006, 03:46:44 pm »
I will use jpct engine to create commercial product.
3D live warehouse visualisation.  It will be mainly used to visualize automatic HRL warehouses. It will be used for marketing purposes in company i work.

Thaks 4 this great engine. It really helped me so far.

8
Bugs / child --> parent
« on: July 31, 2006, 06:02:00 pm »
Hello

I'm using this code to retrieve current position of Object in world

Code: [Select]
  private SimpleVector getParentTrans(Object3D model)
   {
      Object3D[] parents = model.getParents();
      SimpleVector sv=new SimpleVector();
      for (int i = 0; i < parents.length; i++) {
         if (parents[i] != null) {
            sv.add(parents[i].getTranslation());
            sv.add(getParentTrans(parents[i]));
         }
      }
      return sv;
   }

   public SimpleVector getCurrPosition()
   {
      SimpleVector sv = model.getOrigin();
      sv.add(model.getTranslation());
      SimpleVector par = getParentTrans(model);
      System.out.println("PAR: "+par);
      sv.add(par);
      return sv;
   }


it looks like it works fine!!!


But when I unlink child from parent it look like it is not removed from array which is returned by method Object3D.getParents(). Is that a bug, or i made a mistake??

Regards

Pages: [1]