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

Pages: [1]
1
My camera never moves so I assume the min/max values aren't relvant

If I understood  you correctly  the code that will get to the values you suggest:

      world.getCamera().moveCamera(Camera.CAMERA_MOVEOUT,
            SIDE_VIEW_ZOOM_START);

      world.getCamera().setFOV(SIDE_VIEW_ZOOM_FOV);


Correct ?

2
Support / FOV/Distance values to produce a near flat camera (Ortho)
« on: March 04, 2014, 06:59:57 pm »
Hi,
* I know JPCT doesn't support Orth camera (Isometric projections and bla bla ...).

I working on an Android app that allows you to manipulate (move, rotate, scale ...) a 3d model (with texture) and as you might guess when I move the objects to the coroner's it feels "tilted" .. camera perspective issues and etc..

I'm trying to figure out good FOV and Camera Distance values that a good user experience when moving to objects to the corners of the screen.

I can played with values a lot and results are hard to judge.
Any suggestion for a good "hard coded" values that will provide me with something close to a flat camera ?
 

3
Support / Re: Rotate a 2d circle around my Object3D
« on: February 28, 2014, 05:15:19 pm »
Doesn't seem connected (removed all calls to polylines.setParent) but this version suddenly crashes in a different place:
"The matrix to be filled can't be the same instance as the matrix to invert!"

Should I open a separate thread ?

02-28 18:00:45.344: E/AndroidRuntime(6048): java.lang.RuntimeException: [ 1393603245338 ] - ERROR: The matrix to be filled can't be the same instance as the matrix to invert!
02-28 18:00:45.344: E/AndroidRuntime(6048):    at com.threed.jpct.Logger.log(Logger.java:193)
02-28 18:00:45.344: E/AndroidRuntime(6048):    at com.threed.jpct.Matrix.invert(Matrix.java:730)
02-28 18:00:45.344: E/AndroidRuntime(6048):    at com.threed.jpct.Object3D.getInverseWorldTransformation(Object3D.java:6265)
02-28 18:00:45.344: E/AndroidRuntime(6048):    at com.threed.jpct.Object3D.rayIntersectsAABB(Object3D.java:3673)
02-28 18:00:45.344: E/AndroidRuntime(6048):    at com.threed.jpct.Object3D.rayIntersectsAABB(Object3D.java:3635)
02-28 18:00:45.344: E/AndroidRuntime(6048):    at com.threed.jpct.World.calcMinDistanceAndObject3D(World.java:741)


4
Support / Re: Rotate a 2d circle around my Object3D
« on: February 26, 2014, 01:45:06 am »
Thanks a lot ! will try it tomorrow

5
Support / Re: Rotate a 2d circle around my Object3D
« on: February 25, 2014, 02:48:18 am »
Thanks !! It will really help us. (I didn't find a donate button so your next beer won't be on me just yet)

I hope you will do decide to quickly enrich the Polyline class. It just doesn't feel right manually re-calculate all the x-y-z of 40-100 points * 3 circle (and then rebuild the array and update the line).

Keep me posted please

6
Support / Re: Rotate a 2d circle around my Object3D
« on: February 24, 2014, 08:35:03 pm »
I might have more than one object on the screen so rotating the camera isn't a good option for me unless I'm missing something
The circles will be drawn to the object as long at is being rotated by a touch event.

I'm kind of glad I chose on the right direction but a bit sad that I can't attach a polyline as a child of an object.
Either way, I'm still a bit confused about how I should rotated the circles since it just an array of SimpleVector I need to manipulate them directly and then update the polyline.

(My next question is rather "noobish")
I guess I should loop over the array of SimpleVector and call some kind of rotate function on each. I need it to be in sync with my objects (the object won't move during the rotation).
Which rotate function you think I should use to do that ?

(btw, Is there any plan to some some kind of transformation on Polyline ?)

 

7
Support / Rotate a 2d circle around my Object3D
« on: February 24, 2014, 05:04:49 pm »
Hi,

I'm working on an app that uses gesture to manipulate a 3d model using JPCT-AE. I want to wrap around the model (Object3D) 3 circles representing each axis that will move and rotate with the object.

It should look similar to this (Circles around the model):


I'm assuming the best approach will be to draw the circles using PolyLines so I wrote a small function that accepts a radius, number of points in the circle, center.
Or:
   SimpleVector[] MakeCircle2d(float rad, int points,
         SimpleVector center) {..}

I create and Polyline from those points I got.
The next steps will be to modify (rotate) the list of points so I can create 2 more polylines that will 2 more circles (rotates on X,Y,Z).
I can't attach a polyline as a child object so on every transformation I will need to recalculate and display the new circles.

I'm kind of struggling here so I'm start to doubt my approach:
1. Do you feel I'm taking the correct approach ? if not what do you suggest ?
2. What would be the correct/efficient  way to rotate the array of SimpleVector around my model ?
3.  What would be the correct/efficient way to create 2 more circles from the original array of SimpleVector (or should I modify my function to return 3 array's .. 1 for each circle)


Pages: [1]