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

Pages: [1]

Simple question:
Is there any "simple way" (far away more simpler than the "picking coding") to implement an object click or touch listener, like Androids view setOnClickListener or setOnTouchListener?

Disclaimer: for an 3DS loaded object

Support / 3DS frame animation HELP!
« on: October 07, 2014, 04:36:33 pm »
In my example, I have a <flag object> in MD2 format, placed in my animation code and works perfectly. However, since MD2 is an old single byte and obsolete format, it’s preferable to use 3DS for animation.  I am learning to use 3DS for animation and follow all jPCT documentation, examples and forum topics about.  Using Blender 2.72, I managed to create all the 3DS keyframes files of the <flag object> and add them to my modified animation code.  Everything loads ok, but the FLAG doesn’t MOVE.

I have been hours treating to see why. Don’t see where it is the problem. PLEASE HELP!

The following code,  is to check the mesh’s, preloading and post animation:

Code: [Select]
Object3D flag = new Object3D(load3DSModel("xflag/flag_000001.3ds", 40 * h / 552));;
Mesh M1 = flag.getMesh();

Object3D flag2 = new Object3D(load3DSModel("xflag/flag_000002.3ds", 40 * h / 552));
Mesh M2 = flag2.getMesh();

System.out.println("------------   CHECK INITIAL MESH's -------------");
if (M1 == M2) {
System.out.println("M1 = M2");
} else {
System.out.println("M1 << >> M2");  // <<<< PERFECT >>>>
- Load frame “flag” and store the corresponding  mesh in “M1”, for future verification
- Load the second frame “flag2” and store the mesh in “M2”.
- Verify that M1 is different than M2. Please note that I check both 3DS files, and have the same number of vertex, but in different positions.

Code: [Select]
flaganim = new Animation(2);



- Add M1 and M2 to the animation sequence “flaganim”
- Assign the animation to “flag”
- Add “flag” to WORLD

Code: [Select]
flag.animate(0, 0);
Mesh posM1 = flag.getMesh();

flag.animate(1, 0);
Mesh posM2 = flag.getMesh();

System.out.println("------------   CHECK MESH BASED ON ANIMATION -------------");
if (posM1 == posM2) {
System.out.println("posM1 = posM2");  //  <<<<< THIS IS MY PROBLEM  >>>>
} else {
System.out.println("posM1 << >> posM2");
- Calculate a new mesh for object “flag”, based on the first keyframe of its animation sequence “flag.animate (0, 0)” and save the new mesh to “posM1” for future verification.
- Re/Calculate a new mesh for object “flag”, based on the LAST (second) keyframe of its animation sequence “flag.animate (1, 0)” and save the new mesh to “posM2”.
- Compare posM1 with posM2 and they ARE EQUAL ????. For that reason the flag doesn’t move.

jPCT is calculating two same mesh, but WHY? WHAT I AM MAKING WRONG?

Support / EGLConfigChooser & Transparent Backgrounds help
« on: September 30, 2014, 04:58:08 pm »

1. I'm trying to understand the following line code on "HelloWorld-AE" example:

mGLView.setEGLConfigChooser(new GLSurfaceView.EGLConfigChooser() {
   public EGLConfig chooseConfig(EGL10 egl, EGLDisplay display) {
   // Ensure that we get a 16bit framebuffer. Otherwise, we'll fall
   // back to Pixelflinger on some device (read: Samsung I7500)
   int[] attributes = new int[] { EGL10.EGL_DEPTH_SIZE, 16, EGL10.EGL_NONE };
   EGLConfig[] configs = new EGLConfig[1];
   int[] result = new int[1];
   egl.eglChooseConfig(display, attributes, configs, 1, result);
   return configs[0];

1.1 How it works?. Its a complicate method to setup EGL configuration.
1.2 Why not use setEGLConfigChooser(8, 8, 8, 8, 16, 0) instead ?

2. I have read all jPCT's and all internet post's, about making the 3D surface background transparent .I Try all methods and combinations, without results.

2.1 Does somebody have successfully place a normal 2D SurfaceView behind a 3D GLSurfaceView?

Thanks in advance

Support / jPCT-AE HELLO WORLD 3D Engine doesn't close
« on: September 28, 2014, 02:17:16 am »
Is there any method to close/dispose/kill/ or what ever to stop de 3d engine from running after application close?

1. Open Hello-World example on your device
2. Move the cube and note the las position
3. Close the application by pressing back
4. Open it again and the cube its in the same position. The application never close?
Maybe i miss something

Pages: [1]