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 ... 111 112 [113] 114 115 116
1681
Support / 3d Line
« on: December 14, 2006, 02:27:02 am »
And yet it worked. Read the documentation before saying I'm wrong. I appreciate the attention, but you might want to read the code before criticising it.

1682
Support / 3d Line
« on: December 13, 2006, 08:03:14 pm »
I can't try it here but I expect I figured it out (if it's wrong, please somebody say so):

SimpleVector p1 = Interact2D.project3D2D(camera, buffer, vertex1);
SimpleVector p2 = Interact2D.project3D2D(camera, buffer, vertex2);
graphicsInstance.drawLine(p1.x, p1.y, p2.x, p2.y);

1683
Support / 3d Line
« on: December 13, 2006, 07:35:16 pm »
How do I draw a line between two 3d coordinates?

1684
Support / help
« on: December 13, 2006, 07:22:57 pm »
Totally agree with you two. Before jPCT I had pretty much given up on 3d programming. It's very hard for one programmer to do anything useful by himself from scratch, and the complexity of everything else out there is annoying. Except DarkBasic, but it doesn't work very well, and Basic isn't object-oriented, which sucks.

1685
Support / New here...
« on: December 13, 2006, 06:33:20 pm »
Best way to learn is to use notepad and the JDK (http://java.sun.com). type into Notepad the following:

public class HelloWorld {
    public static void main(String[] args) {
      System.out.println("Hello, world!");
    }
}

Save to HelloWorld.java Then, after installing the JDK, run a command prompt (Start>Run>cmd). Switch to wherever you saved your java file and type javac HelloWorld.java. Then java HelloWorld and voila. If you're confused by any part of it, just ask. If you already knew this stuff, focus on object-oriented concepts now, or eveything else will confuse you. Good luck.

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

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

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

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

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

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

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

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

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

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

Pages: 1 ... 111 112 [113] 114 115 116