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

Pages: 1 ... 98 99 [100] 101 102
1486
Support / SimpleVector[] model.getStack().peekAt(int)
« on: December 13, 2006, 01:18:18 am »
How can I have access to a model's polygons? I'm porting a bone structure I wrote several years ago to JPCT and I need access to any given polygon. My implementation used a stack.peekAt(int) method. Is there a similar method in jpct? Also, is there any readily built bone classes to distart 3d characters? Thanks in advance.

1487
Support / Iniciando...
« on: November 07, 2006, 03:48:09 pm »
In Portuguese (just the part to aguirmrc):

Eu não sei o quanto você já sabe, mas eu vou falar sobre a detecção de colisão. Se você tem experiência com Java, adicionar um listener deve ser algo que você já fez muitas vezes. Então, como você adicionaria um KeyListener a um Frame, você adiciona um CollisionListener a um objeto (neste caso, ambos os cubos). Depois, chame Object3D.setCollisionMode(Object3D.COLLISION_CHECK_SELF) para um e  Object3D.setCollisionMode(Object3D.COLLISION_CHECK_OTHERS) para o outro. Escreva o código que lidará com colisão no método public void collision(CollisionEvent) que você terá que override quando implementando a interface CollisionListener, e faça o que quizer com requiresPolygonIDs() (overwride com nada, se quizer--mas não esqueça do return statement!). Agora, toda vez que você mover os cubos (ou em um loop para o cubo automático ou manualmente pelo keyPressed(KeyEvent)), você terá que chamar Object3D.checkForCollisionX(). Voila.

Se isto não for o suficient, volte a escrever que eu explico passo a passo.

1488
Support / Iniciando...
« on: November 07, 2006, 03:37:33 pm »
To answer Uija, perhaps some people assume that the American people are more sofisticated than in fact they are. I still remember some eight years ago when they did that survey asking American students where the USA was in a world map and an astounding percentage (don't remember how much) didn't know the answer. I wonder if Bush Jr. did before taking the job.

To answer aguirmrc. I don't know how broad your question is (that is to say, I don't know how much you already know to do), but I'll address the collision-detection. If you're not new to Java programming, adding a listener should be nothing new to you. So just as you would add a KeyListener to a Frame, you add a CollisionListener to an object (in this case, both cubes). Next, call Object3D.setCollisionMode(Object3D.COLLISION_CHECK_SELF) for one and Object3D.setCollisionMode(Object3D.COLLISION_CHECK_OTHERS) for the other. Write your collision-response code in the public void collision(CollisionEvent) method you'll have to override when implementing the CollisionListener interface, and do whatever you want with requiresPolygonIDs() (overwride it with nothing if you want to--but don't forget the return statement!). Now, every time you move one of the cubes (either in a loop for the automatic or manually through keyPressed(KeyEvent)), you have to call Object3D.checkForCollisionX(). Voila.

If that's not enough, write back and I'll explain step by step.

1489
Support / Collision Detection
« on: October 18, 2006, 01:06:57 am »
I've implemented CollisionListener and, of course overridden void collision() and boolean requiresPolygonIDs(). I have called Object3D.addCollisionListener(listener) on both objects, and have made the code of the collision() method to be System.exit(0); to test if anything happens. But when the collision is supposed to happen, it doesn't, and the program goes on running. Am I missing something? Thanks in advance.

1490
Feedback / Suggestions for Next Release
« on: August 24, 2006, 07:41:27 pm »
Try it out. If it worked I would have done it. Trust me, following is complicated. But I appreciate the suggestion.

1491
Feedback / Suggestions for Next Release
« on: August 23, 2006, 11:15:33 pm »
Sorry about the confusion: what I sent you was just a quick-and-dirty little program in which the x-Wing doesn't even turn around. But you have to imagine the camera following the x-Wing turning constantly on screen.

1492
Feedback / Suggestions for Next Release
« on: August 23, 2006, 09:15:02 pm »
Did you see it yet, Egon? Any suggestion?

1493
Feedback / Suggestions for Next Release
« on: August 23, 2006, 12:48:15 am »
Test case sent. Please prove me wrong because the code really doesn't seem to work. Thanks in advance.

1494
Feedback / Suggestions for Next Release
« on: August 20, 2006, 09:53:58 am »
Also a final suggestion: Object3D.addChild(Camera). Now that is cool.

1495
Feedback / Suggestions for Next Release
« on: August 20, 2006, 09:39:11 am »
A quick update so you what I'm talking about: I can rotate the object, the object's pivot, and even mirror the object but I can't get the camera to face anywhere but up with your code.

What I've done instead is basically just set the camera to the invisible object's position and rotate it separately, but it would really help a lot if I could set a plane as the position of the camera and the camera face towards the plane's normals. I don't mean to ask too much and appreciate your time but if this is possible it would be very of you to show me.

1496
Feedback / Suggestions for Next Release
« on: August 19, 2006, 08:51:45 pm »
I don't understand one part of that first line. For starters, what's the invert for? It works exactly the same without it. And all I seem to get renderered is the bottom of my model. If I move the camera object over the model to try to get its top, even when I rotate the camera object 180 degrees, I don't get anything.

1497
Feedback / Suggestions for Next Release
« on: August 18, 2006, 05:03:45 am »
Thanks a lot. I'm about to try it out.

But how about a public Camera Object3D.lookThrough()? That way you could set an invisible object as your camera. That's probably insanely easy to do, and you could just addChild(cameraObject) to another object. You have to admit that is very useful. How about it?

1498
Feedback / Suggestions for Next Release
« on: August 18, 2006, 12:18:04 am »
Just so you don't think I'm a moron, I believe my problem comes from adjusting the camera before building all the objects. Building the objects just seems like the last thing to do when initializing. I still think that the set() and follow() methods are useful, but I understand your position.

1499
Feedback / Suggestions for Next Release
« on: August 18, 2006, 12:07:48 am »
That's neither set() nor follow(). Follow has to consider the camera's previous settings (as determined by set()).

They would be two cool methods to have but if you won't include them I'll be happy to get their respective codes from you. :-)

Seriously I'll be grateful for any help.

1500
Feedback / Suggestions for Next Release
« on: August 17, 2006, 11:44:49 pm »
I just answered all your questions: you would set the distance and angle, then call Camera.set(Object3D). From then on, you would call Camera.follow(Object3D) which would adjust its position relative to the object as if it were being pulled by a stick.

Pages: 1 ... 98 99 [100] 101 102