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

Pages: 1 [2]
16
Support / any hint on anti-alias ?
« on: December 20, 2011, 10:03:53 am »
hi,  my app will run on a custom hardware, and it only support opengl es 1.0,
so how should  I implement anti-alias on my app with jPCT-AE ? thanks.

17
Support / project 3D to 2D
« on: December 12, 2011, 09:08:57 am »
I have a dummy Object, which has a child Object called Object A, vertex a is one of A's vertex,
I want to project vertex a to screen, it seems that I can not just use Interact2D.project2D3D
and take a as its argument to get the proper 2D coordinate, so what should I do ? thanks.

18
Support / newbie question, how to rotate around a designated axis in jPct ?
« on: December 12, 2011, 01:27:59 am »
said I want to rotate a rectangle around a axis which is parallel to XAxis, how can I do this in jPCT,
can someone show me some code ? I am new to opengl and jPCT programming. thanks.

19
Support / question with keyframe animation
« on: November 25, 2011, 09:55:33 am »
hi,
     I am experimenting Animation with the following code:
Code: [Select]
   private class MyVertexController extends GenericVertexController{
    /**
*
*/
private static final long serialVersionUID = 1L;
private float mOff = 0.0f;
    public MyVertexController(float off){
    mOff = off;
    }
@Override
public void apply() {
// TODO Auto-generated method stub
SimpleVector[] src = this.getSourceMesh();
SimpleVector[] dst = this.getDestinationMesh();
Logger.log("src length: "+src.length+" dst length: "+dst.length);
for(int i=0; i<src.length && i<dst.length; i++){
dst[i].x = src[i].x + mOff;
}

}
   
    }
    private void setupAnimate(Object3D obj){
   
    obj.build();
    Mesh mesh = obj.getMesh();
   
    Object3D obj1 = obj.cloneObject();
    Object3D obj2 = obj.cloneObject();
    //world.addObject(obj1);
    //world.addObject(obj2);
   
    Mesh mesh1 = mesh.cloneMesh(true);
    obj1.setMesh(mesh1);
    //obj1.rotateX(1.4f);
    //obj1.rotateMesh();
   
    obj1.build();
    if(mesh1.setVertexController(new MyVertexController(0.0f), true))
    Logger.log("vertex controller set for mesh1");
    mesh1.applyVertexController();

    Mesh mesh2 = mesh.cloneMesh(true);
    obj2.setMesh(mesh2);
    obj2.build();
    if(mesh2.setVertexController(new MyVertexController(10.0f), true))
    Logger.log("vertex controller set for mesh2");
    mesh2.applyVertexController();
   
    Animation ani = new Animation(2);
   
    ani.createSubSequence("main");
   
    ani.addKeyFrame(mesh1);
    ani.addKeyFrame(mesh2);
    ani.setInterpolationMethod(Animation.LINEAR);
    obj.setAnimationSequence(ani);
   
    obj.setMesh(mesh1.cloneMesh(true));
    obj.build();
   
    }

the setupAnimate()  would setup animation for my object. in the  rendering loop, I call  obj.animation(index) to do animation, but the object stay still always.  do I doing something wrong in the setup code ? thanks.

20
Support / newbie to opengl 3d and jpct-ae, about texture mapping
« on: November 24, 2011, 05:03:20 am »
hi,
     I am working a opengl demo using jpct-AE, and I am new to opengl and jpct-ae.
can somebody show me some code about how to do texture mapping in jpct-ae ?
just simply setTexture of a Object3D seems can not get a good looking. help please.
thanks.

Pages: 1 [2]