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

#1
Support / How to setup environment
March 06, 2008, 12:32:58 PM
Hello JPCT Community!
I have big trouble in understanding how to get some kind of "canvas" to render my 3D Scenes to.

I need a component to integrate into my GUI, I was thinking about a class that extends JPanel and is able to display Software and Hardware Rendering.

It also has to lbe able to listen to Mouse and Keyboard events..
Can Anyone give me a hint?
I am as far as this, but there is no rendering viewable:

import com.threed.jpct.*;

import java.awt.Graphics;
import java.io.PrintStream;
import java.net.URL;
import javax.swing.JPanel;

public class Panel3D extends JPanel
{

    private World _world;
    private FrameBuffer _buffer;
private Camera _camera;

    public Panel3D()
    {
        //this.addMouseListener(arg0);
        //this.addKeyListener(arg0);
    Logger.setLogLevel(2);
        Config.useMultipleThreads = true;
        Config.fadeoutLight = false;
        Config.linearDiv = 100F;
        Config.farPlane = 500F;
        _world = new World();
        _world.setAmbientLight(250, 250, 250);
       
     
        _buffer = new FrameBuffer(this.getHeight(), this.getWidth(), 0);
        _buffer.enableRenderer(IRenderer.RENDERER_OPENGL);
       
        _camera = _world.getCamera();
      }

}


I just found the HelloWorld-Apps in the jpctapi116rc2.zip.

Is ist possible to use OpenGL or Hardwaremode to render into a JPanel?
#2
Support / Re: Creating Object3D
March 03, 2008, 09:23:07 AM
Thanks! That was fast! I'll try and come back later on any further problems!!
#3
Support / Creating Object3D
March 03, 2008, 09:16:55 AM
Hello, this is my first post and i want to say "Hello everybody!".

My target is to create an Object3D from some Vertice.
If I try this code:

Object3D tmp=Object3D.createDummyObj();
tmp.addTriangle(new SimpleVector(-8.0f, 8.0f, 0.0f),
              new SimpleVector( 8.0f,  8.0f, 0.0f),
              new SimpleVector( 8.0f, -8.0f, 0.0f));

I get the following Error:
Quote[ Mon Mar 03 08:22:03 CET 2008 ] - ERROR: Polygon index out of range - object is too large!

Can anyone help me?