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

Pages: 1 ... 3 4 [5]
61
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.

62
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.

63
Support / Re: question with keyframe animation
« on: November 25, 2011, 12:33:22 pm »
thanks. it works now. :D

64
Support / Re: question with keyframe animation
« on: November 25, 2011, 10:54:04 am »
thanks. here is the log

Code: [Select]
D/AndroidRuntime(  593): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime(  593): CheckJNI is ON
D/AndroidRuntime(  593): --- registering native functions ---
I/ActivityManager(   60): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCH
ER] flg=0x10000000 cmp=com.tpv.ui.tri_d/.TriDUIActivity }
D/AndroidRuntime(  593): Shutting down VM
D/dalvikvm(  593): Debugger has detached; object registry had 1 entries
I/AndroidRuntime(  593): NOTE: attach of thread 'Binder Thread #3' failed
I/ActivityManager(   60): Start proc com.tpv.ui.tri_d for activity com.tpv.ui.tri_d/.TriDUIActivity: pid=600 uid=10041 g
ids={}
D/libEGL  (  600): egl.cfg not found, using default config
D/libEGL  (  600): loaded /system/lib/egl/libGLES_android.so
D/dalvikvm(  600): GC_EXTERNAL_ALLOC freed 968 objects / 67160 bytes in 47ms
I/jPCT-AE (  600): OpenGL vendor:     Android
I/jPCT-AE (  600): OpenGL renderer:   Android PixelFlinger 1.3
I/jPCT-AE (  600): OpenGL version:    OpenGL ES-CM 1.0
I/jPCT-AE (  600): OpenGL renderer initialized (using 2 texture stages)
I/jPCT-AE (  600): Loading Texture...
I/jPCT-AE (  600): Loading Texture...
D/dalvikvm(  600): GC_FOR_MALLOC freed 319 objects / 16592 bytes in 44ms
I/dalvikvm-heap(  600): Grow heap (frag case) to 4.730MB for 2097168-byte allocation
D/dalvikvm(  600): GC_FOR_MALLOC freed 43 objects / 1680 bytes in 90ms
I/jPCT-AE (  600): Loading Texture...
I/jPCT-AE (  600): Loading Texture...
I/jPCT-AE (  600): Loading Texture...
D/dalvikvm(  600): GC_EXPLICIT freed 5 objects / 184 bytes in 46ms
D/dalvikvm(  600): GC_EXPLICIT freed 8 objects / 296 bytes in 49ms
I/jPCT-AE (  600): Loading Texture...
I/jPCT-AE (  600): Normal vectors calculated in 2ms!
I/jPCT-AE (  600): Normal vectors calculated in 1ms!
I/jPCT-AE (  600): vertex controller set for mesh1
I/jPCT-AE (  600): src length: 4 dst length: 4
I/jPCT-AE (  600): Normal vectors calculated in 1ms!
I/jPCT-AE (  600): vertex controller set for mesh2
I/jPCT-AE (  600): src length: 4 dst length: 4
I/jPCT-AE (  600): Normal vectors calculated in 0ms!
I/jPCT-AE (  600): total user object in world: 1
I/jPCT-AE (  600): mCylinder: (5.0,5.0,1.0)
I/jPCT-AE (  600): Adding Lightsource: 0
I/jPCT-AE (  600): Memory usage before compacting: 5599 KB used out of 6023 KB
D/dalvikvm(  600): GC_EXPLICIT freed 661 objects / 31824 bytes in 47ms
D/dalvikvm(  600): GC_EXPLICIT freed 17 objects / 568 bytes in 59ms
I/jPCT-AE (  600): Memory usage after compacting: 5568 KB used out of 6023 KB
I/jPCT-AE (  600): Saving master Activity!
I/jPCT-AE (  600): Subobject of object 0/actor compiled to flat fixed point data using 6 vertices in 1ms!
I/jPCT-AE (  600): Object 0/actor compiled to 1 subobjects in 4ms!
I/jPCT-AE (  600): VBO created for object 'actor'
I/ARMAssembler(  600): generated scanline__000000B7:03010144_00009501_00000000 [126 ipp] (207 ins) at [0x2545f8:0x254934
] in 2021858 ns
I/ActivityManager(   60): Displayed activity com.tpv.ui.tri_d/.TriDUIActivity: 2434 ms (total 2434 ms)
W/KeyCharacterMap(  600): No keyboard for id 0
W/KeyCharacterMap(  600): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
D/dalvikvm(  253): GC_EXPLICIT freed 216 objects / 14192 bytes in 1027ms
D/dalvikvm(  264): GC_EXPLICIT freed 88 objects / 4200 bytes in 138ms
D/dalvikvm(  119): GC_EXPLICIT freed 966 objects / 52912 bytes in 188ms
D/SntpClient(   60): request time failed: java.net.SocketException: Address family not supported by protocol

65
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.

66
Support / Re: newbie to opengl 3d and jpct-ae, about texture mapping
« on: November 25, 2011, 01:00:07 am »
Thanks, Egon, I know what's the problem now.
It's because the texture coordinates didn't  set properly. :D

67
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 ... 3 4 [5]