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

#2
Support / Re: About CollisionListener in Android
August 22, 2011, 09:40:19 AM
did you set object.setCollisionMode(Object3D.COLLISION_CHECK_OTHERS); ?
#3
News / Re: New development machine for jPCT...
August 18, 2011, 12:50:42 PM
yes, exactly Sandy Bridge.
Thank you for advice!
#4
News / Re: New development machine for jPCT...
August 18, 2011, 11:15:58 AM
I just bought new laptop, and wanna add ssd for speed increasing.
Egon, what do you think about OCZ VERTEX 3? Or about Plextor  devices?
#5
Well, i think  this is a new phase in android progress. And make sense for third party manufactures go further, and making more qualitative products. i mean hardware.
#6
Support / Re: How to get touched object 3D
August 10, 2011, 04:13:29 PM
Yes, just read in wiki about it.
http://www.jpct.net/wiki/index.php/Picking
Here is little example:

SimpleVector dir = Interact2D.reproject2D3DWS(cam, fb, x, y)
.normalize();
Object[] res = world.calcMinDistanceAndObject3D(cam.getPosition(), dir,
distProjection);
#7
Projects / Re: OpenAL for Android
August 10, 2011, 01:13:09 PM
That's great!
But your site is down http://www.downforeveryoneorjustme.com/paulscode.com
#8
Please, show your texture cutting....
I think problem in this point.
#9
Ok, thank you!
i will try!
#10
Yes, i know, and i'm doing it right now. But i don't now the orentation of the object in  the world.
So, at the moment i dont' know about which axish i must rotate object.
And for detection of orientation in the world i'm trying to use normalls, but they are returns some magic not normalls results(
#11
Ok, i'll try to explain...
i have some object, and after picking it, i want to rotate it. Rotation can be in 4 directions - left, right, up, down.
For example:
i rotete object twice: to the left and to the right, rotation was around Y axis.
Then i rotate object up, and  aafter i want to rotate it to the left. If i'll rotate it around y axis , that wil be wrong rotation, You agree?
#12
What exactly, my task?) Or my  decision? :)
#13
Hm, but with the normals vectors i,m tring to determine object position and orientation in world...
For it's rotation after picking, etc.
So , i thought use for this task unit vector, i mean polygon normals.
Maybe this task has another decision?
#14
Well, actually i confused about this values:
8.3051646E-7 or -4.371139E-8 or -6.357829E-8....
#15
Support / Strange values in object polygons normals.
August 03, 2011, 10:41:01 AM
Hi!
In your demo example, i'm trying to rotate object adround Y Axis like this:

public static final float NINETY_DEGREES = 1.570796327f;
        .....

if (touchTurn != 0) {
cube.rotateY(NINETY_DEGREES);
touchTurn = 0;
}


and trying to get nomall vector of polygon, which i'm picking:


@Override
public void collision(CollisionEvent ce) {

ce.getTargets();
int[] ids = ce.getPolygonIDs();;
for (int i = 0; i < ids.length; i++){
Logger.log("poligon id is" + ids[i]);
}
Logger.log("name of picked object are " + this.getName());
TextureBox box = (TextureBox)ce.getObject();
if (box != null){
Logger.log("Normalized X Axis" + box.getXAxis().normalize().toString());
Logger.log("Normalized Y Axis" + box.getYAxis().normalize().toString());
Logger.log("Normalized Z Axis" + box.getZAxis().normalize().toString());

Logger.log("getTransformedNormals" + box.getPolygonManager().getTransformedNormal(ids[0]).toString());


}


}


so, i have only 4 direction when i'm rotating my cube. But i reciving a lot of different values when i try getAxis, and getTranformedNormall.  Only at the first time i'm getting correct values. And i'm confused in this when i'm facing this problem.
Example:

1:
I/jPCT-AE ( 6221): Normalized X Axis(1.0,0.0,0.0)
I/jPCT-AE ( 6221): Normalized Y Axis(0.0,1.0,0.0)
I/jPCT-AE ( 6221): Normalized Z Axis(0.0,0.0,1.0)
I/jPCT-AE ( 6221): getTransformedNormals(-0.0,-0.0,-1.0)

2:
I/jPCT-AE ( 6221): Normalized X Axis(8.3051646E-7,0.0,1.0)
I/jPCT-AE ( 6221): Normalized Y Axis(0.0,1.0,-0.0)
I/jPCT-AE ( 6221): Normalized Z Axis(-1.0,0.0,8.3051646E-7)
I/jPCT-AE ( 6221): getTransformedNormals(-8.2651775E-7,-0.0,-1.0)

3:
I/jPCT-AE ( 6221): Normalized X Axis(-4.371139E-8,0.0,-1.0)
I/jPCT-AE ( 6221): Normalized Y Axis(0.0,1.0,-0.0)
I/jPCT-AE ( 6221): Normalized Z Axis(1.0,0.0,-4.371139E-8)
I/jPCT-AE ( 6221): getTransformedNormals(-6.357829E-8,-0.0,-1.0)
4:
I/jPCT-AE ( 6221): Normalized X Axis(-1.4424753E-6,0.0,-1.0)
I/jPCT-AE ( 6221): Normalized Y Axis(0.0,1.0,0.0)
I/jPCT-AE ( 6221): Normalized Z Axis(1.0,0.0,-1.4424753E-6)
I/jPCT-AE ( 6221): getTransformedNormals(-1.4623007E-6,-0.0,-1.0)
5:
I/jPCT-AE ( 6221): Normalized X Axis(-1.0,0.0,1.1364959E-6)
I/jPCT-AE ( 6221): Normalized Y Axis(-0.0,1.0,0.0)
I/jPCT-AE ( 6221): Normalized Z Axis(-1.1364959E-6,0.0,-1.0)
I/jPCT-AE ( 6221): getTransformedNormals(-1.1444092E-6,0.0,-1.0)