Ok, I changed it.
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
public void addToWareHouse(WareHouse warehouse, SimpleVector origin)
{
getPart(PART_MODEL).setOrigin(origin);
warehouse.addObject(getPart(PART_MODEL));
System.out.println("first:" + getPart(PART_MODEL).getCenter() + " - " + getPart(PART_MODEL).getOrigin());
getPart(PART_MODEL).build();
System.out.println("second:" + getPart(PART_MODEL).getCenter() + " - " + getPart(PART_MODEL).getOrigin());
this.warehouse = warehouse;
}
first:(0.0,0.0,0.0) - (0.0,-2500.0,0.0)
second:(-845.3932,734.2141,-306.81332) - (0.0,-2500.0,0.0)
first:(0.0,0.0,0.0) - (0.0,-2500.0,0.0)
second:(-0.028999299,-2.2083154,0.854877) - (0.0,-2500.0,0.0)
public void addToWareHouse(WareHouse warehouse, SimpleVector origin)
{
getPart(PART_MODEL).setOrigin(origin);
warehouse.addObject(getPart(PART_MODEL));
SimpleVector rotPiv = getPart(PART_MODEL).getRotationPivot();
SimpleVector center = getPart(PART_MODEL).getCenter();
getPart(PART_MODEL).build();
System.out.println("first:" + getPart(PART_MODEL).getCenter());
getPart(PART_MODEL).setRotationPivot(rotPiv);
getPart(PART_MODEL).setCenter(center);
System.out.println("second: " + getPart(PART_MODEL).getCenter());
this.warehouse = warehouse;
}
first:(-845.3932,734.2141,-306.81332)
second: (0.0,0.0,0.0)
first:(-0.028999299,-2.2083154,0.854877)
second: (0.0,0.0,0.0)
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)
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);
--------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();
Window mw = new Window();
desk.addWidget(mw);
mw.setTitle("TEST EMPTY WINDOW");
mw.setSize(300, 100);
mw.setX(100);
mw.setY(100);
desk.layout();
while (running)
{
poll();
synchronized(warehouse)
{
warehouse.doMovement();
buffer.clear();
warehouse.renderScene(buffer);
warehouse.draw(buffer);
}
buffer.update();
--------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;
}
public void pushAllAttribs() {
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
}
Page created in 0.032 seconds with 13 queries.